mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
The Quaternion
class constructor will now default the values to 0,0,0,1
if they're not provided, making it an identity quaternion, rather than the 0,0,0,0
it was before.
This commit is contained in:
parent
daa6fc63ee
commit
1b4af32ec2
1 changed files with 6 additions and 6 deletions
|
@ -32,10 +32,10 @@ var tmpMat3 = new Matrix3();
|
|||
* @constructor
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {number} [x] - The x component.
|
||||
* @param {number} [y] - The y component.
|
||||
* @param {number} [z] - The z component.
|
||||
* @param {number} [w] - The w component.
|
||||
* @param {number} [x=0] - The x component.
|
||||
* @param {number} [y=0] - The y component.
|
||||
* @param {number} [z=0] - The z component.
|
||||
* @param {number} [w=1] - The w component.
|
||||
*/
|
||||
var Quaternion = new Class({
|
||||
|
||||
|
@ -84,14 +84,14 @@ var Quaternion = new Class({
|
|||
this.x = x.x || 0;
|
||||
this.y = x.y || 0;
|
||||
this.z = x.z || 0;
|
||||
this.w = x.w || 0;
|
||||
this.w = x.w || 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.x = x || 0;
|
||||
this.y = y || 0;
|
||||
this.z = z || 0;
|
||||
this.w = w || 0;
|
||||
this.w = w || 1;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue