ianmackenzie/elm-3d-camera/3.1.0

NOTE: the latest version is 4.0.1

Triangle3d.Projection

Camera3d worldUnits worldCoordinates
-> Rectangle2d screenUnits screenCoordinates
-> Triangle3d worldUnits worldCoordinates
-> Triangle2d screenUnits screenCoordinates

Project a triangle from 3D world to 2D screen coordinates. Equivalent to calling Point3d.toScreenSpace on the three vertices of the triangle.

isFrontFacing : Camera3d units coordinates -> Triangle3d units coordinates -> Bool

Check if a given triangle is front facing with respect to the given camera. A 'front facing' triangle has a normal direction towards the camera instead of away. This also means that when projected into 2D, the vertices of the triangle will be in counterclockwise order.