未验证 提交 ee2d261e 编写于 作者: M Michael Herzog 提交者: GitHub

Merge pull request #17614 from Mugen87/dev38

Material: Clean up usage of .lights property.
......@@ -2116,7 +2116,6 @@ THREE.GLTFLoader = ( function () {
THREE.Material.prototype.copy.call( pointsMaterial, material );
pointsMaterial.color.copy( material.color );
pointsMaterial.map = material.map;
pointsMaterial.lights = false; // PointsMaterial doesn't support lights yet
pointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px
this.cache.add( cacheKey, pointsMaterial );
......@@ -2136,7 +2135,6 @@ THREE.GLTFLoader = ( function () {
lineMaterial = new THREE.LineBasicMaterial();
THREE.Material.prototype.copy.call( lineMaterial, material );
lineMaterial.color.copy( material.color );
lineMaterial.lights = false; // LineBasicMaterial doesn't support lights yet
this.cache.add( cacheKey, lineMaterial );
......
......@@ -1032,7 +1032,6 @@ THREE.MMDLoader = ( function () {
params.skinning = geometry.bones.length > 0 ? true : false;
params.morphTargets = geometry.morphTargets.length > 0 ? true : false;
params.lights = true;
params.fog = true;
// blend
......
......@@ -682,7 +682,6 @@ THREE.OBJLoader = ( function () {
var materialLine = new THREE.LineBasicMaterial();
THREE.Material.prototype.copy.call( materialLine, material );
materialLine.color.copy( material.color );
materialLine.lights = false;
material = materialLine;
} else if ( isPoints && material && ! ( material instanceof THREE.PointsMaterial ) ) {
......@@ -691,7 +690,6 @@ THREE.OBJLoader = ( function () {
THREE.Material.prototype.copy.call( materialPoints, material );
materialPoints.color.copy( material.color );
materialPoints.map = material.map;
materialPoints.lights = false;
material = materialPoints;
}
......
......@@ -2180,7 +2180,6 @@ var GLTFLoader = ( function () {
Material.prototype.copy.call( pointsMaterial, material );
pointsMaterial.color.copy( material.color );
pointsMaterial.map = material.map;
pointsMaterial.lights = false; // PointsMaterial doesn't support lights yet
pointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px
this.cache.add( cacheKey, pointsMaterial );
......@@ -2200,7 +2199,6 @@ var GLTFLoader = ( function () {
lineMaterial = new LineBasicMaterial();
Material.prototype.copy.call( lineMaterial, material );
lineMaterial.color.copy( material.color );
lineMaterial.lights = false; // LineBasicMaterial doesn't support lights yet
this.cache.add( cacheKey, lineMaterial );
......
......@@ -1068,7 +1068,6 @@ var MMDLoader = ( function () {
params.skinning = geometry.bones.length > 0 ? true : false;
params.morphTargets = geometry.morphTargets.length > 0 ? true : false;
params.lights = true;
params.fog = true;
// blend
......
......@@ -699,7 +699,6 @@ var OBJLoader = ( function () {
var materialLine = new LineBasicMaterial();
Material.prototype.copy.call( materialLine, material );
materialLine.color.copy( material.color );
materialLine.lights = false;
material = materialLine;
} else if ( isPoints && material && ! ( material instanceof PointsMaterial ) ) {
......@@ -708,7 +707,6 @@ var OBJLoader = ( function () {
Material.prototype.copy.call( materialPoints, material );
materialPoints.color.copy( material.color );
materialPoints.map = material.map;
materialPoints.lights = false;
material = materialPoints;
}
......
......@@ -62,7 +62,6 @@
THREE.Material.prototype.copy.call( material, object.material[ i ] );
material.color.copy( object.material[ i ].color );
material.map = object.material[ i ].map;
material.lights = false;
material.skinning = object.material[ i ].skinning;
material.morphTargets = object.material[ i ].morphTargets;
material.morphNormals = object.material[ i ].morphNormals;
......@@ -76,7 +75,6 @@
THREE.Material.prototype.copy.call( material, object.material );
material.color.copy( object.material.color );
material.map = object.material.map;
material.lights = false;
material.skinning = object.material.skinning;
material.morphTargets = object.material.morphTargets;
material.morphNormals = object.material.morphNormals;
......
......@@ -27,8 +27,6 @@ function LineBasicMaterial( parameters ) {
this.linecap = 'round';
this.linejoin = 'round';
this.lights = false;
this.setValues( parameters );
}
......
......@@ -19,7 +19,6 @@ function Material() {
this.type = 'Material';
this.fog = true;
this.lights = true;
this.blending = NormalBlending;
this.side = FrontSide;
......@@ -343,7 +342,6 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
this.name = source.name;
this.fog = source.fog;
this.lights = source.lights;
this.blending = source.blending;
this.side = source.side;
......
......@@ -70,8 +70,6 @@ function MeshBasicMaterial( parameters ) {
this.skinning = false;
this.morphTargets = false;
this.lights = false;
this.setValues( parameters );
}
......
......@@ -47,7 +47,6 @@ function MeshDepthMaterial( parameters ) {
this.wireframeLinewidth = 1;
this.fog = false;
this.lights = false;
this.setValues( parameters );
......
......@@ -46,7 +46,6 @@ function MeshDistanceMaterial( parameters ) {
this.displacementBias = 0;
this.fog = false;
this.lights = false;
this.setValues( parameters );
......
......@@ -64,8 +64,6 @@ function MeshMatcapMaterial( parameters ) {
this.morphTargets = false;
this.morphNormals = false;
this.lights = false;
this.setValues( parameters );
}
......
......@@ -50,7 +50,6 @@ function MeshNormalMaterial( parameters ) {
this.wireframeLinewidth = 1;
this.fog = false;
this.lights = false;
this.skinning = false;
this.morphTargets = false;
......
......@@ -32,8 +32,6 @@ function PointsMaterial( parameters ) {
this.morphTargets = false;
this.lights = false;
this.setValues( parameters );
}
......
......@@ -25,7 +25,6 @@ function SpriteMaterial( parameters ) {
this.sizeAttenuation = true;
this.lights = false;
this.transparent = true;
this.setValues( parameters );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册