提交 af6a8177 编写于 作者: M Mr.doob

Vector*: Added setScalar.

上级 353bcd20
......@@ -33,6 +33,15 @@ THREE.Vector2.prototype = {
},
setScalar: function ( scalar ) {
this.x = scalar;
this.y = scalar;
return this;
},
setX: function ( x ) {
this.x = x;
......
......@@ -29,6 +29,16 @@ THREE.Vector3.prototype = {
},
setScalar: function ( scalar ) {
this.x = scalar;
this.y = scalar;
this.z = scalar;
return this;
},
setX: function ( x ) {
this.x = x;
......
......@@ -30,6 +30,17 @@ THREE.Vector4.prototype = {
},
setScalar: function ( scalar ) {
this.x = scalar;
this.y = scalar;
this.z = scalar;
this.w = scalar;
return this;
},
setX: function ( x ) {
this.x = x;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册