xrSession.addEventListener("inputsourceschange", onInputSourcesChange);
function onInputSourcesChange(event) {
for (const input of event.added) {
if (input.targetRayMode === "tracked-pointer") {
loadControllerMesh(input);
}
}
}XRSession: inputsourceschange event / notebook
XRSession: inputsourceschange event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
xrSession.oninputsourceschange = onInputSourcesChange;