@mocanvas/mocanvas · class

LaserTool

declare class LaserTool extends StateNode

Point at things: a fading trail that never becomes a shape.


Methods · 1

getSessionId(): string | null

The id of the scribble this tool is currently drawing, or null when it is idle — including while the last trail is still fading, which is a scribble the tool no longer owns.

Exposed so a renderer, an overlay or a test can address the live trail without reaching into the manager's bookkeeping.


Properties · 4

static children: () => StateNodeConstructor[]
static id: string
static initial: string
sessionId: string | null

Set while a stroke is in progress; read through getSessionId.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.