new mapper(arg) → {vgl.mapper}
- Description:
Create a new instance of class mapper.
- Source:
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
arg |
object |
Properties
|
Returns:
- Type
- vgl.mapper
Methods
color() → {Array.<number>}
- Description:
Get solid color of the geometry.
- Source:
Returns:
- Type
- Array.<number>
computeBounds()
- Description:
Compute bounds of the data.
- Source:
deleteVertexBufferObjects(renderState)
- Description:
Delete cached VBO.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
geometryData() → {Array.<number>}
- Description:
Return stored geometry data.
- Source:
Returns:
- Type
- Array.<number>
getSourceBuffer(sourceName) → {Float32Array}
- Description:
Get the buffer used for a named source. If the current buffer isn't a Float32Array, it is converted to one. This array can then be modified directly, after which updateSourceBuffer can be called to update the GL array.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sourceName |
string | The name of the source to update. |
Returns:
An array used for this source.
- Type
- Float32Array
render(renderState, noUndoBindVertexData)
- Description:
Render the mapper.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState | The current rendering state object. |
noUndoBindVertexData |
boolean | If true, do not unbind vertex data. This may be desirable if the render function is subclassed. |
setGeometryData(geom)
- Description:
Connect mapper to its geometry data.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
geom |
Array.<number> |
undoBindVertexData(renderState)
- Description:
Unbind the vertex data.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
updateSourceBuffer(sourceName, values, renderState) → {boolean}
- Description:
Update the buffer used for a named source.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
sourceName |
string | The name of the source to update. |
values |
Array.<object> | Float32Array | The values to use for the source. If not specified, use the source's own buffer. |
renderState |
vgl.renderState |
Returns:
true if there was a context to update.
- Type
- boolean
(inner) cleanUpDrawObjects(renderState)
- Description:
Clear cache related to buffers.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
(inner) createVertexBufferObjects(renderState)
- Description:
Create new VBO for all its geometryData sources and primitives.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |
(inner) setupDrawObjects(renderState)
- Description:
Setup draw objects; Delete old ones and create new ones.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
renderState |
vgl.renderState |