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(Html): use transform for perspective browser issues #1695

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

CodyJasonBennett
Copy link
Member

Fixes #428, mirrors mrdoob/three.js#27017.

@vercel
Copy link

vercel bot commented Oct 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 21, 2023 3:01pm

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 73aebf7:

Sandbox Source
distracted-ellis-gjvwl5 Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration
react-three-fiber starter Issue #428
Mixing HTML and WebGL w/ occlusion (forked) Issue #428

@@ -341,7 +341,7 @@ export const Html: ForwardRefComponent<HtmlProps, HTMLDivElement> = /* @__PURE__
}
el.style.width = size.width + 'px'
el.style.height = size.height + 'px'
el.style.perspective = isOrthographicCamera ? '' : `${fov}px`
el.style.transform = isOrthographicCamera ? '' : `perspective(${fov}px)`
Copy link
Member

@donmccurdy donmccurdy Oct 24, 2023

Choose a reason for hiding this comment

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

This will need to be the first transform on "transformOuterRef" below, rather than a transform on "el", I believe.

@drcmda drcmda merged commit d34816a into master Nov 15, 2023
4 checks passed
Copy link

🎉 This PR is included in version 9.88.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

@CodyJasonBennett
Copy link
Member Author

Hey, @drcmda, this wasn't supposed to be merged. Maybe I should have converted into a draft but I needed to investigate @donmccurdy's review further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<Html /> becomes misaligned when placed in a grid
3 participants