new PIXI.mesh.Attribute.Attribute(buffer, size, normalised, type, stride, start)
| Name | Type | Default | Description |
|---|---|---|---|
buffer |
string |
the id of the buffer that this attribute will look for |
|
size |
Number | 0 |
optional
the size of the attribute. If you hava 2 floats per vertex (eg position x and y) this would be 2. |
normalised |
Boolean | false |
optional
should the data be normalised. |
type |
Number | PIXI.TYPES.FLOAT |
optional
what type of numbe is the attribute. Check {PIXI.TYPES} to see the ones available |
stride |
Number | 0 |
optional
How far apart (in floats) the start of each value is. (used for interleaving data) |
start |
Number | 0 |
optional
How far into the array to start reading values (used for interleaving data) |
Methods
-
staticPIXI.mesh.Attribute.Attribute.from(buffer, size, stride, start, normalised){PIXI.mesh.Attribute}
-
Helper function that creates an Attribute based on the information provided
Name Type Default Description bufferstring the id of the buffer that this attribute will look for
sizeNumber 2 optional the size of the attribute. If you hava 2 floats per vertex (eg position x and y) this would be 2
strideNumber 0 optional How far apart (in floats) the start of each value is. (used for interleaving data)
startNumber 0 optional How far into the array to start reading values (used for interleaving data)
normalisedBoolean false optional should the data be normalised.
Returns:
Type Description PIXI.mesh.Attribute A new {PIXI.mesh.Attribute} based on the information provided -
destroy()
-
Destroys the Attribute.