luma.gl/dev-docs/tech-docs-wip/README-models.md

1.2 KiB

These docs are work in progress

Geometry Module

A geometry holds a set of attributes (native JavaScript arrays) (vertices, normals, texCoords, indices) and a drawType.

Class Description
Geometry Base class, holds vertex attributes and drawType
ConeGeometry Vertex attributes for a cone
CubeGeometry Vertex attributes for a cube
IcoSphereGeometry Vertex attributes for an icosahedron
PlaneGeometry Vertex attributes for a plane
SphereGeometry Vertex attributes for a sphere
SphereGeometry Vertex attributes for a sphere

It should be fairly straightforward to use other primitives, e.g. from npm modules. As long as you have a number of attributes you can wrap them in a Geometry or set them directly on a Model or a Program.