Module
Graphics.Isometric
- Package
- purescript-isometric
- Repository
- sharkdp/purescript-isometric
#Face Source
type Face = ThreeOrMore Point
A Face
is a list of (at least) three points which all lie in a plane.
#extrude Source
extrude :: ThreeOrMore Point -> Number -> Shape
Project a 2D path onto the xy plane and extrude it by the given height.
#extrudeCone Source
extrudeCone :: ThreeOrMore Point -> Number -> Shape
Create a cone-like object by extruding the points from a base path in the xy plane to a single point above (or below) it.
#translateX Source
translateX :: Number -> Scene -> Scene
Translate a scene by a given offset in x-direction.
#translateY Source
translateY :: Number -> Scene -> Scene
Translate a scene by a given offset in y-direction.
#translateZ Source
translateZ :: Number -> Scene -> Scene
Translate a scene by a given offset in z-direction.
#renderScene Source
renderScene :: Vector -> Scene -> Drawing
Render a three-dimensional Scene
into a two-dimensional Drawing
, using
an isometric projection. The vector determines the direction of light.
Re-exports from Color
#Color Source
data Color
The representation of a color.
Note:
- The
Eq
instance compares twoColor
s by comparing their (integer) RGB values. This is different from comparing the HSL values (for example, HSL has many different representations of black (arbitrary hue and saturation values). - Colors outside the sRGB gamut which cannot be displayed on a typical
computer screen can not be represented by
Color
.
Instances
Re-exports from Data.List.ThreeOrMore
#toList Source
toList :: forall a. ThreeOrMore a -> List a
#reverse Source
reverse :: forall a. ThreeOrMore a -> ThreeOrMore a
#last Source
last :: forall a. ThreeOrMore a -> a