Requests a full frame: immediate when idle, otherwise folded into the pending trailing frame (so N simultaneous requests cost one frame). Hosts call it when the connection becomes live or reconnects.
The complete state a frame carries right now. Side-effecting when
selection publishing is on: re-reads getSelectedIds(), re-runs
selectionFilter, updates the fail-closed selection state, and may call
onError. A no-op with respect to selection while publishing is off.
Merges the given flags into the current policy; undefined keys are ignored.
Publishes this client's awareness state (identity, pointer in world space, selection, active tool) as full-snapshot frames through
send. Sources are a passive primary-pointer listener on the viewport wrapper, the viewport's selection-change event, and the tool manager's change event. Any change marks the state dirty; a leading-edge frame goes out at once when idle, otherwise one trailing frame perintervalMscarries every change made in the window. A heartbeat re-sends the state while idle.disposesends oneclearedframe. Nothing here touches elements, history, or the camera.Frames are valid by construction: identity is truncated to the wire caps (
name/colorto 64 characters,roleto 32) so a sender can never publish a frame the wire guard would reject outright; truncation is reported throughonError(aRangeError) rather than silent. An invalidid(empty or over 128 characters) throws instead of truncating.toolis never truncated: a tool name over 64 characters is omitted from the frame rather than corrupted. An over-long or empty selection id fails the selection closed (like a non-string filter entry) rather than being sent.intervalMsandheartbeatMsare normalised so a non-finite or out-of-range value (e.g.Infinity) can never arm a near-zero busy-loop timer. The selection filter is re-applied before every frame that carries a selection, so a policy change takes effect on the next frame without a selection event.