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.

Memberof

PIXI

Constructors

  • Parameters

    • buffer: number

      the id of the buffer that this attribute will look for

    • Optional size: number

      the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2.

    • Optional normalized: boolean

      should the data be normalized.

    • Optional type: TYPES

      what type of number is the attribute. Check PIXI.TYPES to see the ones available

    • Optional stride: number

      How far apart, in bytes, the start of each value is. (used for interleaving data)

    • Optional start: number

      How far into the array to start reading values (used for interleaving data)

    • Optional instance: boolean

      Whether the geometry is instanced.

    • Optional divisor: number

      Divisor to use when doing instanced rendering

    Returns Attribute

Properties

buffer: number
divisor: number
instance: boolean
normalized: boolean
size: number
start: number
stride: number
type: TYPES

Methods

  • Destroys the Attribute.

    Returns void

  • Helper function that creates an Attribute based on the information provided

    Parameters

    • buffer: number

      the id of the buffer that this attribute will look for

    • Optional size: number

      the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2

    • Optional normalized: boolean

      should the data be normalized.

    • Optional type: TYPES

      what type of number is the attribute. Check PIXI.TYPES to see the ones available

    • Optional stride: number

      How far apart, in bytes, the start of each value is. (used for interleaving data)

    Returns Attribute

    • A new PIXI.Attribute based on the information provided

Generated using TypeDoc