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

WebXRImageTracking and NativeEngine changes to support image tracking in BabylonNative #12097

Merged
merged 2 commits into from
Mar 7, 2022

Conversation

Alex-MSFT
Copy link
Contributor

@Alex-MSFT Alex-MSFT commented Mar 4, 2022

The goal of this PR is to update the implementation for WebXRImageTracking to allow for support in BabylonNative. Because we don't have access to the standard DOM HTMLImageElement type in Babylon Native, I am creating a new helper function to create image bitmaps from a provided source value, and polyfilling that in the case of a native engine to use the native Canvas Image implementation.

I'm also changing the ordering for the score check and moving it to the XR Frame loop, as we can only start image tracking after the first frame of the XR session.

The matching BabylonNative changes are being reviewed here: https://github.com/BabylonJS/BabylonNative/pull/1021/files

Primary issue: BabylonJS/BabylonNative#987

@RaananW RaananW merged commit 8d25ae7 into BabylonJS:master Mar 7, 2022
bghgary pushed a commit that referenced this pull request Apr 11, 2022
This PR includes some more changes for WebXR Image Tracking integration for BabylonNative and some cleanup from the previous change: #12097

The primary change is to update nativeXRFrame to pull the results array directly from the frame object rather than marshalling back to native code every time. This should improve per-frame CPU load.

See: BabylonJS/BabylonNative#1032 for the consuming BabylonNative change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants