Working element buffer object
This commit is contained in:
+6
-8
@@ -8,19 +8,17 @@ import ShapePicture.Data
|
||||
import Picture
|
||||
import Geometry
|
||||
|
||||
import Data.Bifunctor
|
||||
|
||||
emptyBlank :: SPic
|
||||
emptyBlank = SPic emptySH blank
|
||||
emptyBlank = (emptySH,blank)
|
||||
|
||||
translateSPf :: Float -> Float -> SPic -> SPic
|
||||
translateSPf x y (SPic sh pic) = SPic
|
||||
(translateSH (V3 x y 0) sh)
|
||||
(translate x y pic)
|
||||
translateSPf x y = bimap (translateSH (V3 x y 0)) (translate x y)
|
||||
|
||||
-- TODO make this uniform: currently the shape translates and the picture is set to a constant
|
||||
translateSPz :: Float -> SPic -> SPic
|
||||
translateSPz z (SPic sh pic) = SPic
|
||||
(translateSH (V3 0 0 z) sh)
|
||||
(setDepth z pic)
|
||||
translateSPz z = bimap (translateSH (V3 0 0 z)) (setDepth z)
|
||||
|
||||
rotateSP :: Float -> SPic -> SPic
|
||||
rotateSP a (SPic sh pic) = SPic (rotateSH a sh) (rotate a pic)
|
||||
rotateSP a = bimap (rotateSH a) (rotate a)
|
||||
|
||||
Reference in New Issue
Block a user