ianmackenzie / elm-3d-scene / Scene3d.Mesh.Encode

These functions let you encode Mesh and Shadow values as JSON which can later be decoded using the functions in the Mesh.Decode module. This is useful mostly as an offline pre-processing step to store meshes on a server in a form that can be efficiently loaded and parsed at runtime.

See the Mesh.Decode module for documentation on the JSON format used by different mesh types.

mesh : Scene3d.Mesh.Mesh coordinates attributes -> Json.Encode.Value

Encode a Mesh value as JSON.

shadow : Scene3d.Mesh.Shadow coordinates -> Json.Encode.Value

Encode a Shadow value as JSON.