Clone
4
Variables
Hugo H edited this page 2025-12-25 21:00:03 +00:00

The following variables are provided by the library:

Name Type Description
s.W float The current width of the canvas
s.H float The current height of the canvas
s.CENTERX float Horizontal center of the canvas (W/2)
s.CENTERY float Vertical center of the canvas (H/2)
s.MX float Mouse/Touch X
s.MY float Mouse/Touch Y
s.T float Seconds elapsed since start
s.DT float Delta time (Time between frames)
s.PI float Pi
s.TWO_PI float 2*s.PI
s.HALF_PI float s.PI/2

They can be used anywhere in the code, however you need to run s.start() first