API Reference

Class List

pc.VertexAttributeElement

Summary

Properties

dataType

The data type of the attribute.

name

The meaning of the vertex element.

normalize

If true, vertex attribute data will be mapped from a 0 to 255 range down to 0 to 1 when fed to a shader.

numComponents

The number of components of the vertex attribute.

offset

The number of initial bytes at the start of a vertex that are not relevant to this attribute.

scopeId

The shader input variable corresponding to the attribute.

size

The size of the attribute in bytes.

stride

The number of total bytes that are between the start of one vertex, and the start of the next.

Details

Constructor

VertexAttributeElement(name, numComponents, dataType, normalize, offset, stride, scopeId, size)

Interface of a vertex attribute element in pc.VertexFormat.

Parameters

namestring

The meaning of the vertex element. This is used to link the vertex data to a shader input. Can be:

If vertex data has a meaning other that one of those listed above, use the user-defined semantics: pc.SEMANTIC_ATTR0 to pc.SEMANTIC_ATTR15.

numComponentsnumber

The number of components of the vertex attribute. Can be 1, 2, 3 or 4.

dataTypenumber

The data type of the attribute. Can be:

normalizeboolean

If true, vertex attribute data will be mapped from a 0 to 255 range down to 0 to 1 when fed to a shader. If false, vertex attribute data is left unchanged. If this property is unspecified, false is assumed.

offsetnumber

The number of initial bytes at the start of a vertex that are not relevant to this attribute.

stridenumber

The number of total bytes that are between the start of one vertex, and the start of the next.

scopeIdpc.ScopeId

The shader input variable corresponding to the attribute.

sizenumber

The size of the attribute in bytes.

Properties

stringname

The meaning of the vertex element. This is used to link the vertex data to a shader input. Can be:

If vertex data has a meaning other that one of those listed above, use the user-defined semantics: pc.SEMANTIC_ATTR0 to pc.SEMANTIC_ATTR15.

booleannormalize

If true, vertex attribute data will be mapped from a 0 to 255 range down to 0 to 1 when fed to a shader. If false, vertex attribute data is left unchanged. If this property is unspecified, false is assumed.

numbernumComponents

The number of components of the vertex attribute. Can be 1, 2, 3 or 4.

numberoffset

The number of initial bytes at the start of a vertex that are not relevant to this attribute.

pc.ScopeIdscopeId

The shader input variable corresponding to the attribute.

numbersize

The size of the attribute in bytes.

numberstride

The number of total bytes that are between the start of one vertex, and the start of the next.