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
/* | |
Author: Jonathan Lurie - http://me.jonathanlurie.fr | |
License: MIT | |
The point of this little gist is to fix the issue of losing | |
typed arrays when calling the default JSON serilization. | |
The default mode has for effect to convert typed arrays into | |
object like that: {0: 0.1, 1: 0.2, 2: 0.3} what used to be | |
Float32Array([0.1, 0.2, 0.3]) and once it takes the shape of an | |
object, there is no way to get it back in an automated way! |
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
<html> | |
<head> | |
</head> | |
<body> | |
<script> | |
// index of the sound currently being played (-1 if none) | |
var playingIndex = -1; | |
// duration in second of the fading | |
var fadeDuration = 2; |
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
function endianness () { | |
var b = new ArrayBuffer(4); | |
var a = new Uint32Array(b); | |
var c = new Uint8Array(b); | |
a[0] = 0xdeadbeef; | |
if (c[0] == 0xef) return 'LE'; | |
if (c[0] == 0xde) return 'BE'; | |
throw new Error('unknown endianness'); | |
} |
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
date | close | |
---|---|---|
1-May-12 | 558.13 | |
30-Apr-12 | 553.98 | |
27-Apr-12 | 567.00 | |
26-Apr-12 | 589.70 | |
25-Apr-12 | 599.00 | |
24-Apr-12 | 630.28 | |
21-Apr-12 | 666.70 | |
23-Apr-12 | 666.70 | |
20-Apr-12 | 634.98 |
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> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Three.js Geometry Browser</title> | |
<style> | |
body { |
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
<html> | |
<head> | |
</head> | |
<body> | |
Hides the cursor after 2 seconds, then show again when moving. | |
<script> | |
(function() { |
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
#include <math.h> | |
// otherwise C++ function names are mangled | |
extern "C" { | |
void float_multiply_array(float *data, int w, int h, int ncpp) { | |
int length = w*h; | |
int currentPixelIndex = 0; | |
int currentPixelIndexUnderFilter = 0; |
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
#include <math.h> | |
// otherwise C++ function names are mangled | |
extern "C" { | |
void float_multiply_array(float *data, int w, int h, int ncpp) { | |
int length = w*h; | |
int currentPixelIndex = 0; | |
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
#include <math.h> | |
// otherwise C++ function names are mangled | |
extern "C" { | |
int float_multiply_array(float factor, float *arr, int length) { | |
for (int i = 0; i < length; i++) { | |
arr[i] = factor * arr[i]; | |
} |
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
<html> | |
<head> | |
<script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script> | |
<script src="http://imagesloaded.desandro.com/imagesloaded.pkgd.js"></script> | |
<style> | |
* { box-sizing: border-box; } | |
/* force scrollbar */ |