浏览代码

Texture: Honor `internalFormat` in `toJSON()` and `ObjectLoader`. (#25491)

Michael Herzog 2 年之前
父节点
当前提交
d390af9bc3
共有 2 个文件被更改,包括 2 次插入0 次删除
  1. 1 0
      src/loaders/ObjectLoader.js
  2. 1 0
      src/textures/Texture.js

+ 1 - 0
src/loaders/ObjectLoader.js

@@ -652,6 +652,7 @@ class ObjectLoader extends Loader {
 				}
 
 				if ( data.format !== undefined ) texture.format = data.format;
+				if ( data.internalFormat !== undefined ) texture.internalFormat = data.internalFormat;
 				if ( data.type !== undefined ) texture.type = data.type;
 				if ( data.encoding !== undefined ) texture.encoding = data.encoding;
 

+ 1 - 0
src/textures/Texture.js

@@ -177,6 +177,7 @@ class Texture extends EventDispatcher {
 			wrap: [ this.wrapS, this.wrapT ],
 
 			format: this.format,
+			internalFormat: this.internalFormat,
 			type: this.type,
 			encoding: this.encoding,