Module

Hylograph.Isometric.Plane

Package
purescript-hylograph-isometric
Repository
afcondon/purescript-hylograph-isometric

Planes: where a 2D layout is put in the world.

A plane is an origin and two unit directions, across and down, which a layout's x and y follow. A tree can lie on the floor (at any height, so several can be stacked), or stand as the left or the right back wall of the view from the south-east.

#Plane Source

newtype Plane

Constructors

Instances

#floor Source

floor :: Number -> Plane

The floor at a height: a layout keeps its x and y.

#leftWall Source

leftWall :: { at :: Number, top :: Number, width :: Number } -> Plane

The wall x = at, seen from the south-east on the left: a layout's x runs from the front corner (y = width) to the back (y = 0), and its y runs down from top.

#rightWall Source

rightWall :: { at :: Number, top :: Number } -> Plane

The wall y = at, seen from the south-east on the right: a layout's x runs along the world's x, and its y runs down from top.

#onPlane Source

onPlane :: Plane -> Point -> Point3

A point of a layout, put on the plane.

#normalOf Source

normalOf :: Plane -> Point3

The side of the plane a layout is read from (across × down): up for the floor, and towards the south-east camera for the walls.