Table of contents
class ScribbleManager {}

Constructor

Constructs a new instance of the ScribbleManager class

Parameters
NameDescription

editor

Editor

Properties

addPoint

Set the scribble's next point.

addPoint: (id: ScribbleItem['id'], x: number, y: number) => ScribbleItem
Parameters
NameDescription

point

The point to add.


addScribble

addScribble: (scribble: Partial<TLScribble>, id?: string) => ScribbleItem

scribbleItems

scribbleItems: Map<string, ScribbleItem>

state

state: 'paused' | 'running'

stop

Start stopping the scribble. The scribble won't be removed until its last point is cleared.

stop: (id: ScribbleItem['id']) => ScribbleItem

tick

Update on each animation frame.

tick: (elapsed: number) => void
Parameters
NameDescription

elapsed

The number of milliseconds since the last tick.


Methods

reset()

reset(): void

Rectangle2dShapeUtil