new Buffer(gl, object3D, shader, attributes, uniforms, drawMode)
Creates new buffer for object3D
Parameters:
Name | Type | Description |
---|---|---|
gl |
Object | |
object3D |
Ayce.Object3D | |
shader |
Ayce.Shader | |
attributes |
Array | |
uniforms |
Array | |
drawMode |
Number |
- Source:
Methods
activateTextures(gl, samplerUniform, textures)
Activates and binds texture
Parameters:
Name | Type | Description |
---|---|---|
gl |
Object | |
samplerUniform |
String | |
textures |
Array.<Object> |
- Source:
init()
*******************************************
Buffer initialization
*******************************************
- Source:
loadTexture(gl, source, clampToEdge) → {Object}
Description
Parameters:
Name | Type | Description |
---|---|---|
gl |
Object | |
source |
Object | |
clampToEdge |
Boolean |
- Source:
Returns:
texture
- Type
- Object
pushData(array, values, index, numItems)
Adds data to interlaced Array
Parameters:
Name | Type | Description |
---|---|---|
array |
Array | |
values |
Array.<Number> | |
index |
Number | |
numItems |
Number |
- Source:
render()
Renders buffer
- Source:
setupAttribPointer(gl, attribute, numValues, stride, offset)
Enables attribute and sets attribute pointer
Parameters:
Name | Type | Description |
---|---|---|
gl |
Object | |
attribute |
Number | |
numValues |
Number | |
stride |
Number | |
offset |
Number |
- Source:
update()
*******************************************
Render function
*******************************************
- Source:
(inner) areTexturesLoaded(currentStatus, textures) → {Boolean}
Indicates if all textures are done loading
Parameters:
Name | Type | Description |
---|---|---|
currentStatus |
Boolean | |
textures |
Array.<Object> |
- Source:
Returns:
currentStatus
- Type
- Boolean