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 Camera Zoom Scaling for 2D Canvas Elements #28695

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Faultless
Copy link

@Faultless Faultless commented Jun 18, 2024

Related issue: #9246

Description

Aping the linked closed issue, because scaling HTML Elements would bring us closer to the perfect 2D, easily hookable, mimic of the 3D view underneath.

@Faultless Faultless marked this pull request as draft June 18, 2024 13:46
@Faultless Faultless marked this pull request as ready for review June 19, 2024 06:06
@Mugen87 Mugen87 changed the base branch from master to dev June 21, 2024 09:58
@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 21, 2024

Can you please demonstrate with a live example what the PR actually does? I would be easier to understand the change if it's possible to test it with a fiddle: https://jsfiddle.net/cp7t8h94/

@Faultless
Copy link
Author

Can you please demonstrate with a live example what the PR actually does? I would be easier to understand the change if it's possible to test it with a fiddle: https://jsfiddle.net/cp7t8h94/

https://jsfiddle.net/q4baf9c5/10/
Sorry, I'm not too familiar with fiddles and have a pretty bad internet connection, so I can only really run this in a cloud env.
I tried to represent my point through this base 2D example. Notice how the 2D labels are by design fixed in their scaling as you zoom the camera in and out.
My wish with this change is to make it optionally scale with the zoom level in order to accommodate some pseudo-3D layer that can benefit from the ease of manipulation of HTML elements.

@Faultless Faultless changed the title add camera zoom scaling to the object rendering constructor method. Add Camera Zoom Scaling for 2D Canvas Elements Jul 5, 2024
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