Explorar o código

Rename JOINT->JOINTS_0, WEIGHT->WEIGHTS_0.

Don McCurdy %!s(int64=8) %!d(string=hai) anos
pai
achega
ec8bd8f70a
Modificáronse 1 ficheiros con 17 adicións e 6 borrados
  1. 17 6
      examples/js/loaders/GLTF2Loader.js

+ 17 - 6
examples/js/loaders/GLTF2Loader.js

@@ -718,12 +718,12 @@ THREE.GLTF2Loader = ( function () {
 
 
 			switch ( semantic ) {
 			switch ( semantic ) {
 
 
-				case "POSITION":
+				case 'POSITION':
 
 
 					shaderText = shaderText.replace( regEx, 'position' );
 					shaderText = shaderText.replace( regEx, 'position' );
 					break;
 					break;
 
 
-				case "NORMAL":
+				case 'NORMAL':
 
 
 					shaderText = shaderText.replace( regEx, 'normal' );
 					shaderText = shaderText.replace( regEx, 'normal' );
 					break;
 					break;
@@ -747,12 +747,14 @@ THREE.GLTF2Loader = ( function () {
 					shaderText = shaderText.replace( regEx, 'color' );
 					shaderText = shaderText.replace( regEx, 'color' );
 					break;
 					break;
 
 
-				case "WEIGHT":
+				case 'WEIGHTS_0':
+				case 'WEIGHT': // WEIGHT semantic deprecated.
 
 
 					shaderText = shaderText.replace( regEx, 'skinWeight' );
 					shaderText = shaderText.replace( regEx, 'skinWeight' );
 					break;
 					break;
 
 
-				case "JOINT":
+				case 'JOINTS_0':
+				case 'JOINT': // JOINT semantic deprecated.
 
 
 					shaderText = shaderText.replace( regEx, 'skinIndex' );
 					shaderText = shaderText.replace( regEx, 'skinIndex' );
 					break;
 					break;
@@ -1711,34 +1713,43 @@ THREE.GLTF2Loader = ( function () {
 							switch ( attributeId ) {
 							switch ( attributeId ) {
 
 
 								case 'POSITION':
 								case 'POSITION':
+
 									geometry.addAttribute( 'position', bufferAttribute );
 									geometry.addAttribute( 'position', bufferAttribute );
 									break;
 									break;
 
 
 								case 'NORMAL':
 								case 'NORMAL':
+
 									geometry.addAttribute( 'normal', bufferAttribute );
 									geometry.addAttribute( 'normal', bufferAttribute );
 									break;
 									break;
 
 
 								case 'TEXCOORD_0':
 								case 'TEXCOORD_0':
 								case 'TEXCOORD0':
 								case 'TEXCOORD0':
 								case 'TEXCOORD':
 								case 'TEXCOORD':
+
 									geometry.addAttribute( 'uv', bufferAttribute );
 									geometry.addAttribute( 'uv', bufferAttribute );
 									break;
 									break;
 
 
 								case 'TEXCOORD_1':
 								case 'TEXCOORD_1':
+
 									geometry.addAttribute( 'uv2', bufferAttribute );
 									geometry.addAttribute( 'uv2', bufferAttribute );
 									break;
 									break;
 
 
 								case 'COLOR_0':
 								case 'COLOR_0':
 								case 'COLOR0':
 								case 'COLOR0':
 								case 'COLOR':
 								case 'COLOR':
+
 									geometry.addAttribute( 'color', bufferAttribute );
 									geometry.addAttribute( 'color', bufferAttribute );
 									break;
 									break;
 
 
-								case 'WEIGHT':
+								case 'WEIGHTS_0':
+								case 'WEIGHT': // WEIGHT semantic deprecated.
+
 									geometry.addAttribute( 'skinWeight', bufferAttribute );
 									geometry.addAttribute( 'skinWeight', bufferAttribute );
 									break;
 									break;
 
 
-								case 'JOINT':
+								case 'JOINTS_0':
+								case 'JOINT': // JOINT semantic deprecated.
+
 									geometry.addAttribute( 'skinIndex', bufferAttribute );
 									geometry.addAttribute( 'skinIndex', bufferAttribute );
 									break;
 									break;