Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix4.d.ts: Parameters of decompose is not optional #19068

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

0b5vr
Copy link
Collaborator

@0b5vr 0b5vr commented Apr 7, 2020

Not passing these parameters apparently throws an error.

decompose: function ( position, quaternion, scale ) {
var te = this.elements;
var sx = _v1.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();
var sy = _v1.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length();
var sz = _v1.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length();
// if determine is negative, we need to invert one scale
var det = this.determinant();
if ( det < 0 ) sx = - sx;
position.x = te[ 12 ];
position.y = te[ 13 ];
position.z = te[ 14 ];

See: https://threejs.org/docs/#api/en/math/Matrix4.decompose

I'm not sure these used to be optional in previous or not.

@0b5vr 0b5vr changed the base branch from master to dev April 7, 2020 14:48
@mrdoob mrdoob added this to the r116 milestone Apr 8, 2020
@mrdoob mrdoob merged commit 009932c into mrdoob:dev Apr 8, 2020
@mrdoob
Copy link
Owner

mrdoob commented Apr 8, 2020

Thanks!

@0b5vr 0b5vr deleted the patch-1 branch April 8, 2020 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants