https://github.com/Matt-Esch/virtual-dom
var h = require("virtual-dom/h");
// h est similaire à React.createElement :
h("div.someClass", { title: "un attribut DOM", onclick: f, ... }, [
h("a", { href: "url" }, "Ceci est un lien"),| if (process.env.NODE_ENV !== "production") | |
| document.write('<script src="//localhost:9241"></script>'); |
| par( | |
| mfrow=c(2,3), | |
| mar=c(1,1,2,1), | |
| mgp=c(1, 0.2, 0), | |
| oma=c(0,0,2,0)) | |
| distributeCurve <- function (f, title, samples = 40000, drawSamples = 40) { | |
| l <- c() | |
| for (i in 0:samples) { | |
| r <- f() |
| # requirement: r | |
| # on MacOS: install r with homebrew: http://stackoverflow.com/a/26457411/343892 | |
| cd ./graphs/ || exit 1; | |
| for f in *.r; do | |
| rcode=`cat $f` | |
| name=${f%.*} | |
| echo -e "svg('$name.svg')\n$rcode\ndev.off()" | r --vanilla 1> /dev/null || exit 1 | |
| done; |
https://github.com/Matt-Esch/virtual-dom
var h = require("virtual-dom/h");
// h est similaire à React.createElement :
h("div.someClass", { title: "un attribut DOM", onclick: f, ... }, [
h("a", { href: "url" }, "Ceci est un lien"),| const Physics = { | |
| applyForce: function(x, y) { ... }, | |
| processEntity: function(entity) { ... } | |
| }; | |
| export default Physics; |
| { | |
| "name": "enhance-lichess", | |
| "version": "1.0.0", | |
| "dependencies": { | |
| "event-stream": "^3.3.0", | |
| "request": "^2.55.0" | |
| } | |
| } |
| var raf = require("raf"); | |
| raf(function loop (t) { | |
| raf(loop); | |
| if (isVisibleInWindow(canvas)) return; | |
| // ... do your consuming stuff | |
| }); |
| var baboon = require("baboon-image"); | |
| var lena = require("lena"); | |
| var createTexture = require("gl-texture2d"); | |
| var createTransition = require("./glsl-transition"); | |
| // from "glsl-transitions" | |
| var CubeTransition = { | |
| "id" : "ee15128c2b87d0e74dee", | |
| "name" : "cube", | |
| "owner" : "gre", |
| var through = require("through") | |
| var extract = require("glsl-extract") | |
| require("glsl-transitions").forEach(function (t) { | |
| var e=null; | |
| console.error = function (msg) { | |
| e = msg; | |
| }; | |
| getExports(t.glsl); // for some reason this doesn't break but log using console.error (so I hacked console.error!) |