Constructor
new Animator(fcn, steps, fps)
Sets parameters, then calls start(). To have the model not start immediately do:
- const anim = new Animator(<args>).stop()
Parameters:
Name | Type | Default | Description |
---|---|---|---|
fcn | function | The function the animator runs and controls | |
steps | number | How many steps to run. Default is -1, forever | |
fps | number | 30 | Max frames/second to run. Default is 30 |
- Source
Methods
start()
Starts the model running
- Source
Returns:
The animator, allows chaining
stop()
Stops the model running
- Source
Returns:
The animator, allows chaining