File tree 2 files changed +61
-23
lines changed
2 files changed +61
-23
lines changed Original file line number Diff line number Diff line change 12546
12546
12547
12547
} else {
12548
12548
12549
+ this.computeFaceNormals();
12550
+
12549
12551
for ( f = 0, fl = this.faces.length; f < fl; f ++ ) {
12550
12552
12551
12553
face = this.faces[ f ];
12594
12596
12595
12597
},
12596
12598
12599
+ computeFlatVertexNormals: function () {
12600
+
12601
+ var f, fl, face;
12602
+
12603
+ this.computeFaceNormals();
12604
+
12605
+ for ( f = 0, fl = this.faces.length; f < fl; f ++ ) {
12606
+
12607
+ face = this.faces[ f ];
12608
+
12609
+ var vertexNormals = face.vertexNormals;
12610
+
12611
+ if ( vertexNormals.length === 3 ) {
12612
+
12613
+ vertexNormals[ 0 ].copy( face.normal );
12614
+ vertexNormals[ 1 ].copy( face.normal );
12615
+ vertexNormals[ 2 ].copy( face.normal );
12616
+
12617
+ } else {
12618
+
12619
+ vertexNormals[ 0 ] = face.normal.clone();
12620
+ vertexNormals[ 1 ] = face.normal.clone();
12621
+ vertexNormals[ 2 ] = face.normal.clone();
12622
+
12623
+ }
12624
+
12625
+ }
12626
+
12627
+ if ( this.faces.length > 0 ) {
12628
+
12629
+ this.normalsNeedUpdate = true;
12630
+
12631
+ }
12632
+
12633
+ },
12634
+
12597
12635
computeMorphNormals: function () {
12598
12636
12599
12637
var i, il, f, fl, face;
You can’t perform that action at this time.
0 commit comments