function updateInputSources(session, frame, refSpace) {
for (const source of session.getInputSources()) {
const targetRayPose = frame.getPose(inputSource.targetRaySpace, refSpace);
if (targetRayPose) {
if (source.targetRayMode === "tracked-pointer") {
myRenderTargetRayAsBeam(targetRayPose);
}
}
// …
}
}XRInputSource: targetRaySpace property / notebook
XRInputSource: targetRaySpace property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.