Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8f888d049e05c3c778456fbb041f423f925f59be
https://github.com/WebKit/WebKit/commit/8f888d049e05c3c778456fbb041f423f925f59be
Author: Etienne Segonzac <[email protected]>
Date: 2026-05-07 (Thu, 07 May 2026)
Changed paths:
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm
Log Message:
-----------
[visionOS] Some models appear at the wrong scale when not using auto-fit
https://bugs.webkit.org/show_bug.cgi?id=314227
<rdar://167805672>
Reviewed by Mike Wyrzykowski.
On visionOS, WKRKEntity transforms are applied relative to the world
coordinate system. This can override the model's root entity transform
and loose scaling information about the model (when the unit is not 1
meter like in RealityKit).
Save this original scale so we can apply it on top of the other model
transforms.
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h:
Add the field to store the original scale.
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm:
(WebKit::ModelProcessModelPlayerProxy::computeTransform):
Apply the original scale to the bounding sphere.
(WebKit::ModelProcessModelPlayerProxy::updateTransform):
Apply the original scale to the current transform.
(WebKit::ModelProcessModelPlayerProxy::didFinishLoading):
Save the original scale and apply it to the original bounding box.
(WebKit::ModelProcessModelPlayerProxy::updateForCurrentStageMode):
Apply the original scale to the current transform.
(WebKit::ModelProcessModelPlayerProxy::updateTransformSRT):
Remove the original scale from the transform value we report back to
JavaScript.
Canonical link: https://commits.webkit.org/312781@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications