فهرست منبع

Vector3: Handle undefined z in set()

Mr.doob 5 سال پیش
والد
کامیت
36a4794bac
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/math/Vector3.js

+ 2 - 0
src/math/Vector3.js

@@ -27,6 +27,8 @@ Object.assign( Vector3.prototype, {
 
 
 	set: function ( x, y, z ) {
 	set: function ( x, y, z ) {
 
 
+		if ( z === undefined ) z = this.z; // sprite.scale.set(x,y)
+
 		this.x = x;
 		this.x = x;
 		this.y = y;
 		this.y = y;
 		this.z = z;
 		this.z = z;