[page:Material] → [page:MeshPhongMaterial] →

[name]

An extension of the [page:MeshPhongMaterial] with toon shading.

Examples

[example:webgl_materials_variations_toon materials / variations / toon]

Constructor

[name]( [param:Object parameters] )

[page: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 [page:Material] and [page:MeshStandardMaterial]) can be passed in here.

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

Properties

See the base [page:Material] and [page:MeshPhongMaterial] classes for common properties.

[property:Texture gradientMap]

Gradient map for the toon shading. Default is *null*.

[property:Boolean isMeshToonMaterial]

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.

[property:Object defines]

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

Methods

See the base [page:Material] and [page:MeshPhongMaterial] classes for common methods.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]