diff --git a/src/Init.hs b/src/Init.hs index 78d5a71..79c4a91 100644 --- a/src/Init.hs +++ b/src/Init.hs @@ -138,9 +138,26 @@ initScene = do , objectMaterial = "defaultMesh" , objectMatrix = identity } + triangles = V.concatMap + (\y -> + V.map + (\x -> + let + translationMatrix = mkTransformation (Quaternion 1 (V3 0 0 0)) (V3 x 0 y) + scaleMatrix = scaled (V4 0.2 0.2 0.2 1) + in + RenderObject + { objectMesh = "triangle" + , objectMaterial = "defaultMesh" + , objectMatrix = translationMatrix !*! scaleMatrix + } + ) + (V.fromList [-20 .. 20]) + ) + (V.fromList [-20 .. 20]) renderableContainer <- asks renderables renderableVector <- liftIO $ STM.atomically $ STM.readTMVar renderableContainer void $ liftIO $ STM.atomically $ STM.swapTMVar renderableContainer $ - renderableVector `V.snoc` mask + (renderableVector `V.snoc` mask) V.++ triangles