MaterialMeshPhongMaterial

MeshToonMaterial

An extension of the MeshPhongMaterial with toon shading.

Examples

materials / variations / toon

Constructor

MeshToonMaterial(parameters : Object)

parameters - (optional) an object with one or more properties defining the material's appearance. Any property of the material (including any property inherited from Material and MeshStandardMaterial) can be passed in here.

The exception is the property color, which can be passed in as a hexadecimal string and is 0xffffff (white) by default. Color.set(color) is called internally.

Properties

See the base Material and MeshPhongMaterial classes for common properties.

.gradientMap : Texture

Gradient map for the toon shading. Default is null.

.isMeshToonMaterial : Boolean

Used to check whether this or derived classes are mesh toon materials. Default is true.

You should not change this, as it used internally for optimisation.

.defines : Object

An object of the form: { 'TOON': '' }; This is used by the WebGLRenderer for selecting shaders.

Methods

See the base Material and MeshPhongMaterial classes for common methods.

Source

For more info on how to obtain the source code of this module see this page.