Skip to content

Commit

Permalink
fix(Html): use transform for perspective browser issues (#1695)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett authored Nov 15, 2023
1 parent a4cc438 commit d34816a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/Html.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
if (transformOuterRef.current && transformInnerRef.current) {
transformOuterRef.current.style.transform = `${cameraTransform}${cameraMatrix}translate(${widthHalf}px,${heightHalf}px)`
transformInnerRef.current.style.transform = getObjectCSSMatrix(matrix, 1 / ((distanceFactor || 10) / 400))
Expand Down

0 comments on commit d34816a

Please sign in to comment.