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

Add Matrix4.createPerspective() #1681

Merged
merged 18 commits into from
May 27, 2024
Merged

Add Matrix4.createPerspective() #1681

merged 18 commits into from
May 27, 2024

Conversation

bwkam
Copy link

@bwkam bwkam commented May 9, 2023

I didn't find a createPerspective function (for creating perspective views) so I tried to make one, but I don't really know if that will work.

bwkam added 3 commits May 9, 2023 12:34
I didn't find a createPerspective function so I tried to make one, but I don't really know if that will work.
@bwkam bwkam marked this pull request as draft May 9, 2023 10:11
added zero to one mode, and -one to one mode variants
@bwkam bwkam marked this pull request as ready for review May 9, 2023 10:53
@bwkam
Copy link
Author

bwkam commented May 9, 2023

Can someone re-run the CI?

src/lime/math/Matrix4.hx Outdated Show resolved Hide resolved
@bwkam
Copy link
Author

bwkam commented May 9, 2023

Does that look good?

@bwkam
Copy link
Author

bwkam commented May 10, 2023

Peek 2023-05-10 09-05

Here is a demo
Thanks to @47rooks for the modifications.

Haxe is unable to optimize this function away. Also, it seems to be unable to return numbers smaller than 1e-7, so that's what I used in its place. Smaller constants can work, you just can't get them from `Math.pow()`.
As per all the other "create" functions.
@player-03 player-03 changed the base branch from develop to 8.1.0-Dev July 5, 2023 00:25
@player-03 player-03 changed the title add createPerspective Add Matrix4.createPerspective() Jul 5, 2023
@player-03 player-03 changed the base branch from 8.1.0-Dev to 8.2.0-Dev August 18, 2023 00:39
@player-03 player-03 changed the base branch from 8.2.0-Dev to develop August 18, 2023 01:08
@player-03 player-03 changed the base branch from develop to 8.2.0-Dev August 18, 2023 01:09
@player-03 player-03 merged commit eabb10e into openfl:8.2.0-Dev May 27, 2024
28 checks passed
bwkam added a commit to bwkam/lime that referenced this pull request May 27, 2024
@bwkam bwkam deleted the patch-1 branch May 27, 2024 21:48
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

2 participants