Skip to content

Commit ffda14b

Browse files
committed
Updated builds.
1 parent d5f3b24 commit ffda14b

2 files changed

Lines changed: 168 additions & 165 deletions

File tree

build/three.js

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10143,12 +10143,12 @@ THREE.DirectGeometry.prototype = {
1014310143
this.morphTargets[ j ].push( morphTarget[ face.a ], morphTarget[ face.b ], morphTarget[ face.c ] );
1014410144

1014510145
}
10146-
10146+
/*
1014710147
for ( var j = 0; j < morphNormalsLength; j ++ ) {
1014810148

10149-
var morphNormal = morphNormals[ j ].normals;
10149+
var morphNormal = morphNormals[ j ].vertexNormals[ i ];
1015010150

10151-
this.morphNormals[ j ].push( morphNormal[ face.a ], morphNormal[ face.b ], morphNormal[ face.c ] );
10151+
this.morphNormals[ j ].push( morphNormal.a, morphNormal.b, morphNormal.c );
1015210152

1015310153
}
1015410154

@@ -10159,6 +10159,7 @@ THREE.DirectGeometry.prototype = {
1015910159
this.morphColors[ j ].push( morphColor[ face.a ], morphColor[ face.b ], morphColor[ face.c ] );
1016010160

1016110161
}
10162+
*/
1016210163

1016310164
// skins
1016410165

@@ -10373,40 +10374,6 @@ THREE.BufferGeometry.prototype = {
1037310374

1037410375
this.fromGeometry( geometry );
1037510376

10376-
var directgeometry = geometry.__directGeometry;
10377-
10378-
// morphs
10379-
10380-
if ( object.morphTargetInfluences !== undefined ) {
10381-
10382-
var morphTargets = directgeometry.morphTargets;
10383-
10384-
for ( var i = 0, l = morphTargets.length; i < l; i ++ ) {
10385-
10386-
var morphTarget = morphTargets[ i ];
10387-
10388-
var attribute = new THREE.Float32Attribute( morphTarget.length * 3, 3 );
10389-
10390-
this.morphAttributes.push( attribute.copyVector3sArray( morphTarget ) );
10391-
10392-
}
10393-
10394-
// TODO normals, colors
10395-
10396-
}
10397-
10398-
// skinning
10399-
10400-
if ( object instanceof THREE.SkinnedMesh ) {
10401-
10402-
var skinIndices = new THREE.Float32Attribute( directgeometry.skinIndices.length * 4, 4 );
10403-
var skinWeights = new THREE.Float32Attribute( directgeometry.skinWeights.length * 4, 4 );
10404-
10405-
this.addAttribute( 'skinIndex', skinIndices.copyVector4sArray( directgeometry.skinIndices ) );
10406-
this.addAttribute( 'skinWeight', skinWeights.copyVector4sArray( directgeometry.skinWeights ) );
10407-
10408-
}
10409-
1041010377
}
1041110378

1041210379
}
@@ -10531,6 +10498,44 @@ THREE.BufferGeometry.prototype = {
1053110498

1053210499
}
1053310500

10501+
// morphs
10502+
10503+
if ( geometry.morphTargets.length > 0 ) {
10504+
10505+
var morphTargets = geometry.morphTargets;
10506+
10507+
for ( var i = 0, l = morphTargets.length; i < l; i ++ ) {
10508+
10509+
var morphTarget = morphTargets[ i ];
10510+
10511+
var attribute = new THREE.Float32Attribute( morphTarget.length * 3, 3 );
10512+
10513+
this.morphAttributes.push( attribute.copyVector3sArray( morphTarget ) );
10514+
10515+
}
10516+
10517+
// TODO normals, colors
10518+
10519+
}
10520+
10521+
// skinning
10522+
10523+
if ( geometry.skinIndices.length > 0 ) {
10524+
10525+
var skinIndices = new THREE.Float32Attribute( geometry.skinIndices.length * 4, 4 );
10526+
this.addAttribute( 'skinIndex', skinIndices.copyVector4sArray( geometry.skinIndices ) );
10527+
10528+
}
10529+
10530+
if ( geometry.skinWeights.length > 0 ) {
10531+
10532+
var skinWeights = new THREE.Float32Attribute( geometry.skinWeights.length * 4, 4 );
10533+
this.addAttribute( 'skinWeight', skinWeights.copyVector4sArray( geometry.skinWeights ) );
10534+
10535+
}
10536+
10537+
//
10538+
1053410539
if ( geometry.boundingSphere !== null ) {
1053510540

1053610541
this.boundingSphere = geometry.boundingSphere.clone();

0 commit comments

Comments
 (0)