Add WebXR support#30
Conversation
|
If the CI come back green, should we merge? If so, remove the draft flag. |
|
Should I wait for the VTK WebXR MR (https://gitlab.kitware.com/vtk/vtk/-/merge_requests/12221) to be merged to remove the draft flag ? |
|
We can either wait, or you could test the vtk version in start_xr (py) at runtime to make sure the xr capability is available. If not you can warn to use a newer version of vtk. |
|
@munozco i saw that you merged the upstream VTK MR this week. Let's move forward with this. After the weekly release artifacts become available, you can check against that version |
|
I'm afraid WebXR support in trame will be limited (unless using the WebXR emulator). When synchronizing the vtk state (when the slider is changed in the webxr example) while a WebXR session is active, the render window is resized to 10x10 (I think?). I tried to change a few things in vtk-wasm, but I wasn't able to find a solution... @jourdain @jspanchu Are you okay with merging this ? I'll open an issue about this bug. |
|
i see, let's try to fix the resize issue before merging this. |
|
@jspanchu I found a way to fix this, but this requires a small change in vtk-wasm. Here's the PR Kitware/vtk-wasm#38. I don't really know if I'm breaking something else with this change. Is there some way I could test it ? |
|
We do not have e2e tests so my suggestion will be to run the different examples and check if anything odd happens when resizing the browser window. |
I tried a few and it seems to be working well. |
|
Should we merge it? |
I'd like to have @jspanchu approval |
These changes add support for WebXR.
This PR depends on the following VTK merge request: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/12221
The
autoResizeproperty has been added to address an issue when using an XR device. Setting it to false should prevent trame from resizing the render window on the server side based on the client component size. WhenautoResizeis set to true, the server will match the size of the client's render window and won't fit perfectly on a VR/AR headset display.Commit dd87cdf is unrelated but it fixed a bug I encountered when making these changes.
Cc: @LucasGandel @finetjul