Skip to content

Instantly share code, notes, and snippets.

View jonathanlurie's full-sized avatar
🐛
I like to code things

Jonathan Lurie jonathanlurie

🐛
I like to code things
View GitHub Profile
@jonathanlurie
jonathanlurie / README.md
Last active August 29, 2015 14:27
The places I lived., in a Odyssey.js project

This projectis using Odyssey.js to tell the story of places I lived in and moved to all along.

The files story.md keeps the markdown content necessary to the story. This content is also embeded in the index.html file.

I use bl.oks.org to share this visual story.

/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
*/
// This set of controls performs orbiting, dollying (zooming), and panning.
// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default).
@jonathanlurie
jonathanlurie / readme.md
Last active October 20, 2016 18:38
A Markdown test

here is a test

blabla bla

@jonathanlurie
jonathanlurie / TrackballControls.js
Last active June 30, 2022 06:12
Some fragment shader playing with 3d world coordinates
/**
* @author Eberhard Graether / http://egraether.com/
* @author Mark Lundin / http://mark-lundin.com
* @author Simone Manini / http://daron1337.github.io
* @author Luca Antiga / http://lantiga.github.io
*/
THREE.TrackballControls = function ( object, domElement ) {
var _this = this;
<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 */
@jonathanlurie
jonathanlurie / arrayFunction.cpp
Last active May 31, 2023 10:22
Emscripten and float arrays
#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];
}
@jonathanlurie
jonathanlurie / arrayFunction.cpp
Created March 10, 2017 20:56
Emscripten and float arrays v2
#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;
@jonathanlurie
jonathanlurie / arrayFunction.cpp
Created March 10, 2017 22:01
Emscripten and float arrays v3
#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;
@jonathanlurie
jonathanlurie / index.html
Last active March 21, 2017 17:28
Hides the cursor after 2 seconds, then show again when moving. https://bl.ocks.org/jonathanlurie/f7261e717fc94063b4992fcecb71ba69
<html>
<head>
</head>
<body>
Hides the cursor after 2 seconds, then show again when moving.
<script>
(function() {
@jonathanlurie
jonathanlurie / index.html
Created April 6, 2017 17:48
starter THREE + Orbit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Three.js Geometry Browser</title>
<style>
body {