Class: ScenePainter

algeobraCanvas~ScenePainter(scene, drawFunc)

Class to simplify keeping a drawing updated, when changes in the scene occur. Updates are queued for the next animation frame, so multiple updates after another don't trigger many draw updates

Constructor

new ScenePainter(scene, drawFunc)

Parameters:
Name Type Default Description
scene GeometryScene The scene to draw
drawFunc ScenePainter~drawCallback null The function that draws the scene. Additional parameters give information about what happened since the last draw
Source:

Methods

start()

Starts the drawing update. Will enqueue a drawing operation
Source:

stop()

Stops the drawing from updating
Source: