浏览代码

GLTFExporter - Fixed import

Max Godefroy (Clyde) 4 年之前
父节点
当前提交
8c5c7c16f3
共有 1 个文件被更改,包括 17 次插入9 次删除
  1. 17 9
      examples/jsm/exporters/GLTFExporter.js

+ 17 - 9
examples/jsm/exporters/GLTFExporter.js

@@ -14,7 +14,15 @@ import {
 	NearestMipmapLinearFilter,
 	NearestMipmapLinearFilter,
 	NearestMipmapNearestFilter,
 	NearestMipmapNearestFilter,
 	PropertyBinding,
 	PropertyBinding,
+	RGBAIntegerFormat,
 	RGBAFormat,
 	RGBAFormat,
+	RGBEFormat,
+	RGBIntegerFormat,
+	RGBFormat,
+	RGIntegerFormat,
+	RGFormat,
+	RedIntegerFormat,
+	RedFormat,
 	RepeatWrapping,
 	RepeatWrapping,
 	Scene,
 	Scene,
 	Vector3
 	Vector3
@@ -276,13 +284,13 @@ GLTFExporter.prototype = {
 			switch ( format ) {
 			switch ( format ) {
 
 
 				// No conversion needed
 				// No conversion needed
-				case THREE.RGBAIntegerFormat:
-				case THREE.RGBAFormat:
-				case THREE.RGBEFormat:
+				case RGBAIntegerFormat:
+				case RGBAFormat:
+				case RGBEFormat:
 					break;
 					break;
 
 
-				case THREE.RGBIntegerFormat:
-				case THREE.RGBFormat:
+				case RGBIntegerFormat:
+				case RGBFormat:
 					pixelStride = 3;
 					pixelStride = 3;
 					convertFunction = function ( pixelData ) {
 					convertFunction = function ( pixelData ) {
 
 
@@ -292,8 +300,8 @@ GLTFExporter.prototype = {
 
 
 					break;
 					break;
 
 
-				case THREE.RGIntegerFormat:
-				case THREE.RGFormat:
+				case RGIntegerFormat:
+				case RGFormat:
 					pixelStride = 2;
 					pixelStride = 2;
 					convertFunction = function ( pixelData ) {
 					convertFunction = function ( pixelData ) {
 
 
@@ -303,8 +311,8 @@ GLTFExporter.prototype = {
 
 
 					break;
 					break;
 
 
-				case THREE.RedIntegerFormat:
-				case THREE.RedFormat:
+				case RedIntegerFormat:
+				case RedFormat:
 					pixelStride = 1;
 					pixelStride = 1;
 					convertFunction = function ( pixelData ) {
 					convertFunction = function ( pixelData ) {