$.
$ is the core of Teach and Draw. Through the $ we can access all of the libraries functionality.
Modules
- $.shape//Controls for Drawing Shapesdrawing
- $.state//Manage configurations of object parametersdrawing, settings
- $.camera//Controls Camera
- $.storage//Lets you save objects and values to storage to persist between browser refreshesstorage, save, load
- $.colour//Colour settings for drawing modules such as shape and textcolour, color, drawing, text, shape
- $.keys//keyboard controls for usersinput, controls, game, interface
- $.math//Commonly used math methods.
- $.touch//Touch controls
- $.mouse//Mouse interactiongame, input, controls, flatclicker
- $.text//controls for formatting and outputting textdrawing, output, game
- Group//A enhanced Array for TaDgame, collection, data
- Button//Button created by $.makeButton()input, gui, graphical user interface, entity, control
- Dropdown//Dropdown Entity created $.makeDropdowninput, gui, graphical user interface, entity, control
- Slider//Slider Entity created by $.makeSlider()input, gui, graphical user interface, entity, control
- Checkbox//Checkbox created by $.makeCheckbox()input, gui, graphical user interface, entity, control
- Image//Image Entity created by $.loadImage()drawing, load, game, entity
- Collider//Collider created by $.makeBoxCollider() and $.makeCircleCollider()physics, game, entity
- Animation//Controls for Animationdrawing, load, game, entity
- Sound//Sound created by $.loadSound()load, game
Properties
Methods
- $.loadCustomFont (name,filepath)//Used to load a custom font for use in the program. Must be file type ttf, otf, woff or woff2.
- $.loadSound (filepath)//Queues a sound to be loaded.
- $.loadImage (x,y,filepath)//Queues an image to be loaded and returns a Image Entity.
- $.loadJsonFile (filepath)//Queues a json file to be loaded and returns an object
- $.loadTextFile (filepath)//Queues a text file to be loaded and returns an array of text
- $.loadAnimation (x,y,filepaths)//Queues an animation to be loaded and returns an animationWrapper entity
- $.makeGroup (values)//Returns a new Group
- $.makeButton (x,y,w,h,label)//Returns a button
- $.makeDropdown (x,y,w,options)//Returns a dropdown
- $.makeCheckbox (x,y,w,h)//Returns a checkbox
- $.makeSlider (x,y,w)//Returns a slider
- $.makeBoxCollider (x,y,w,h)//Returns a box collider
- $.makeCircleCollider (x,y,d)//Returns a circle collider
- $.drawColliders ()//Calls the .draw() of all colliders that exist