Skip to content

Instantly share code, notes, and snippets.

@bucketh3ad
bucketh3ad / scenes.elm
Last active August 29, 2015 14:01
Elm Scenes Example
import Keyboard
import Mouse
mpos : Signal (Int,Int)
mpos = Mouse.position
kpos : Signal {x:Int,y:Int}
kpos = Keyboard.arrows
draw1 : (Int,Int) -> Element
@bucketh3ad
bucketh3ad / fractalzoom.elm
Last active August 29, 2015 14:01
Elm Fractal Zoom Toy
import Math.Vector2 (Vec2)
import Math.Vector3 (..)
import Math.Matrix4 (..)
import Graphics.WebGL (..)
import Mouse
import Keyboard
-- Define the mesh for a crate
crate : [Triangle { pos:Vec3, coord:Vec3 }]
crate = concatMap rotatedFace [ (0,0), (90,0), (180,0), (270,0), (0,90), (0,-90) ]
@bucketh3ad
bucketh3ad / elm-runtime-global.js
Created June 1, 2014 00:05
Elm Runtime Global Wrapper
Elm = (function (){
//Begin elm-runtime.js
'use strict';
var Elm = ...
};
//End elm-runtime.js
Elm.MeteorHelpers = [A2,A3,A4,A5,A6,A7,A8,A9,F2,F3,F4,F5,F6,F7,F8,F9];