Fix some shapes
This commit is contained in:
@@ -4,7 +4,7 @@ layout (triangle_strip, max_vertices = 3) out;
|
|||||||
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
layout (std140, binding = 0) uniform TheMat { mat4 theMat; } ;
|
||||||
layout(location=0)uniform vec3 lightPos;
|
layout(location=0)uniform vec3 lightPos;
|
||||||
in float drawbit[];
|
in float drawbit[];
|
||||||
// this code is duplicated in lineShadow.geom, should not be changed on its own
|
// the following code is duplicated in lineShadow.geom, should not be changed on its own
|
||||||
vec4 projNear (vec4 pos)
|
vec4 projNear (vec4 pos)
|
||||||
{
|
{
|
||||||
// note we project to a specific height
|
// note we project to a specific height
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
module Dodge.Block.Draw
|
module Dodge.Block.Draw (drawBlock) where
|
||||||
where
|
|
||||||
import Shape
|
|
||||||
import Dodge.Data.Block
|
import Dodge.Data.Block
|
||||||
|
import Shape
|
||||||
import ShapePicture
|
import ShapePicture
|
||||||
|
|
||||||
drawBlock :: BlockDraw -> Block -> SPic
|
drawBlock :: BlockDraw -> Block -> SPic
|
||||||
drawBlock bd = case bd of
|
drawBlock bd = case bd of
|
||||||
BlockDrawMempty -> const mempty
|
BlockDrawMempty -> const mempty
|
||||||
BlockDraws bds -> \bl -> foldMap (`drawBlock` bl) bds
|
BlockDraws bds -> \bl -> foldMap (`drawBlock` bl) bds
|
||||||
BlockDrawColHeightPoss col h ps -> const $ noPic $ colorSH col (upperBox Medium Typical h ps)
|
BlockDrawColHeightPoss col h ps -> const $ noPic $ colorSH col (upperBox Medium Typical h ps)
|
||||||
BlockDrawBlSh x -> noPic . doBlSh x
|
BlockDrawBlSh x -> noPic . doBlSh x
|
||||||
|
|
||||||
@@ -15,5 +15,3 @@ doBlSh :: BlSh -> Block -> Shape
|
|||||||
doBlSh bs = case bs of
|
doBlSh bs = case bs of
|
||||||
BlShMempty -> const mempty
|
BlShMempty -> const mempty
|
||||||
BlShConst sh -> const sh
|
BlShConst sh -> const sh
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,13 +28,17 @@ terminalShape :: Machine -> Shape
|
|||||||
terminalShape mc =
|
terminalShape mc =
|
||||||
colorSH
|
colorSH
|
||||||
col
|
col
|
||||||
( prismBox Medium Typical
|
( prismBox
|
||||||
|
Medium
|
||||||
|
Typical
|
||||||
[V3 10 10 20, V3 (-10) 10 20, V3 (-10) (-10) 10, V3 10 (-10) 10]
|
[V3 10 10 20, V3 (-10) 10 20, V3 (-10) (-10) 10, V3 10 (-10) 10]
|
||||||
[V3 10 10 0, V3 (-10) 10 0, V3 (-10) (-10) 0, V3 10 (-10) 0]
|
(addZ 0 `map` rectWH 10 10)
|
||||||
)
|
)
|
||||||
<> colorSH
|
<> colorSH
|
||||||
black
|
black
|
||||||
( prismBox Small Superfluous
|
( prismBox
|
||||||
|
Small
|
||||||
|
Superfluous
|
||||||
[V3 8 8 20, V3 (-8) 8 20, V3 0 (-8) 10]
|
[V3 8 8 20, V3 (-8) 8 20, V3 0 (-8) 10]
|
||||||
[V3 8 8 19, V3 (-8) 8 19, V3 0 (-8) 9]
|
[V3 8 8 19, V3 (-8) 8 19, V3 0 (-8) 9]
|
||||||
--[V3 8 8 20, V3 (-8) 8 20, V3 (-8) (-8) 10, V3 8 (-8) 10]
|
--[V3 8 8 20, V3 (-8) 8 20, V3 (-8) (-8) 10, V3 8 (-8) 10]
|
||||||
@@ -45,9 +49,12 @@ terminalShape mc =
|
|||||||
|
|
||||||
drawBaseMachine :: Float -> Machine -> SPic
|
drawBaseMachine :: Float -> Machine -> SPic
|
||||||
drawBaseMachine h mc =
|
drawBaseMachine h mc =
|
||||||
( colorSH (_mcColor mc) $ upperBox Medium Typical h (reverse $ square (_mcWidth mc))
|
noPic
|
||||||
, mempty
|
. colorSH (_mcColor mc)
|
||||||
)
|
. upperBox Medium Typical h
|
||||||
|
. square
|
||||||
|
$ _mcWidth mc
|
||||||
|
|
||||||
drawTurret :: Turret -> Machine -> SPic
|
drawTurret :: Turret -> Machine -> SPic
|
||||||
drawTurret tu mc = overPosSP (turretItemOffset it tu mc) (itemSPic it)
|
drawTurret tu mc = overPosSP (turretItemOffset it tu mc) (itemSPic it)
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user