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

feat(viewport): add getScale function #1762

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

julianlinaress
Copy link

@julianlinaress julianlinaress commented Jan 17, 2025

Context

Adding a getScale function would be useful to compare original and rendered image size.

Changes & Results

Added a getScale method to the Viewport class to calculate the scaling ratio between the rendered image size and its original dimensions. This is useful for understanding how an image is being displayed relative to its original size.
Makes it easy to verify correct image scaling behavior, helps troubleshoot display issues and identifies unexpected non-uniform scaling that could distort the image

Testing

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

Copy link

stackblitz bot commented Jan 17, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Jan 17, 2025

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit ec23fdd
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/678aa1bf5c3dee00083c2b22
😎 Deploy Preview https://deploy-preview-1762--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant