Utils
Generic utils
Static Method Summary
Static Public Methods | ||
public static |
calculateBytesUsed(settings: *, nrVertices: *, nrColors: *, nrIndices: *, nrLineIndices: *, nrNormals: *): * |
|
public static |
createBuffer(gl: *, data: *, numElements: *, bufferType: *, components: *, srcStart: *, attribType: *, js_type: *): * Create a new GPU buffer, keep in mind that some extra attributes are being set on the returned GLBuffer object |
|
public static |
createEmptyBuffer(gl: *, numElements: *, bufferType: *, components: *, attribType: *, js_type: *): * Create a new GPU empty buffer, keep in mind that some extra attributes are being set on the returned GLBuffer object. |
|
public static |
createIndexBuffer(gl: *, data: *, n: *): * |
|
public static |
createLineIndexBuffer(gl: *, data: *, n: *): * |
|
public static |
emptyAabb(): * |
|
public static |
getLargestEdge(width: *, height: *, depth: *): * |
|
public static |
getLargestFaceArea(width: *, height: *, depth: *): * |
|
public static |
glTypeToTypedArray(glType: *): * |
|
public static |
growAabb(aabb: *, pnt: *) |
|
public static |
hash(input: *): * |
|
public static |
isEmptyAabb(aabb: *): * |
|
public static |
octDecodeVec2(oct: *): undefined[] |
|
public static |
request(options: *): * |
|
public static |
sortMapKeys(inputMap: *): * |
|
public static |
toArray(input: *): * Converts the given mat/vec to an array |
|
public static |
transformBounds(inputBounds: *, translation: *): * |
|
public static |
typedArrayToGlType(typedArrayType: *): * |
|
public static |
unionAabb(a: *, b: *): * |
|
public static |
updateBuffer(gl: *, targetGlBuffer: *, data: *, pos: *, numElements: *) Update a GPU buffer |
Static Public Methods
public static calculateBytesUsed(settings: *, nrVertices: *, nrColors: *, nrIndices: *, nrLineIndices: *, nrNormals: *): * source
Params:
Name | Type | Attribute | Description |
settings | * | ||
nrVertices | * | ||
nrColors | * | ||
nrIndices | * | ||
nrLineIndices | * | ||
nrNormals | * |
Return:
* |
public static createBuffer(gl: *, data: *, numElements: *, bufferType: *, components: *, srcStart: *, attribType: *, js_type: *): * source
Create a new GPU buffer, keep in mind that some extra attributes are being set on the returned GLBuffer object
Params:
Name | Type | Attribute | Description |
gl | * | ||
data | * | ||
numElements | * | ||
bufferType | * | ||
components | * | ||
srcStart | * | ||
attribType | * | ||
js_type | * |
Return:
* |
public static createEmptyBuffer(gl: *, numElements: *, bufferType: *, components: *, attribType: *, js_type: *): * source
Create a new GPU empty buffer, keep in mind that some extra attributes are being set on the returned GLBuffer object. This method is usually used in order to create buffers that will be later be filled by calls to bufferSubData (via Utils.updateBuffer)
Params:
Name | Type | Attribute | Description |
gl | * | ||
numElements | * | ||
bufferType | * | ||
components | * | ||
attribType | * | ||
js_type | * |
Return:
* |
public static createIndexBuffer(gl: *, data: *, n: *): * source
Params:
Name | Type | Attribute | Description |
gl | * | ||
data | * | ||
n | * |
Return:
* |
public static createLineIndexBuffer(gl: *, data: *, n: *): * source
Params:
Name | Type | Attribute | Description |
gl | * | ||
data | * | ||
n | * |
Return:
* |
public static getLargestEdge(width: *, height: *, depth: *): * source
Params:
Name | Type | Attribute | Description |
width | * | ||
height | * | ||
depth | * |
Return:
* |
public static getLargestFaceArea(width: *, height: *, depth: *): * source
Params:
Name | Type | Attribute | Description |
width | * | ||
height | * | ||
depth | * |
Return:
* |
public static glTypeToTypedArray(glType: *): * source
Params:
Name | Type | Attribute | Description |
glType | * |
Return:
* |
public static growAabb(aabb: *, pnt: *) source
Params:
Name | Type | Attribute | Description |
aabb | * | ||
pnt | * |
public static request(options: *): * source
Params:
Name | Type | Attribute | Description |
options | * |
Return:
* |
public static sortMapKeys(inputMap: *): * source
Params:
Name | Type | Attribute | Description |
inputMap | * |
Return:
* |
public static toArray(input: *): * source
Converts the given mat/vec to an array
Params:
Name | Type | Attribute | Description |
input | * |
Return:
* |
public static transformBounds(inputBounds: *, translation: *): * source
Params:
Name | Type | Attribute | Description |
inputBounds | * | ||
translation | * |
Return:
* |
public static typedArrayToGlType(typedArrayType: *): * source
Params:
Name | Type | Attribute | Description |
typedArrayType | * |
Return:
* |
public static unionAabb(a: *, b: *): * source
Params:
Name | Type | Attribute | Description |
a | * | ||
b | * |
Return:
* |
public static updateBuffer(gl: *, targetGlBuffer: *, data: *, pos: *, numElements: *) source
Update a GPU buffer
Params:
Name | Type | Attribute | Description |
gl | * | ||
targetGlBuffer | * | ||
data | * | ||
pos | * | ||
numElements | * |