优化vector2构造函数

This commit is contained in:
yhh
2021-05-24 17:20:27 +08:00
parent 9c7703eb2d
commit da3ab02a8d
20 changed files with 177 additions and 109 deletions

View File

@@ -245,7 +245,7 @@ module es {
if (scale instanceof Vector2) {
this.transform.setScale(scale);
} else {
this.transform.setScale(new Vector2(scale));
this.transform.setScale(new Vector2(scale, scale));
}
return this;
@@ -257,7 +257,7 @@ module es {
if (scale instanceof Vector2) {
this.transform.setLocalScale(scale);
} else {
this.transform.setLocalScale(new Vector2(scale));
this.transform.setLocalScale(new Vector2(scale, scale));
}
return this;