Dart DocumentationthreeMeshPhongMaterial

MeshPhongMaterial class

class MeshPhongMaterial extends Material implements ITextureMapMaterial {

 Color color;
 Color ambient;
 Color emissive;
 Color specular;
 num shininess;

 bool metal;
 bool perPixel;

 bool wrapAround;
 Vector3 wrapRGB;

 Texture map;

 var lightMap;

 var bumpMap;
 num bumpScale;

 var normalMap = null;
 var normalScale;

 var specularMap;

 var envMap;
 int combine;
 num reflectivity;
 num refractionRatio;

 int shading;

 bool wireframe;
 num wireframeLinewidth;
 var wireframeLinecap;
 var wireframeLinejoin;

 bool skinning;
 bool morphTargets;
 bool morphNormals;

 int vertexColors;
 bool fog;

 MeshPhongMaterial( { // MeshLambertMaterial

                      num color: 0xffffff, //emissive
                      num ambient: 0xffffff,
                      num emissive: 0x000000,
                      num specular: 0x111111,

                      this.map,

                      this.shininess: 30,

                      this.metal: false,
                      this.perPixel: false,

                      this.wrapAround: false,
                      Vector3 wrapRGB,

                      this.lightMap,
                      this.specularMap,
                      this.envMap,

                      this.bumpMap,
                      this.bumpScale: 1,

                      this.normalMap: null,
                      this.normalScale,

                      this.combine: MultiplyOperation,
                      this.reflectivity: 1,
                      this.refractionRatio: 0.98,

                      this.shading: SmoothShading,

                      this.vertexColors: NoColors,

                      this.fog: true,

                      this.wireframe: false,
                      this.wireframeLinewidth: 1,
                      this.wireframeLinecap: 'round',
                      this.wireframeLinejoin: 'round',

                      this.skinning: false,
                      this.morphTargets: false,
                      this.morphNormals: false,

                      // Material
                      name: '',
                      side: FrontSide,

                      opacity: 1,
                      transparent: false,

                      blending: NormalBlending,
                      blendSrc: SrcAlphaFactor,
                      blendDst: OneMinusSrcAlphaFactor,
                      blendEquation: AddEquation,

                      depthTest: true,
                      depthWrite: true,

                      polygonOffset: false,
                      polygonOffsetFactor: 0,
                      polygonOffsetUnits:  0,

                      alphaTest: 0,

                      overdraw: false,

                      visible: true })
                      :
                        this.color = new Color(color),
                        this.ambient = new Color(ambient),
                        this.emissive = new Color(emissive),
                        this.specular = new Color(specular),

                        this.wrapRGB = wrapRGB == null ? new Vector3( 1.0, 1.0, 1.0 ) : wrapRGB,

                            super(  name: name,
                                side: side,
                                opacity: opacity,
                                transparent: transparent,
                                blending: blending,
                                blendSrc: blendSrc,
                                blendDst: blendDst,
                                blendEquation: blendEquation,
                                depthTest: depthTest,
                                depthWrite: depthWrite,
                                polygonOffset: polygonOffset,
                                polygonOffsetFactor: polygonOffsetFactor,
                                polygonOffsetUnits: polygonOffsetUnits,
                                alphaTest: alphaTest,
                                overdraw: overdraw,
                                visible: visible ) {
                          if (normalScale == null) { normalScale = new Vector2( 1.0, 1.0 ); }
                        }

}

Extends

Material > MeshPhongMaterial

Implements

ITextureMapMaterial

Constructors

