Members
unitAccelerationMagnitude
Change of speed per frame which corresponds to 1 unit speed per second.
Set by setFrameRate().
unitAngleSpeed
Anglular displacement in radians per frame which corresponds to 1 cycle per second.
Set by setFrameRate().
unitSpeed
Positional displacement per frame which corresponds to 1 unit length per second.
Set by setFrameRate().
Methods
createScalableCanvas(type, parametersopt, rendererTypeopt)
Create an instance of ScalableCanvas. This includes calling of createCanvas().
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
ScalableCanvasType
|
Type chosen from p5ex.ScalableCanvasTypes. | |
parameters |
ScalableCanvasParameters
|
<optional> |
Parameters for type CUSTOM. |
rendererType |
string
|
<optional> |
Either P2D or WEBGL. |
resizeScalableCanvas(typeopt, parametersopt)
Resizes the ScalableCanvas. Does not work on OpenProcessing.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
ScalableCanvasType
|
<optional> |
Type chosen from p5ex.ScalableCanvasTypes. If undefined, the last used type will be used again. |
parameters |
ScalableCanvasParameters
|
<optional> |
Parameters for type CUSTOM. |
setCurrentRenderer(renderer)
Sets the current renderer object.
Parameters:
Name | Type | Description |
---|---|---|
renderer |
setFrameRate(fpsopt)
Calls frameRate() and sets variables related to the frame rate.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fps |
number
|
<optional> |
60 | The ideal frame rate per second. |