- Web Wormhole https://webwormhole.io/ https://github.com/saljam/webwormhole
- ToffeeShare https://toffeeshare.com/
- FilePizza https://file.pizza/
ShareDrop sharedrop.io https://github.com/szimek/sharedrop(SOLD, not recommended, use one of the forks)A clone SnapDrop snapdrop.net https://github.com/RobinLinus/snapdrop(SOLD, not recommended, use one of the forks)- A fork PairDrop https://pairdrop.net/ https://github.com/schlagmichdoch/pairdrop
- Instant.io https://instant.io/
- FileTC https://file.tc/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What we want is the mouse position to stay the same relative to the zoomable object (it's a map in this example) | |
// To do that we solve the equation "oldMouseRelativePos = newMouseRelativePos" to find the value of newMapOffset. | |
// We know the values of oldZoom, newZoom, oldMapOffset and mousePos | |
// | |
// It is assumed that canvas->screen (something you would use in OpenGL, for example) transform is "(p - offset) / zoom", | |
// meaning screen->canvas (something you would use in Canvas2D) transform is "p / zoom - offset". | |
// mousePos is assumed to be in some kind of screen coordinates | |
// mapZoom is assumed to be zooming relative to the top left corner of the map | |
// | |
// "map relative mouse position" is: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The most bare cross-browser drag with no drop function I could do. | |
// Example: | |
// | |
// make_draggable( | |
// thing, | |
// () => console.log("let’s go"), | |
// (event) => { | |
// console.log(event.clientX, event.clientY); | |
// element.style.transform = `translate(${event.clientX}px, ${event.clientY}px)`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <stdint.h> | |
// pcg32_next() implementation matches pcg_engines::oneseq_xsh_rr_64_32 | |
// NOTE: use this only for compatibility with 32-bit architectures | |
// otherwise prefer using pcg64.h implementation with 128-bit state | |
typedef struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this code will work only when compiled as 64-bit code, and on Windows 10 | |
// older Windows version might require different structure definitions | |
#define NOMINMAX | |
#define INITGUID | |
#include <windows.h> | |
#include <evntrace.h> | |
#include <evntcons.h> | |
#pragma comment (lib, "shell32.lib") |
Memory Optimization (Christer Ericson, GDC 2003)
http://realtimecollisiondetection.net/pubs/GDC03_Ericson_Memory_Optimization.ppt
Cache coherency primer (Fabian Giesen)
https://fgiesen.wordpress.com/2014/07/07/cache-coherency/
Code Clinic 2015: How to Write Code the Compiler Can Actually Optimize (Mike Acton)
http://gdcvault.com/play/1021866/Code-Clinic-2015-How-to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _CRT_SECURE_NO_DEPRECATE | |
#include <stdio.h> | |
#include <string.h> | |
#include <Windows.h> | |
// This allocates a "magic ring buffer" that is mapped twice, with the two | |
// copies being contiguous in (virtual) memory. The advantage of this is | |
// that this allows any function that expects data to be contiguous in | |
// memory to read from (or write to) such a buffer. It also means that |