浏览代码

Merge pull request #11982 from dhritzkiv/patch-18

reference `FlatShading` directly; Use comparison result directly
Mr.doob 8 年之前
父节点
当前提交
7102ec5409
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Three.Legacy.js

+ 2 - 2
src/Three.Legacy.js

@@ -5,7 +5,7 @@
 import { Audio } from './audio/Audio.js';
 import { Audio } from './audio/Audio.js';
 import { AudioAnalyser } from './audio/AudioAnalyser.js';
 import { AudioAnalyser } from './audio/AudioAnalyser.js';
 import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
 import { PerspectiveCamera } from './cameras/PerspectiveCamera.js';
-import { CullFaceFront, CullFaceBack } from './constants.js';
+import { CullFaceFront, CullFaceBack, FlatShading } from './constants.js';
 import {
 import {
 	Float64BufferAttribute,
 	Float64BufferAttribute,
 	Float32BufferAttribute,
 	Float32BufferAttribute,
@@ -1047,7 +1047,7 @@ Object.defineProperties( Material.prototype, {
 		set: function ( value ) {
 		set: function ( value ) {
 
 
 			console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
 			console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
-			this.flatShading = ( value === THREE.FlatShading ) ? true : false;
+			this.flatShading = ( value === FlatShading );
 
 
 		}
 		}
 	}
 	}