Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec1c172ffe777a3af45ec795e7bee066fb38b132
      
https://github.com/WebKit/WebKit/commit/ec1c172ffe777a3af45ec795e7bee066fb38b132
  Author: Phipson Lee <phipsonle...@gmail.com>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

  Changed paths:
    M Source/WebKit/Configurations/Base.xcconfig
    A Source/WebKit/ModelProcess/StageMode/WKStageMode.h
    A Source/WebKit/ModelProcess/StageMode/WKStageMode.swift
    M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h
    M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm
    M Source/WebKit/Modules/Internal/WebKitInternal.h
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebKitSwift/RealityKit/RKEntity.swift
    M Source/WebKit/WebKitSwift/RealityKit/RealityKitBridging.h

  Log Message:
  -----------
  Create a driver to update StageMode Interactions based on Gesture Input
https://bugs.webkit.org/show_bug.cgi?id=287820
rdar://145006262

Reviewed by Wenson Hsieh, Richard Robinson, Elliott Williams, and Ada Chan.

This PR adds the StageModeInteractionDriver, which is a helper class object 
used in the ModelProcessModelPlayerProxy
to control how the model responds to the stagemode transform updates, based on 
the applied stagemode attribute. When
stagemode is set to 'none' we ignore all transforms passed to the player proxy. 
When stagemode is set to 'orbit' we
use the translation from the transform to rotate the model. To separate 
stagemode updates from Javascript updates,
we introduce an Interaction Container that wraps around the model entity, on 
which the stagemode updates will be applied.

The driver will be implemented in 
https://bugs.webkit.org/show_bug.cgi?id=287601.

* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm:
(WebKit::ModelProcessModelPlayerProxy::didFinishLoading):
(WebKit::ModelProcessModelPlayerProxy::beginStageModeTransform):
(WebKit::ModelProcessModelPlayerProxy::updateStageModeTransform):
(WebKit::ModelProcessModelPlayerProxy::endStageModeInteraction):
(WebKit::ModelProcessModelPlayerProxy::setStageMode):
(WebKit::ModelProcessModelPlayerProxy::applyStageModeOperationToDriver):
- Updates the callbacks to use the interaction driver
- Also adds helper function to update the driver's internal state based on the 
stagemode attribute

* Source/WebKit/UIProcess/Cocoa/WebKitSwiftSoftLink.h:
* Source/WebKit/UIProcess/Cocoa/WebKitSwiftSoftLink.mm:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebKitSwift/StageMode/WKStageMode.swift: Added.
(WKStageModeInteractionDriver.stageModeOperation):
(WKStageModeInteractionDriver.interactionDidBegin(_:)):
(WKStageModeInteractionDriver.interactionDidUpdate(_:)):
(WKStageModeInteractionDriver.interactionDidEnd):
(WKStageModeInteractionDriver.operationDidChange(_:)):
- Adds the necessary APIs to apply the transform to the interaction target.

* Source/WebKit/WebKitSwift/StageMode/WKStageModeBridging.h: Copied from 
Source/WebKit/WebKitSwift/WebKitSwift.h.
* Source/WebKit/WebKitSwift/WebKitSwift.h:

Canonical link: https://commits.webkit.org/291028@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to