浏览代码

Merge pull request #19154 from LeonYuanYao/GLTFExporter-Accessor.normalized-property

Added `accessor.normalized` property support in GLTFExporter.js
Mr.doob 5 年之前
父节点
当前提交
4350a9f81e
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 6 0
      examples/js/exporters/GLTFExporter.js
  2. 6 0
      examples/jsm/exporters/GLTFExporter.js

+ 6 - 0
examples/js/exporters/GLTFExporter.js

@@ -702,6 +702,12 @@ THREE.GLTFExporter.prototype = {
 
 			};
 
+			if ( attribute.normalized === true ) {
+
+				gltfAccessor.normalized = true;
+				
+			}
+
 			if ( ! outputJSON.accessors ) {
 
 				outputJSON.accessors = [];

+ 6 - 0
examples/jsm/exporters/GLTFExporter.js

@@ -724,6 +724,12 @@ GLTFExporter.prototype = {
 
 			};
 
+			if ( attribute.normalized === true ) {
+
+				gltfAccessor.normalized = true;
+				
+			}
+
 			if ( ! outputJSON.accessors ) {
 
 				outputJSON.accessors = [];