This file contains 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
using Fleck; | |
using System; | |
using System.Collections.Concurrent; | |
namespace WebSocketRelay | |
{ | |
class Program | |
{ | |
private static string GetConnectionString(IWebSocketConnection socket) | |
{ |
This file contains 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
<!DOCTYPE html> | |
<!-- Assembled from assorted Babylon.js samples --> | |
<!-- To run from a local folder, do something like the following. --> | |
<!-- npm install http-server --> | |
<!-- .\node_modules\.bin\http-server -a localhost -p 8000 -c-1 --> | |
<!-- then open localhost:8000/index.html (if that's what you named --> | |
<!-- it) in your browser, with your equirectangular 360 photo --> | |
<!-- named "image.jpg" in the same directory. --> | |
<html> | |
<head> |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
/** | |
* Theory described here: https://en.wikipedia.org/wiki/Levenshtein_distance | |
* Algorithm described here: https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm | |
* | |
* A basic, barely-tested implementation of the Wagner-Fischer algorithm for |
This file contains 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
RWTexture2D<float3> tex : register(u0); | |
// Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs", copied in from Wikipedia | |
uint Xorshift(uint seed) | |
{ | |
uint x = seed; | |
x ^= x << 13; | |
x ^= x >> 17; | |
x ^= x << 5; | |
return x; |