| 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 have 2 floats per vertex (eg position x and y) this would be 2. |
normalized |
Boolean | false |
optional
should the data be normalized. |
type |
Number | PIXI.TYPES.FLOAT |
optional
what type of number 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
-
PIXI.Attribute.from (buffer, size, normalized, start, type, stride)PIXI.Attribute static
-
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 0 optional the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2
normalizedBoolean false optional should the data be normalized.
startNumber 0 optional How far into the array to start reading values (used for interleaving data)
typeNumber PIXI.TYPES.FLOAT optional what type of number is the attribute. Check PIXI.TYPES to see the ones available
strideNumber 0 optional How far apart (in floats) the start of each value is. (used for interleaving data)
Returns:
Type Description PIXI.Attribute A new PIXI.Attribute based on the information provided -
Destroys the Attribute.