A library containing geometry generators (like CubeGenerator, SphereGenerator and CylinderGenerator) and filters (BarycentricFilter, ColorFilter and InvertFilter).
Vector3List normals, Vector3List positions, Uint16List indices) → void
Generate vertex normals based on a list of
normalsis assumed to be zeroed out, and much match
indicesis assumed to represent a triangle list.
Vector4List tangents, Vector3List positions, Vector3List normals, Vector2List texCoords, Uint16List indices) → void
Generate vertex tangents based on a list of
tangentsis assumed to be zeroed out, and much match
indicesis assumed to represent a triangle list. Tangents are returned as Vector4s. The X, Y, and Z component represent the tangent and the W component represents the direction of the bitangent which can be generated as: vec4 bitangent = cross(normal, tangent.xyz) * tangent.w; Derived from the granddaddy of all tangent generation functions: http://www.terathon.com/code/tangent.html