PIXI.Attribute

class Attribute

Holds the information for a single attribute structure required to render geometry.

This does not contain the actual data, but instead has a buffer id that maps to a PIXI.Buffer This can include anything from positions, uvs, normals, colors etc.

Constructor


new PIXI.Attribute(buffer: number, size: number, normalized: boolean, type: PIXI.TYPES, stride: number, start: number, instance: boolean) → {}
Parameters:
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.

Summary


Methods from Attribute

Public Methods


from Attribute.ts:48
static from(buffer: number, size: number, normalized: boolean, type: PIXI.TYPES, stride: number) → {PIXI.Attribute}

Helper function that creates an Attribute based on the information provided

Parameters:
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
destroy Attribute.ts:42
destroy() → {void}

Destroys the Attribute.

Returns:
Type Description
void

Powered by webdoc!