Interface: PointerStore
@roomful/svelte / PointerStore
Interface: PointerStore
Section titled “Interface: PointerStore”Defined in: packages/svelte/src/index.ts:377
Readable pointer (laser pointer) store augmented with DOM and control helpers.
Extends
Section titled “Extends”Readable<PointerBeam[]>
Properties
Section titled “Properties”activate()
Section titled “activate()”activate: () =>
void
Defined in: packages/svelte/src/index.ts:393
Starts broadcasting the local pointer beam to all peers.
Starts broadcasting this peer’s pointer beam. While active, pointer movement over the mounted element is broadcast to peers.
Returns
Section titled “Returns”void
Nothing.
deactivate()
Section titled “deactivate()”deactivate: () =>
void
Defined in: packages/svelte/src/index.ts:398
Stops broadcasting the local pointer beam so peers drop it.
Stops broadcasting and announces an inactive beam so peers drop it (the laser disappears).
Returns
Section titled “Returns”void
Nothing.
mount:
Action<HTMLElement,undefined>
Defined in: packages/svelte/src/index.ts:381
Svelte action that mounts pointer tracking on a container element.
render()
Section titled “render()”render: (
options?) =>Unsubscribe
Defined in: packages/svelte/src/index.ts:404
Renders the built-in pointer overlay over a container, returning a cleanup function.
Renders a built-in, zero-config DOM overlay that draws every remote active beam over the container, updating as beams change. This is a convenience layer; apps that draw their own pointers can ignore it and use PointerEngine.subscribe instead.
Parameters
Section titled “Parameters”options?
Section titled “options?”PointerRenderOptions
The overlay container and style.
Returns
Section titled “Returns”Unsubscribe
A cleanup function that removes the overlay.
Methods
Section titled “Methods”subscribe()
Section titled “subscribe()”subscribe(
this,run,invalidate?):Unsubscriber
Defined in: node_modules/.pnpm/svelte@4.2.20/node_modules/svelte/types/index.d.ts:1619
Subscribe on value changes.
Parameters
Section titled “Parameters”void
Subscriber<PointerBeam[]>
subscription callback
invalidate?
Section titled “invalidate?”Invalidator<PointerBeam[]>
cleanup callback
Returns
Section titled “Returns”Unsubscriber
Inherited from
Section titled “Inherited from”Readable.subscribe
unmount()
Section titled “unmount()”unmount():
void
Defined in: packages/svelte/src/index.ts:388
Unmounts pointer tracking.
Returns
Section titled “Returns”void
Nothing.