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

fitToBox doesn't take viewport offset into account #542

Open
samevision opened this issue Oct 9, 2024 · 1 comment
Open

fitToBox doesn't take viewport offset into account #542

samevision opened this issue Oct 9, 2024 · 1 comment

Comments

@samevision
Copy link

Describe the bug

I set the viewport for controls like this:

controls.setViewport(-camera.view.offsetX, -camera.view.offsetY, camera.view.fullWidth, camera.view.fullHeight)

But if I call fitToBox() it still fits to the whole canvas instead of my defined viewport.

How can I fix this?

Best

To Reproduce

See above

Code

No response

Live example

No response

Expected behavior

Object fits while using viewport offset

Screenshots or Video

No response

Device

No response

OS

No response

Browser

No response

@yomotsu
Copy link
Owner

yomotsu commented Oct 20, 2024

Would you mind providing a simplified working example to help reproduce your issue?

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

No branches or pull requests

2 participants