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

Fix Matrix3/4 makeTranslation types #481

Closed
wants to merge 1 commit into from
Closed

Fix Matrix3/4 makeTranslation types #481

wants to merge 1 commit into from

Conversation

puxiao
Copy link
Contributor

@puxiao puxiao commented Jun 27, 2023

https://threejs.org/docs/index.html#api/en/math/Matrix4.makeTranslation

makeTranslation( x, y, z ) {

		if ( x.isVector3 ) {

			this.set(
				1, 0, 0, x.x,
				0, 1, 0, x.y,
				0, 0, 1, x.z,
				0, 0, 0, 1

			);

		} else { 
			...
		}
}

Copy link
Contributor

@Methuselah96 Methuselah96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Comment on lines +117 to 118
makeTranslation(v: Vector2): Matrix3;
makeTranslation(x: number, y: number): Matrix3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the return type this for both methods?

Comment on lines +150 to 151
makeTranslation(v: Vector3): Matrix4;
makeTranslation(x: number, y: number, z: number): Matrix4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the return type this for both methods?

@Methuselah96
Copy link
Contributor

Methuselah96 commented Jun 29, 2023

I also just realized this is part of the r153 release so the base branch should be dev instead of master. If you can't get around to these changes within the next few days, I can update the PR myself.

@Methuselah96 Methuselah96 mentioned this pull request Jun 29, 2023
45 tasks
@puxiao puxiao closed this by deleting the head repository Jun 30, 2023
@puxiao
Copy link
Contributor Author

puxiao commented Jun 30, 2023

Sorry, i resubmitted.
#488

@Methuselah96
Copy link
Contributor

No problem, thanks!

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.

2 participants