new MeshPhongMaterial({num color: 0xffffff, num ambient: 0xffffff, num emissive: 0x000000, num specular: 0x111111, Texture map, num shininess: 30, bool metal: false, bool perPixel: false, bool wrapAround: false, Vector3 wrapRGB, lightMap, specularMap, envMap, bumpMap, num bumpScale: 1, normalMap: null, normalScale, int combine: MultiplyOperation, num reflectivity: 1, num refractionRatio: 0.98, int shading: SmoothShading, int vertexColors: NoColors, bool fog: true, bool wireframe: false, num wireframeLinewidth: 1, wireframeLinecap: 'round', wireframeLinejoin: 'round', bool skinning: false, bool morphTargets: false, bool morphNormals: false, name: '', side: FrontSide, opacity: 1, transparent: false, blending: NormalBlending, blendSrc: SrcAlphaFactor, blendDst: OneMinusSrcAlphaFactor, blendEquation: AddEquation, depthTest: true, depthWrite: true, polygonOffset: false, polygonOffsetFactor: 0, polygonOffsetUnits: 0, alphaTest: 0, overdraw: false, visible: true}) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
MeshPhongMaterial( { // MeshLambertMaterial

                    num color: 0xffffff, //emissive
                    num ambient: 0xffffff,
                    num emissive: 0x000000,
                    num specular: 0x111111,

                    this.map,

                    this.shininess: 30,

                    this.metal: false,
                    this.perPixel: false,

                    this.wrapAround: false,
                    Vector3 wrapRGB,

                    this.lightMap,
                    this.specularMap,
                    this.envMap,

                    this.bumpMap,
                    this.bumpScale: 1,

                    this.normalMap: null,
                    this.normalScale,

                    this.combine: MultiplyOperation,
                    this.reflectivity: 1,
                    this.refractionRatio: 0.98,

                    this.shading: SmoothShading,

                    this.vertexColors: NoColors,

                    this.fog: true,

                    this.wireframe: false,
                    this.wireframeLinewidth: 1,
                    this.wireframeLinecap: 'round',
                    this.wireframeLinejoin: 'round',

                    this.skinning: false,
                    this.morphTargets: false,
                    this.morphNormals: false,

                    // Material
                    name: '',
                    side: FrontSide,

                    opacity: 1,
                    transparent: false,

                    blending: NormalBlending,
                    blendSrc: SrcAlphaFactor,
                    blendDst: OneMinusSrcAlphaFactor,
                    blendEquation: AddEquation,

                    depthTest: true,
                    depthWrite: true,

                    polygonOffset: false,
                    polygonOffsetFactor: 0,
                    polygonOffsetUnits:  0,

                    alphaTest: 0,

                    overdraw: false,

                    visible: true })
                    :
                      this.color = new Color(color),
                      this.ambient = new Color(ambient),
                      this.emissive = new Color(emissive),
                      this.specular = new Color(specular),

                      this.wrapRGB = wrapRGB == null ? new Vector3( 1.0, 1.0, 1.0 ) : wrapRGB,

                          super(  name: name,
                              side: side,
                              opacity: opacity,
                              transparent: transparent,
                              blending: blending,
                              blendSrc: blendSrc,
                              blendDst: blendDst,
                              blendEquation: blendEquation,
                              depthTest: depthTest,
                              depthWrite: depthWrite,
                              polygonOffset: polygonOffset,
                              polygonOffsetFactor: polygonOffsetFactor,
                              polygonOffsetUnits: polygonOffsetUnits,
                              alphaTest: alphaTest,
                              overdraw: overdraw,
                              visible: visible ) {
                        if (normalScale == null) { normalScale = new Vector2( 1.0, 1.0 ); }
                      }

Properties

num alphaTest #

inherited from Material
num alphaTest

Color ambient #

Color ambient

int blendDst #

inherited from Material
int blending, blendSrc, blendDst

int blendEquation #

inherited from Material
int blending, blendSrc, blendDst, blendEquation

int blending #

inherited from Material
int blending

int blendSrc #

inherited from Material
int blending, blendSrc

var bumpMap #

var bumpMap

num bumpScale #

num bumpScale

Color color #

Color color

int combine #

int combine

bool depthTest #

inherited from Material
bool transparent, depthTest

bool depthWrite #

inherited from Material
bool transparent, depthTest, depthWrite

Color emissive #

Color emissive

var envMap #

var envMap

bool fog #

bool fog

int id #

inherited from Material
int id

var lightMap #

var lightMap

Texture map #

Texture map

bool metal #

bool metal

bool morphNormals #

bool morphNormals

bool morphTargets #

bool morphTargets

String name #

inherited from Material
String name

bool needsUpdate #

inherited from Material
bool needsUpdate

var normalMap #

var normalMap = null

var normalScale #

var normalScale

num opacity #

inherited from Material
num opacity

bool overdraw #

inherited from Material
bool transparent, depthTest, depthWrite, overdraw

bool perPixel #

bool perPixel

bool polygonOffset #

inherited from Material
bool polygonOffset

int polygonOffsetFactor #

inherited from Material
int polygonOffsetFactor

int polygonOffsetUnits #

inherited from Material
int polygonOffsetFactor, polygonOffsetUnits

num reflectivity #

num reflectivity

num refractionRatio #

num refractionRatio

int shading #

int shading

num shininess #

num shininess

int side #

inherited from Material
int side

bool skinning #

bool skinning

Color specular #

Color specular

var specularMap #

var specularMap

bool transparent #

inherited from Material
bool transparent

int vertexColors #

int vertexColors

bool visible #

inherited from Material
bool visible

bool wireframe #

bool wireframe

var wireframeLinecap #

var wireframeLinecap

var wireframeLinejoin #

var wireframeLinejoin

num wireframeLinewidth #

num wireframeLinewidth

bool wrapAround #

bool wrapAround

Vector3 wrapRGB #

Vector3 wrapRGB

Operators

dynamic operator [](String key) #

inherited from Material
operator [] (String key) => _data[key];

dynamic operator []=(String key, value) #

inherited from Material
operator []= (String key, value) => _data[key] = value;