Table Of Contents

Previous topic

20.28. The LoadingScreen Object

Next topic

20.30. The MathDeviceConvert Object

This Page

20.29. The Material Object

The Material object defines the appearance of a rendered object. It has a TechniqueParameters property and a meta property for additional information used by the renderers.

Required scripts

The Material object requires:

/*{{ javascript("jslib/material.js") }}*/
/*{{ javascript("jslib/utilities.js") }}*/

20.29.1. Constructor

20.29.1.1. create

Summary

Creates and returns a Material object.

Syntax

var material = Material.create(graphicsDevice);
graphicsDevice
The GraphicsDevice object to be used.

20.29.2. Methods

20.29.2.1. getName

Summary

Gets the name of the material.

Syntax

var name = Material.getName();

20.29.3. Properties

20.29.3.1. techniqueParameters

Summary

The TechniqueParameters object.

Syntax

material.techniqueParameters.materialColor = color;

20.29.3.2. meta

Summary

The meta object. See the rendering documentation for valid values.

Syntax

material.meta.transparent = true;