ScribbleManager
See source codeTable of contents
class ScribbleManager {}
Constructor
Constructs a new instance of the ScribbleManager
class
Parameters
Name | Description |
---|---|
|
Properties
scribbleItems
scribbleItems: Map<string, ScribbleItem>
state
state: 'paused' | 'running'
Methods
addPoint()
Set the scribble's next point.
addPoint(
id: ScribbleItem['id'],
x: number,
y: number,
z?: number
): ScribbleItem
Parameters
Name | Description |
---|---|
|
|
|
|
|
|
|
|
Returns
addScribble()
addScribble(scribble: Partial<TLScribble>, id?: string): ScribbleItem
Parameters
Name | Description |
---|---|
|
|
|
|
Returns
reset()
reset(): void
stop()
Start stopping the scribble. The scribble won't be removed until its last point is cleared.
stop(id: ScribbleItem['id']): ScribbleItem
Parameters
Name | Description |
---|---|
|
|
Returns
tick()
Update on each animation frame.
tick(elapsed: number): void
Parameters
Name | Description |
---|---|
|
The number of milliseconds since the last tick. |
Returns
void
Prev
Rectangle2dNext
ShapeUtil