Name | Type | Attributes | Default | Description |
---|---|---|---|---|
buffer |
number |
the id of the buffer that this attribute will look for |
||
size |
number | 0 |
the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2. |
|
normalized |
boolean | false |
should the data be normalized. |
|
type |
PIXI.TYPES |
<optional> |
PIXI.TYPES.FLOAT |
what type of number is the attribute. Check PIXI.TYPES to see the ones available |
stride |
number |
<optional> |
0 |
How far apart, in bytes, the start of each value is. (used for interleaving data) |
start |
number |
<optional> |
0 |
How far into the array to start reading values (used for interleaving data) |
instance |
boolean |
<optional> |
false |
Whether the geometry is instanced. |
Methods
PIXI.Attribute.from (buffer, size, normalized, type, stride) PIXI.Attribute static
Helper function that creates an Attribute based on the information provided
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
buffer |
number |
the id of the buffer that this attribute will look for |
||
size |
number |
<optional> |
0 |
the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2 |
normalized |
boolean |
<optional> |
false |
should the data be normalized. |
type |
PIXI.TYPES |
<optional> |
PIXI.TYPES.FLOAT |
what type of number is the attribute. Check PIXI.TYPES to see the ones available |
stride |
number |
<optional> |
0 |
How far apart, in bytes, the start of each value is. (used for interleaving data) |
Returns:
Type | Description |
---|---|
PIXI.Attribute |
|
Destroys the Attribute.