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

[g-webgl] 支持 WebXR #1664

Open
xiaoiver opened this issue Apr 9, 2024 · 1 comment
Open

[g-webgl] 支持 WebXR #1664

xiaoiver opened this issue Apr 9, 2024 · 1 comment

Comments

@xiaoiver
Copy link
Contributor

xiaoiver commented Apr 9, 2024

antvis/g-device-api#38

目前 WebGPU 尚不支持。https://launch.variant3d.com/blog/23-06-state-webxr-on-ios-beyond

Three.js 中 AR 的用法如下:

  1. 提供 ARButton:https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/ARButton.js
  2. Renderer 创建:https://threejs.org/docs/#api/en/renderers/webxr/WebXRManager
@xiaoiver xiaoiver mentioned this issue Apr 10, 2024
14 tasks
@xiaoiver
Copy link
Contributor Author

WebXR 和 WebGL 使用的坐标系、单位是一致的:原点在屏幕中心,Y 轴正向向上,单位是米
https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API/Geometry#units

而我们的坐标系中原点在左上角,Y 轴正向向下,单位为 CSS Pixel。
因此从 XRView 中获取的 viewMatrix 需要处理

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

No branches or pull requests

1 participant