summaryrefslogtreecommitdiff
path: root/testdata/editor-examples/LambdaCube2.lc
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-02-18 18:34:47 +0100
committerPéter Diviánszky <divipp@gmail.com>2016-02-19 02:50:09 +0100
commit998ae8f884f4b1d4e092ebdf3a441b97b2cf05b7 (patch)
tree6ced17ee38fa78de69b05c8765288ecabe52fb6e /testdata/editor-examples/LambdaCube2.lc
parent27c8f3aeb2d13da0bec522ee8a8a98f534fa39e8 (diff)
tuples are heterogeneous lists
Diffstat (limited to 'testdata/editor-examples/LambdaCube2.lc')
-rw-r--r--testdata/editor-examples/LambdaCube2.lc8
1 files changed, 4 insertions, 4 deletions
diff --git a/testdata/editor-examples/LambdaCube2.lc b/testdata/editor-examples/LambdaCube2.lc
index b3d3ebf5..fff56f87 100644
--- a/testdata/editor-examples/LambdaCube2.lc
+++ b/testdata/editor-examples/LambdaCube2.lc
@@ -3,19 +3,19 @@ len2 v = v%x*v%x + v%y*v%y + v%z*v%z
3 3
4makeFrame (time :: Float) 4makeFrame (time :: Float)
5 (projmat :: Mat 4 4 Float) 5 (projmat :: Mat 4 4 Float)
6 (vertexstream :: PrimitiveStream Triangle (Vec 4 Float)) 6 (vertexstream :: PrimitiveStream Triangle ((Vec 4 Float)))
7 7
8 = imageFrame (emptyDepthImage 1, emptyColorImage navy) 8 = imageFrame (emptyDepthImage 1, emptyColorImage navy)
9 `overlay` 9 `overlay`
10 vertexstream 10 vertexstream
11 & mapPrimitives (\x -> (scale 0.5 (projmat *. x), x)) 11 & mapPrimitives (\((x)) -> (scale 0.5 (projmat *. x), x))
12 & rasterizePrimitives (TriangleCtx CullNone PolygonFill NoOffset LastVertex) Smooth 12 & rasterizePrimitives (TriangleCtx CullNone PolygonFill NoOffset LastVertex) ((Smooth))
13 & filterFragments ffilter 13 & filterFragments ffilter
14 & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) 14 & accumulateWith (DepthOp Less True, ColorOp NoBlending (V4 True True True True))
15 where 15 where
16 h = 0.25 16 h = 0.25
17 17
18 ffilter v = 18 ffilter ((v)) =
19 (v%y + v%x + v%z > 1 || abs (v%y - v%x + v%z - 1.0) > h) 19 (v%y + v%x + v%z > 1 || abs (v%y - v%x + v%z - 1.0) > h)
20 && (v%y + v%x - v%z > 1 || abs (v%y + v%x + v%z - 1.0) > h) 20 && (v%y + v%x - v%z > 1 || abs (v%y + v%x + v%z - 1.0) > h)
21 && (v%y - v%x - v%z > 1 || abs (v%y + v%x - v%z - 1.0) > h) 21 && (v%y - v%x - v%z > 1 || abs (v%y + v%x - v%z - 1.0) > h)