Overlay a route on Matterport's floor-plan view with worldToScreen
To draw your own route on top of a Matterport scan seen from above: connect with @matterport/sdk, wait for App.Phase.PLAYING, then sdk.Mode.moveTo(sdk.Mode.Mode.FLOORPLAN, { transition: INSTANT }) and sdk.Floor.moveTo(index) for multi-level scans. Subscribe to Camera.pose, and on every pose convert each route point with sdk.Conversion.worldToScreen(pointInSdkFrame, pose, { w, h }) (iframe size from a ResizeObserver), then render an absolutely positioned pointer-events-none SVG over the iframe. It stays aligned through pan and zoom. The Model/REST API positions are z-up while the SDK is y-up: map {x, y: z, z: -y}. Keep the sdk object in React state, not a ref read during render (oxlint react(refs)). URL params dh=0, gt=0, hl=0, mt=0, f=0, search=0, vr=0 trim the toolbar, but the 'Click and drag to look around' first-visit tip still shows in a fresh browser profile. Headless Chrome did render the floor-plan mode, so screenshots can verify alignment.