VertexFormat

external class VertexFormat(options: Any? = definedExternally)(source)

A vertex format defines what attributes make up a vertex. A VertexFormat can be provided to a Geometry to request that certain properties be computed, e.g., just position, position and normal, etc.

// Create a vertex format with position and 2D texture coordinate attributes.
const format = new VertexFormat({
position : true,
st : true
});

Parameters

options

An object with boolean properties corresponding to VertexFormat properties as shown in the code example.

See also

Constructors

Link copied to clipboard
constructor(options: Any? = definedExternally)

Types

Link copied to clipboard

Properties

Link copied to clipboard

When true, the vertex has a bitangent attribute (normalized), which is used for tangent-space effects like bump mapping.

Link copied to clipboard

When true, the vertex has an RGB color attribute.

Link copied to clipboard

When true, the vertex has a normal attribute (normalized), which is commonly used for lighting.

Link copied to clipboard

When true, the vertex has a 3D position attribute.

Link copied to clipboard
var st: Boolean

When true, the vertex has a 2D texture coordinate attribute.

Link copied to clipboard

When true, the vertex has a tangent attribute (normalized), which is used for tangent-space effects like bump mapping.