Переглянути джерело

DracoLoader: Normalise color attributes by default (#26036)

* normalise color attributes by default

* set normalised if not float32
George 2 роки тому
батько
коміт
0d9af1426c
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      examples/jsm/loaders/DRACOLoader.js

+ 2 - 0
examples/jsm/loaders/DRACOLoader.js

@@ -209,6 +209,8 @@ class DRACOLoader extends Loader {
 
 				this._assignVertexColorSpace( attribute, result.vertexColorSpace );
 
+				attribute.normalized = ( array instanceof Float32Array ) === false;
+
 			}
 
 			geometry.setAttribute( name, attribute );