提交 2b3bfac1 编写于 作者: L linbingquan

Face4: Updated es6 default values.

上级 5e46e96c
...@@ -3,7 +3,7 @@ import { Vector3 } from '../math/Vector3.js'; ...@@ -3,7 +3,7 @@ import { Vector3 } from '../math/Vector3.js';
class Face3 { class Face3 {
constructor( a, b, c, normal, color, materialIndex ) { constructor( a, b, c, normal, color, materialIndex = 0 ) {
this.a = a; this.a = a;
this.b = b; this.b = b;
...@@ -15,7 +15,7 @@ class Face3 { ...@@ -15,7 +15,7 @@ class Face3 {
this.color = ( color && color.isColor ) ? color : new Color(); this.color = ( color && color.isColor ) ? color : new Color();
this.vertexColors = Array.isArray( color ) ? color : []; this.vertexColors = Array.isArray( color ) ? color : [];
this.materialIndex = materialIndex !== undefined ? materialIndex : 0; this.materialIndex = materialIndex;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册