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
): ScribbleItemParameters
| Name | Description | 
|---|---|
| 
 | The id of the scribble to add a point to. | 
| 
 | The x coordinate of the point. | 
| 
 | The y coordinate of the point. | 
| 
 | The z coordinate of the point. | 
Returns
addScribble()
addScribble(scribble: Partial<TLScribble>, id?: string): ScribbleItemParameters
| Name | Description | 
|---|---|
| 
 |  | 
| 
 |  | 
Returns
reset()
reset(): voidstop()
Start stopping the scribble. The scribble won't be removed until its last point is cleared.
stop(id: ScribbleItem['id']): ScribbleItemParameters
| Name | Description | 
|---|---|
| 
 |  | 
Returns
tick()
Update on each animation frame.
tick(elapsed: number): voidParameters
| Name | Description | 
|---|---|
| 
 | The number of milliseconds since the last tick. | 
Returns
voidPrev
Rectangle2dNext
ShapeUtil