Constructor
new HelperBase(renderer, geometryName, shaderName)
- Source:
Properties:
Name | Type | Description |
---|---|---|
renderer |
Lore.Renderer | An instance of Lore.Renderer. |
shader |
Lore.Shader | The shader associated with this helper. |
geometry |
Lore.Geometry | The geometry associated with this helper. |
Creates an instance of HelperBase.
Parameters:
Name | Type | Description |
---|---|---|
renderer |
Lore.Renderer | A Lore.Renderer object. |
geometryName |
String | The name of this geometry. |
shaderName |
String | The name of the shader used to render the geometry. |
Methods
destruct()
- Source:
Destructor for the helper (mainly used for OctreeHelpers to clean up events).
draw()
- Source:
Calls the draw method of the underlying geometry.
getAttribute(name) → {TypedArray}
- Source:
Get the value of an attribute (usually a typed array).
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the attribute. |
Returns:
Usually, a typed array containing the attribute values.
- Type
- TypedArray
setAttribute(name, data)
- Source:
Set the value (a typed array) of an attribute.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the attribute. |
data |
TypedArray | A typed array containing the attribute values. |
updateAttribute(name, index, value)
- Source:
Update a the value of an attribute at a specific index and marks the attribute as stale.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the attribute. |
index |
Number | The index of the value to be updated. |
value |
TypedArray | Usually, a typed array or array with the length of the attribute values (3 for x, y, z coordinates) containing the new values. |
updateAttributeAll(name, values)
- Source:
Updates all the values in the attribute and marks the attribute as stale.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The name of the attribute. |
values |
TypedArray | A typed array containing the new attribute values. |