Browse Source

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

Added `accessor.normalized` property support in GLTFExporter.js
Mr.doob 5 years ago
parent
commit
4350a9f81e
2 changed files with 12 additions and 0 deletions
  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 = [];