Explorar el Código

Implement relative morph target support in BufferGeometryLoader

Also fix toNonIndexed to copy the attribute
Arseny Kapoulkine hace 5 años
padre
commit
096a49f71c
Se han modificado 2 ficheros con 10 adiciones y 0 borrados
  1. 2 0
      src/core/BufferGeometry.js
  2. 8 0
      src/loaders/BufferGeometryLoader.js

+ 2 - 0
src/core/BufferGeometry.js

@@ -978,6 +978,8 @@ BufferGeometry.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 		}
 
+		geometry2.morphTargetsRelative = this.morphTargetsRelative;
+
 		// groups
 
 		var groups = this.groups;

+ 8 - 0
src/loaders/BufferGeometryLoader.js

@@ -88,6 +88,14 @@ BufferGeometryLoader.prototype = Object.assign( Object.create( Loader.prototype
 
 		}
 
+		var morphTargetsRelative = json.data.morphTargetsRelative;
+
+		if ( morphTargetsRelative ) {
+
+			geometry.morphTargetsRelative = true;
+
+		}
+
 		var groups = json.data.groups || json.data.drawcalls || json.data.offsets;
 
 		if ( groups !== undefined ) {