Skip to content

Instantly share code, notes, and snippets.

@roovo
Created September 3, 2016 18:29
Show Gist options
  • Save roovo/f586585a2221c7aee717087a7cbacc24 to your computer and use it in GitHub Desktop.
Save roovo/f586585a2221c7aee717087a7cbacc24 to your computer and use it in GitHub Desktop.
diff --git a/examples/crate.elm b/examples/crate.elm
index a94c4c1..756f8c5 100644
--- a/examples/crate.elm
+++ b/examples/crate.elm
@@ -53,8 +53,8 @@ main =
-- MESHES
-crate : Drawable { pos:Vec3, coord:Vec3 }
-crate =
+crate : Int -> Drawable { pos:Vec3, coord:Vec3 }
+crate junk =
Triangle <|
List.concatMap rotatedFace [ (0,0), (90,0), (180,0), (270,0), (0,90), (0,-90) ]
@@ -113,7 +113,7 @@ view {texture, theta} =
Nothing ->
[]
Just tex ->
- [render vertexShader fragmentShader crate { crate = tex, perspective = perspective theta }]
+ [render vertexShader fragmentShader (crate 1) { crate = tex, perspective = perspective theta }]
)
|> WebGL.toHtml [width 400, height 400]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment