Pārlūkot izejas kodu

Merge pull request #19893 from mrdoob/vector3

Vector3: Handle undefined z in set()
Mr.doob 5 gadi atpakaļ
vecāks
revīzija
628546e242
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  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 ) {
 
+		if ( z === undefined ) z = this.z; // sprite.scale.set(x,y)
+
 		this.x = x;
 		this.y = y;
 		this.z = z;