Draw

oCanvas has a module called draw. This module is what handles the redrawing of the canvas. It contains a list of all added objects and methods for redrawing everything.

Methods

Properties

isCleared : Boolean (since version 2.1.0)
True if the canvas is cleared from all objects. Will be true until the next redraw happens.
objects : Array (deprecated in version 2.1.0)
Contains all objects that have been added to the canvas. Before version 2.0.0, this was an object, but is now an array. This is deprecated in version 2.1.0 and will be removed in the next major version. Use the children property of the core instance and display objects to find objects instead.
translation : Object
Contains the current canvas translation. This is always x: 0 and y: 0, except right when objects are being drawn, then the position is the same as obj.abs_x and obj.abs_y.