Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 62a9e5aae1b4a74508539a653611e1be59c526f3 https://github.com/WebKit/WebKit/commit/62a9e5aae1b4a74508539a653611e1be59c526f3 Author: Dan Glastonbury <d...@apple.com> Date: 2023-12-07 (Thu, 07 Dec 2023)
Changed paths: M Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj A Source/WebCore/PAL/pal/spi/cocoa/ARKitSPI.h M Source/WebKit/Shared/Cocoa/ARKitSoftLink.h M Source/WebKit/Shared/Cocoa/ARKitSoftLink.mm M Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm M Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.h M Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.mm Log Message: ----------- [WebXR] Transient input source for immersive AR sessions https://bugs.webkit.org/show_bug.cgi?id=266045 rdar://119348536 Reviewed by Dean Jackson. Now that we support rendering of immersive AR sessions, we need a way to interact with them. This implementation of `transient-pointer`, based upon immersive VR, translates basic touch interactions into target rays derived from shooting a ray from the ARCamera position through the touch position in world space. Introduce a _WKTransientGestureRecognizer that can generate `transient-pointer` events from UITouch, and attach an instance of that gesture recognizer to the main view for the immersive AR session. Access to events is provided via -[WKARPresentationSession collectInputSources], which provides transient actions suitable for passing to PlatformXR::Device::FrameData::inputSources * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj: * Source/WebCore/PAL/pal/spi/cocoa/ARKitSPI.h: Copied from Source/WebKit/Shared/Cocoa/ARKitSoftLink.h. * Source/WebKit/Shared/Cocoa/ARKitSoftLink.h: * Source/WebKit/Shared/Cocoa/ARKitSoftLink.mm: * Source/WebKit/UIProcess/XR/ios/PlatformXRARKit.mm: (WebKit::ARKitCoordinator::renderLoop): * Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.h: * Source/WebKit/UIProcess/XR/ios/WKARPresentationSession.mm: (-[UITouch normalizedLocationInView:]): (-[_WKARPresentationSession raycastQueryTransformFromPoint:]): (-[_WKARPresentationSession collectInputSources]): (-[_WKARPresentationSession gestureRecognizer:shouldReceiveTouch:]): (-[_WKARPresentationSession loadView]): (-[_WKTransientAction initWithTargetRay:pose:]): (-[_WKTransientGestureRecognizer initWithSession:]): (-[_WKTransientGestureRecognizer touchesBegan:withEvent:]): (-[_WKTransientGestureRecognizer touchesMoved:withEvent:]): (-[_WKTransientGestureRecognizer touchesEnded:withEvent:]): (-[_WKTransientGestureRecognizer touchesCancelled:withEvent:]): (-[_WKTransientGestureRecognizer _doneWithTouch:]): (-[_WKTransientGestureRecognizer _platformXRInputSourceFromTransientAction:actionIdentifier:]): (-[_WKTransientGestureRecognizer collectInputSources]): Canonical link: https://commits.webkit.org/271717@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes