VertexFormat

VertexFormat

new

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.

Parameters:
Name Type Argument Default Description
options Object <optional>
undefined An object with boolean properties corresponding to VertexFormat properties as shown in the code example.
Example
// Create a vertex format with position and 2D texture coordinate attributes.
var format = new VertexFormat({
  position : true,
  st : true
});
See:
Source:

Members

:Boolean

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

32-bit floating-point. 3 components per attribute.

Default Value:
  • false

:GeometryAttribute

The binormal attribute (normalized), which is used for tangent-space effects like bump mapping.

32-bit floating-point. 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

32-bit floating-point. 3 components per attribute.

Default Value:
  • false

:GeometryAttribute

The normal attribute (normalized), which is commonly used for lighting.

32-bit floating-point. 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

64-bit floating-point (for precision). 3 components per attribute.

Default Value:
  • false

:GeometryAttribute

The 3D position attribute.

64-bit floating-point (for precision). 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

32-bit floating-point. 2 components per attribute

Default Value:
  • false

:GeometryAttribute

The 2D texture coordinate attribute.

32-bit floating-point. 2 components per attribute

Default Value:
  • undefined

:GeometryAttribute

The tangent attribute (normalized), which is used for tangent-space effects like bump mapping.

32-bit floating-point. 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

32-bit floating-point. 3 components per attribute.

Default Value:
  • false

<static>

An immutable vertex format with all well-known attributes: position, normal, st, binormal, and tangent.
See:

<static>

An immutable vertex format with position, normal, and st attributes. This is compatible with most appearances and materials; however normal and st attributes are not always required. When this is known in advance, another VertexFormat should be used.
See:

<static>

An immutable vertex format with position and normal attributes. This is compatible with per-instance color appearances like PerInstanceColorAppearance.
See:

<static>

An immutable vertex format with position and st attributes. This is compatible with EllipsoidSurfaceAppearance.
See:

<static>

An immutable vertex format with position, normal, and st attributes. This is compatible with MaterialAppearance when MaterialAppearance#materialSupport is TEXTURED/code>.
See:

<static>

An immutable vertex format with only a position attribute.
See:

VertexFormat

new

Attributes, which make up a geometry's vertices. Each property in this object corresponds to a GeometryAttribute containing the attribute's data.

Attributes are always stored non-interleaved in a Geometry. When geometry is prepared for rendering with Context#createVertexArrayFromGeometry, attributes are generally written interleaved into the vertex buffer for better rendering performance.

Source:

Members

:Boolean

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

32-bit floating-point. 3 components per attribute.

Default Value:
  • false

:GeometryAttribute

The binormal attribute (normalized), which is used for tangent-space effects like bump mapping.

32-bit floating-point. 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

32-bit floating-point. 3 components per attribute.

Default Value:
  • false

:GeometryAttribute

The normal attribute (normalized), which is commonly used for lighting.

32-bit floating-point. 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

64-bit floating-point (for precision). 3 components per attribute.

Default Value:
  • false

:GeometryAttribute

The 3D position attribute.

64-bit floating-point (for precision). 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

32-bit floating-point. 2 components per attribute

Default Value:
  • false

:GeometryAttribute

The 2D texture coordinate attribute.

32-bit floating-point. 2 components per attribute

Default Value:
  • undefined

:GeometryAttribute

The tangent attribute (normalized), which is used for tangent-space effects like bump mapping.

32-bit floating-point. 3 components per attribute.

Default Value:
  • undefined

:Boolean

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

32-bit floating-point. 3 components per attribute.

Default Value:
  • false

<static>

An immutable vertex format with all well-known attributes: position, normal, st, binormal, and tangent.
See:

<static>

An immutable vertex format with position, normal, and st attributes. This is compatible with most appearances and materials; however normal and st attributes are not always required. When this is known in advance, another VertexFormat should be used.
See:

<static>

An immutable vertex format with position and normal attributes. This is compatible with per-instance color appearances like PerInstanceColorAppearance.
See:

<static>

An immutable vertex format with position and st attributes. This is compatible with EllipsoidSurfaceAppearance.
See:

<static>

An immutable vertex format with position, normal, and st attributes. This is compatible with MaterialAppearance when MaterialAppearance#materialSupport is TEXTURED/code>.
See:

<static>

An immutable vertex format with only a position attribute.
See:
Documentation generated by JSDoc 3 on Thu Aug 01 2013 13:42:00 GMT-0400 (EDT)