API Reference

Class List

pc.VertexIteratorAccessor

Helps with accessing a specific vertex attribute.

Summary

Methods

get

Get a attribute component at the current index.

set

Set all the attribute components at the current index.

Details

Constructor

VertexIteratorAccessor(buffer, vertexElement)

Returns a new pc.VertexIteratorAccessor object.

Parameters

bufferArrayBuffer

The vertex buffer containing the attribute to be accessed.

vertexElementpc.VertexAttributeElement

The vertex attribute to be accessed.

Methods

get(offset)

Get a attribute component at the current index.

Parameters

offsetnumber

The component offset. Should be either 0, 1, 2, or 3.

Returns

number

The value of a attribute component.

set(a, [b], [c], [d])

Set all the attribute components at the current index.

Parameters

anumber

The first component value.

bnumber

The second component value (if applicable).

cnumber

The third component value (if applicable).

dnumber

The fourth component value (if applicable).