瀏覽代碼

GLTFLoader: Clean up

Takahiro 7 年之前
父節點
當前提交
cfce1f0b60
共有 1 個文件被更改,包括 6 次插入12 次删除
  1. 6 12
      examples/js/loaders/GLTFLoader.js

+ 6 - 12
examples/js/loaders/GLTFLoader.js

@@ -2251,23 +2251,17 @@ THREE.GLTFLoader = ( function () {
 
 						}
 
-					} else if ( primitive.mode === WEBGL_CONSTANTS.LINES ||
-						primitive.mode === WEBGL_CONSTANTS.LINE_STRIP ||
-						primitive.mode === WEBGL_CONSTANTS.LINE_LOOP ) {
+					} else if ( primitive.mode === WEBGL_CONSTANTS.LINES ) {
 
-						if ( primitive.mode === WEBGL_CONSTANTS.LINES ) {
+						mesh = new THREE.LineSegments( geometry, material );
 
-							mesh = new THREE.LineSegments( geometry, material );
+					} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_STRIP ) {
 
-						} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_STRIP ) {
+						mesh = new THREE.Line( geometry, material );
 
-							mesh = new THREE.Line( geometry, material );
+					} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_LOOP ) {
 
-						} else {
-
-							mesh = new THREE.LineLoop( geometry, material );
-
-						}
+						mesh = new THREE.LineLoop( geometry, material );
 
 					} else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) {