Skip to content

Commit 29222c2

Browse files
committed
Add default values in Vector3#setVector
1 parent 0f33eb9 commit 29222c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/Vector3.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Object.assign(Vector3.prototype, {
2828
},
2929

3030
setVector: function(v) {
31-
this.x = v.x;
32-
this.y = v.y;
33-
this.z = v.z;
31+
this.x = v.x || 0;
32+
this.y = v.y || 0;
33+
this.z = v.z || 0;
3434

3535
return this;
3636
},

0 commit comments

Comments
 (0)