|
@@ -143,29 +143,43 @@ Points.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
var geometry = this.geometry;
|
|
|
var m, ml, name;
|
|
|
|
|
|
- var morphAttributes = geometry.morphAttributes;
|
|
|
- var keys = Object.keys( morphAttributes );
|
|
|
+ if ( geometry.isBufferGeometry ) {
|
|
|
|
|
|
- if ( keys.length > 0 ) {
|
|
|
+ var morphAttributes = geometry.morphAttributes;
|
|
|
+ var keys = Object.keys( morphAttributes );
|
|
|
|
|
|
- var morphAttribute = morphAttributes[ keys[ 0 ] ];
|
|
|
+ if ( keys.length > 0 ) {
|
|
|
|
|
|
- if ( morphAttribute !== undefined ) {
|
|
|
+ var morphAttribute = morphAttributes[ keys[ 0 ] ];
|
|
|
|
|
|
- this.morphTargetInfluences = [];
|
|
|
- this.morphTargetDictionary = {};
|
|
|
+ if ( morphAttribute !== undefined ) {
|
|
|
|
|
|
- for ( m = 0, ml = morphAttribute.length; m < ml; m ++ ) {
|
|
|
+ this.morphTargetInfluences = [];
|
|
|
+ this.morphTargetDictionary = {};
|
|
|
|
|
|
- name = morphAttribute[ m ].name || String( m );
|
|
|
+ for ( m = 0, ml = morphAttribute.length; m < ml; m ++ ) {
|
|
|
|
|
|
- this.morphTargetInfluences.push( 0 );
|
|
|
- this.morphTargetDictionary[ name ] = m;
|
|
|
+ name = morphAttribute[ m ].name || String( m );
|
|
|
+
|
|
|
+ this.morphTargetInfluences.push( 0 );
|
|
|
+ this.morphTargetDictionary[ name ] = m;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
+ } else {
|
|
|
+
|
|
|
+ var morphTargets = geometry.morphTargets;
|
|
|
+
|
|
|
+ if ( morphTargets !== undefined && morphTargets.length > 0 ) {
|
|
|
+
|
|
|
+ console.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|