提交 3524fdca 编写于 作者: M Mr.doob

Materials: Promoted lights.

上级 8fb84d74
......@@ -24,6 +24,7 @@ THREE.LineBasicMaterial = function ( parameters ) {
this.linecap = 'round';
this.linejoin = 'round';
this.lights = false;
this.setValues( parameters );
......
......@@ -27,6 +27,8 @@ THREE.LineDashedMaterial = function ( parameters ) {
this.dashSize = 3;
this.gapSize = 1;
this.lights = false;
this.setValues( parameters );
};
......
......@@ -13,6 +13,7 @@ THREE.Material = function () {
this.type = 'Material';
this.fog = true;
this.lights = true;
this.blending = THREE.NormalBlending;
this.side = THREE.FrontSide;
......@@ -249,6 +250,7 @@ THREE.Material.prototype = {
this.name = source.name;
this.fog = source.fog;
this.lights = source.lights;
this.blending = source.blending;
this.side = source.side;
......
......@@ -61,6 +61,8 @@ THREE.MeshBasicMaterial = function ( parameters ) {
this.skinning = false;
this.morphTargets = false;
this.lights = false;
this.setValues( parameters );
};
......
......@@ -44,6 +44,7 @@ THREE.MeshDepthMaterial = function ( parameters ) {
this.wireframeLinewidth = 1;
this.fog = false;
this.lights = false;
this.setValues( parameters );
......
......@@ -19,6 +19,7 @@ THREE.MeshNormalMaterial = function ( parameters ) {
this.wireframeLinewidth = 1;
this.fog = false;
this.lights = false;
this.morphTargets = false;
this.setValues( parameters );
......
......@@ -25,6 +25,8 @@ THREE.PointsMaterial = function ( parameters ) {
this.size = 1;
this.sizeAttenuation = true;
this.lights = false;
this.setValues( parameters );
};
......
......@@ -41,7 +41,6 @@ THREE.ShaderMaterial = function ( parameters ) {
this.clipping = false; // set to use user-defined clipping planes
this.skinning = false; // set to use skinning attribute streams
this.morphTargets = false; // set to use morph targets
this.morphNormals = false; // set to use morph normals
......
......@@ -23,6 +23,7 @@ THREE.SpriteMaterial = function ( parameters ) {
this.rotation = 0;
this.fog = false;
this.lights = false;
this.setValues( parameters );
......
......@@ -1653,10 +1653,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
if ( material instanceof THREE.MeshPhongMaterial ||
material instanceof THREE.MeshLambertMaterial ||
material instanceof THREE.MeshStandardMaterial ||
material.lights ) {
if ( material.lights ) {
// store the light setup it was created for
......@@ -1886,10 +1883,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( refreshMaterial ) {
if ( material instanceof THREE.MeshPhongMaterial ||
material instanceof THREE.MeshLambertMaterial ||
material instanceof THREE.MeshStandardMaterial ||
material.lights ) {
if ( material.lights ) {
// the current material requires lighting info
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册