Refactor vao preload
This commit is contained in:
+13
-1
@@ -422,6 +422,18 @@ lineOfThickness t = pictures . f
|
||||
f _ = []
|
||||
n a b = (t*0.5) *.* errorNormalizeV 42 (vNormal (a -.- b))
|
||||
|
||||
lineGeom :: Float -> Point2 -> Point2 -> [Point2]
|
||||
lineGeom t x y
|
||||
| x == y = []
|
||||
| otherwise = [x +.+ n x y, x -.- n x y, y +.+ n x y, y -.- n x y]
|
||||
where n a b = (t*0.5) *.* errorNormalizeV 4200 (vNormal (a -.- b))
|
||||
|
||||
wedgeGeom :: Float -> Point2 -> Point2 -> [Point2]
|
||||
wedgeGeom t x y
|
||||
| x == y = []
|
||||
| otherwise = [x +.+ n x y, x -.- n x y, y]
|
||||
where n a b = (t*0.5) *.* errorNormalizeV 4200 (vNormal (a -.- b))
|
||||
|
||||
wedgeOfThickness :: Float -> Point2 -> Point2 -> Picture
|
||||
wedgeOfThickness t x y
|
||||
| x == y = blank
|
||||
@@ -701,7 +713,7 @@ onLayer l = setDepth (fromIntegral (levLayer l) / 100)
|
||||
--onLayer l p = [(p, [levLayer l])]
|
||||
|
||||
onLayerL :: [Int] -> Picture -> Picture
|
||||
onLayerL is = setDepth (sum $ zipWith (/) (map fromIntegral is) $ map (\x->100**x) [1..])
|
||||
onLayerL is = setDepth ((sum $ zipWith (/) (map fromIntegral is) $ map (\x->100**x) [1..]))
|
||||
|
||||
levLayer :: Layer -> Int
|
||||
levLayer BgLayer = 20
|
||||
|
||||
Reference in New Issue
Block a user