web-ifc-viewer icon indicating copy to clipboard operation
web-ifc-viewer copied to clipboard

Adding example VR controls to webXr in viewer

Open craigliesinger opened this issue 2 years ago • 2 comments

per request from Marcos - I've added a couple base VR controller functionalities to the ifc-viewer library. This includes movement / fly around using right controller 'squeeze' and element highlighting use left controller 'select' (and clear with 'squeeze').

craigliesinger avatar Aug 15 '22 13:08 craigliesinger

Hey @craigliesinger if you solve the merge conflicts, I'll merge! Thanks a lot for the contribution

agviegas avatar Aug 21 '22 16:08 agviegas

Thanks @agviegas ; I'm a github novice so having way to hard of a time figuring out how to resolve it without the write access to do it directly in Github. I'll try to figure it out soon. The code for context in PR is right and not sure why it gets hung up with a conflict: `private render = () => { if (this.isThisBeingDisposed) return; if (this.stats) this.stats.begin(); const isWebXR = this.options.webXR || false; if (isWebXR) { document.body.appendChild(VRButton.createButton(this.getRenderer())); this.getRenderer().xr.enabled = true; this.renderForWebXR(); } else { requestAnimationFrame(this.render); } this.updateAllComponents(); if (this.stats) this.stats.end(); };

private renderForWebXR = () => { const newAnimationLoop = () => { this.webXrMoveTracking(); this.getRenderer().render(this.getScene(), this.getCamera()); }; this.getRenderer().setAnimationLoop(newAnimationLoop); };

webXrMoveTracking = () => {}; `

craigliesinger avatar Aug 22 '22 06:08 craigliesinger