code
void io.clear() Clear console output string io.load() Read data from input textarea. void io.dump(...any) Print arguments in console output.
Difference from standard setTimeout/setInterval that all timers are reseted before each code run number Timer.once(function callable, number ms) Call function with delay in ms microseconds number Timer.repeat(function callable, number ms) Repeat function every ms microseconds number Timer.repeatWhileTrue(function callable, number ms) Repeat function every ms microseconds while function result is true value void Timer.stop(number timerId) Cancel timer void Timer.stopAll() Cancel all timers
CanvasRenderingContext2D gfx.init(number width, number height) Resize canvas and return canvas 2d context void gfx.onmousedown(number x, number y) Override to catch mousedown event. Coordinates are adjusted to canvas top left corner void gfx.onmouseup(number x, number y) Override to catch mouseup event. Coordinates are adjusted to canvas top left corner void gfx.onmousemove(number x, number y) Override to catch mousemove event. Coordinates are adjusted to canvas top left corner
void Libload.load(string url, function callback) Loads external script and calls callback function. If script was already loaded just calls callback function.