diff --git a/wikibook/tutorial-04-matrices/Linear.hs b/wikibook/tutorial-04-matrices/Linear.hs index 2257df5..e048738 100644 --- a/wikibook/tutorial-04-matrices/Linear.hs +++ b/wikibook/tutorial-04-matrices/Linear.hs @@ -76,7 +76,7 @@ data Resources = Resources { triProgram :: U.ShaderProgram transformM :: Real n => n -> L.M44 GL.GLfloat transformM t' = translation L.!*! rotation where t = realToFrac t' - translation = L.mkTransformationMat L.eye3 $ L.V3 dx 0 0 + translation = L.mkTransformationMat L.identity $ L.V3 dx 0 0 dx = sin t * 2 * pi / 5 rotation = L.m33_to_m44 . L.fromQuaternion $ L.axisAngle (L.V3 0 0 1) angle angle = t * pi / 4 -- Linear is in radians diff --git a/wikibook/tutorial-05-3D/GLUtil.hs b/wikibook/tutorial-05-3D/GLUtil.hs index 2efcd93..f167612 100644 --- a/wikibook/tutorial-05-3D/GLUtil.hs +++ b/wikibook/tutorial-05-3D/GLUtil.hs @@ -83,7 +83,7 @@ transformM :: Int -> Int -> Double -> L.M44 GL.GLfloat transformM width height t = projection L.!*! view L.!*! model L.!*! anim where angle = realToFrac t * pi/4 anim = L.mkTransformation (L.axisAngle (L.V3 0 1 0) angle) L.zero - model = L.mkTransformationMat L.eye3 $ L.V3 0 0 (-4) + model = L.mkTransformationMat L.identity $ L.V3 0 0 (-4) view = U.camMatrix cam cam = U.tilt (-30) . U.dolly (L.V3 0 2 0) $ U.fpsCamera projection = U.projectionMatrix (pi/4) aspect 0.1 10 diff --git a/wikibook/tutorial-05-3D/TH.hs b/wikibook/tutorial-05-3D/TH.hs index e649f7b..f128e71 100644 --- a/wikibook/tutorial-05-3D/TH.hs +++ b/wikibook/tutorial-05-3D/TH.hs @@ -82,7 +82,7 @@ transformM width height t = where angle = realToFrac t * pi/4 anim = L.mkTransformation (L.axisAngle (L.V3 0 1 0) angle) L.zero - model = L.mkTransformationMat L.eye3 $ L.V3 0 0 (-4) + model = L.mkTransformationMat L.identity $ L.V3 0 0 (-4) view = U.camMatrix cam cam = U.tilt (-30) . U.dolly (L.V3 0 2 0) $ U.fpsCamera projection = U.projectionMatrix (pi/4) aspect 0.1 10 diff --git a/wikibook/tutorial-05-3D/Vinyl.hs b/wikibook/tutorial-05-3D/Vinyl.hs index b634e27..d37a170 100644 --- a/wikibook/tutorial-05-3D/Vinyl.hs +++ b/wikibook/tutorial-05-3D/Vinyl.hs @@ -80,7 +80,7 @@ transformM width height t = where angle = realToFrac t * pi/4 anim = L.mkTransformation (L.axisAngle (L.V3 0 1 0) angle) L.zero - model = L.mkTransformationMat L.eye3 $ L.V3 0 0 (-4) + model = L.mkTransformationMat L.identity $ L.V3 0 0 (-4) view = U.camMatrix cam cam = U.tilt (-30) . U.dolly (L.V3 0 2 0) $ U.fpsCamera projection = U.projectionMatrix (pi/4) aspect 0.1 10