Class

Material

Material()

A material

Constructor

new Material()

Constructor

View Source Material/Material.js, line 9

Methods

static Create() → {Material}

Shortcut to create common materials

View Source Material/Material.js, line 40

A Material instance
Material

createPass(techniqueIndexopt, parametersopt) → {Pass}

Add a pass to a technique
Parameters:
Name Type Attributes Default Description
techniqueIndex number <optional>
0 Targeted technique's index (default: 0)
parameters Array.<Array> <optional>
An array of parameters

View Source Material/Material.js, line 65

A Pass instance.
Pass

createTechnique() → {number}

Create a new technique

View Source Material/Material.js, line 82

The technique index.
number

getActiveTechnique() → {number}

Get active technique's index

View Source Material/Material.js, line 101

A positive integer
number

getPass(techniqueIndex, passIndex) → (nullable) {Pass}

Get a pass
Parameters:
Name Type Description
techniqueIndex number Targeted technique's index
passIndex number Pass's index

View Source Material/Material.js, line 112

A Pass instance or null if the technique or the pass don't exist
Pass

getPassCount(techniqueIndex) → {number}

Get pass count
Parameters:
Name Type Default Description
techniqueIndex number 0 Targeted technique's index

View Source Material/Material.js, line 126

A signed integer
number

setActiveTechnique(techniqueIndex)

Set technique to use
Parameters:
Name Type Description
techniqueIndex number Targeted technique's index

View Source Material/Material.js, line 92