[page:Material] →

[name]

A material for shiny surfaces, evaluated per pixel.

Constructor

[name]([page:todo parameters])

parameters -- A JSON object with settable parameters.
Example:
materials.push( new THREE.MeshPhongMaterial( { ambient: 0x030303, color: 0xdddddd, specular: 0x009900, shininess: 30, shading: THREE.FlatShading } ) );

Properties

See the base [page:Material] class for common parameters.

.[page:Color color]

Diffuse color of the material. Default is white.

.[page:Color ambient]

Ambient color of the material, multiplied by the color of the [page:AmbientLight]. Default is white.

.[page:Color emissive]

Emissive (light) color of the material, essentially a solid color unaffected by other lighting. Default is black.

.[page:Color specular]

Specular color of the material, i.e., how shiny the material is and the color of its shine. Setting this the same color as the diffuse value (times some intensity) makes the material more metallic-looking; setting this to some gray makes the material look more plastic. Default is dark gray.

.[page:Float shininess]

How shiny the specular highlight is; a higher value gives a sharper highlight. Default is *30*.

.[page:Integer shading]

How the triangles of a curved surface are rendered: as a smooth surface, as flat separate facets, or no shading at all.
Options are [page:Materials THREE.SmoothShading] (default), [page:Materials THREE.FlatShading], [page:Materials THREE.NoShading].

.[page:Boolean wireframe]

Whether the triangles' edges are displayed instead of surfaces. Default is *false*.

.[page:Float wireframeLinewidth]

Line thickness for wireframe mode. Default is *1.0*.
Due to limitations in the ANGLE layer, on Windows platforms linewidth will always be 1 regardless of the set value.

.[page:String wireframeLinecap]

Define appearance of line ends. Possible values are "butt", "round" and "square". Default is 'round'.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.

.[page:String wireframeLinejoin]

Define appearance of line joints. Possible values are "round", "bevel" and "miter". Default is 'round'.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:WebGLRenderer WebGL] renderer, but does work with the [page:CanvasRenderer Canvas] renderer.

.[page:Integer vertexColors]

Define how the vertices gets colored. Possible values are THREE.NoColors, THREE.FaceColors and THREE.VertexColors. Default is THREE.NoColors.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.

.[page:Boolean fog]

Define whether the material color is affected by global fog settings. Default is *true*.
This setting might not have any effect when used with certain renderers. For example, it is ignored with the [page:CanvasRenderer Canvas] renderer, but does work with the [page:WebGLRenderer WebGL] renderer.

.[page:Texture map]

Set color texture map. Default is null.

.[page:Texture lightMap]

Set light map. Default is null.

.[page:Texture specularMap]

The specular map value affects both how much the specular surface highlight contributes and how much of the environment map affects the surface. Default is null.

.[page:TextureCube envMap]

Set env map. Default is null.

.[page:Float reflectivity]

How much the environment map affects the surface; also see "combine".

.[page:Float refractionRatio]

The index of refraction for an environment map using [page:Textures THREE.CubeRefractionMapping]. Default is *0.98*.

.[page:Integer combine]

How to combine the result of the surface's color with the environment map, if any.
Options are [page:Textures THREE.MultiplyOperation] (default), [page:Textures THREE.MixOperation], [page:Textures THREE.AddOperation]. If mix is chosen, the reflectivity is used to blend between the two colors.

.[page:Boolean skinning]

Define whether the material uses skinning. Default is *false*.

.[page:Boolean morphTargets]

Define whether the material uses morphTargets. Default is *false*.

.[page:Vector2 normalScale]

todo

.[page:boolean morphNormals]

todo

.[page:boolean metal]

todo

.[page:number bumpScale]

todo

.[page:boolean wrapAround]

todo

.[page:boolean perPixel]

todo

.[page:object normalMap]

todo

.[page:object bumpMap]

todo

.[page:Vector3 wrapRGB]

todo

Methods

Source

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