bburdette/stl/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Stl

A parser for binary STL files - the 3d models that are just a list of triangles. Pretty much went by wikipedia on the STL format and tested on a few models. No special STL features supported, just the basic format which is: 80 bytes of stuff-we-ignore int32 triangle count. float32s - 12 for each triangle - normal, vertex 1, vertex 2, vertex 3

Types

type alias Triangle =
{ normal : Vec3
, vertices : ( Vec3, Vec3, Vec3 )
}

A Triangle is a normal Vec3 and a triple of Vec3 for the vertices

type alias Triangles =
List Triangle

Triangles is a list of Triangle

Functions

binaryStl : Decoder Triangles

Binary decoder for Stl files.