References
dom
summary | ||
public |
C Slider Class used to handle the sliders and their labels. |
|
public |
C Button Class used to handle a button (<button>). |
|
private |
Parent class for handling DOM elements. |
|
public |
C Input Class used to handle an Input (<input>). |
|
public |
C Option Class used to handle a checkbox (<input type="checkbox">). |
|
public |
C Options Class used to handle a set of multiple radio buttons (<input type="radio">). |
|
public |
C Select Class used to handle select elements (<select>). |
elements
summary | ||
private |
C Axis The Axis class is responsible for drawing the axis onto the canvas and setting the new origin used for the canvas. |
|
public |
C Ball The Ball class is a particle class used to draw round particles with the advantage that they can be labeled and displayed with a gradient, giving a more realistic feel to the particle. |
|
private |
C Graph A Graph Box allow for Plot elements to be displayed in the box using a different scale to the main axis in the world. |
|
private |
C Label A Label Box allows for a pair of label and value to be displayed. |
|
private |
C Text A Text Box allows for text to be displayed on a Box element. |
|
public |
C Box A Box allows for a window like object to be displayed in the world. |
|
public |
The DataCursor class is used to add data cursors to plots. |
|
public |
C Picture The Picture class is used to draw images on the screen. |
|
public |
C Plot The Plot class can be used to draw a line plot or a histogram on an axis. |
|
public |
C Shape The Shape class is used to draw shapes manually onto the world. |
|
public |
C Vector The Vector class is used for handling vector quantities and for drawing them onto the world. |
utils
summary | ||
private |
C Font Stores the font settings currently used by a World Element. |
|
private |
C Renderer Enables an element to be prerendered in a hidden canvas. |
|
public |
C Scale Stores the scale properties in a particular axis (-x or -y). |
|
public |
F calcStepSize(value: number, stepAmount: number): number Finds the best fitting scale for a given range. |
|
public |
Constrain a value within a range of values. |
|
public |
Cosine function that can accept angles in radians or degrees. |
|
public |
Given a set of two points the squared distance is calculated. |
|
public |
Makes sure that a HTML id allways has a # at the beginning. |
|
public |
Format a number to have a certain number of decimal places and/or fixed places and add a unit label. |
|
public |
Generate a random number following a gaussian distribuition. |
|
public |
F getPixelRatio(): number Obtains the pixel ratio of the device. |
|
public |
Determines if a point is inside of a box. |
|
public |
F isFunction(f: object): boolean Test if an object is a function. |
|
public |
Test if an object is an object. |
|
public |
Test if an object is a string. |
|
public |
F loadOptions(obj: object, args: object) Assign the matching properties from the args object to the obj object. |
|
public |
Given an angle makes sure that it is in radians. |
|
public |
Adds an alpha channel to an rgb color. |
|
public |
Round a number to a given amount of decimal places. |
|
public |
Sine function that can accept angles in radians or degrees. |
|
public |
V ANGLE_STYLE: {"DEG": number, "RAD": number} Defines if the angle used is in radians or degrees. |
|
public |
Avogadro constant. |
|
public |
Boltzmann constant. |
|
public |
V BOX_COLORS: {"BLUE": *, "GREEN": *, "RED": *, "YELLOW": *, "ORANGE": *, "PURPLE": *, "GRAY": *} Defines the default colors used for box displays. |
|
public |
Conversion factor from cubic centimeters to cubic meters. |
|
public |
Conversion factor from centimeters to meters. |
|
public |
V COLORS: {"RED": string, "BLUE": string, "GREEN": string, "YELLOW": string, "PURPLE": string, "BROWN": string, "LIGHT_GREEN": string, "GRAY": string, "LIGHT_GRAY": string, "WHITE": string, "BLACK": string, "COMPONENT": string} Defines the default colors used for simulations. |
|
public |
Cosine of 30°. |
|
public |
Cosine of 60°. |
|
public |
Types of cursors that an object can have when hovered or dragged. |
|
public |
V DEG_TO_RAD: number Conversion factor from degrees to radians. |
|
public |
V DRAG_NOTHING: null Used when the mouse isn't dragging an object. |
|
public |
Vacuum permittivity constant. |
|
public |
PI / 5 constant. |
|
public |
Defines the default font used for all simulations. |
|
public |
V FONT_ALIGN: string[] Defines teh valid font alignments. |
|
public |
V FONT_BASELINE: string[] Defines the valid font baselines. |
|
public |
V FONT_COLOR: string Defines the default font color for all simulaions. |
|
public |
s Defines the default font size for all simulations. |
|
public |
PI / 4 constant. |
|
public |
Graviy constant. |
|
public |
PI / 2 constant. |
|
public |
Coulomb's constant. |
|
public |
Log 10 constant. |
|
public |
V MOVE_STYLE: {"BY_PX": string, "BY_UNITS": string} Defines how the coordinates of an object will be changed when the object is dragged around. |
|
public |
Conversion factor from meters to centimeters. |
|
public |
Used when the mouse isn't over an object. |
|
public |
Conversion factor from pascals to atmospheres. |
|
public |
PI constant. |
|
public |
V RAD_TO_DEG: number Conversion factor from radians to degrees. |
|
public |
V SHAPE_STYLE: {"NONE": *, "ACCOMULATIVE": number} Defines how a shape is drawn with the methods Shape.moveTo and Shape.lineTo. |
|
public |
Sine of 30°. |
|
public |
Sine of 60°. |
|
public |
PI / 6 constant. |
|
public |
V SYMBOL: {"BLANK": string, "THETA": string, "INF": string, "MICRO": string, "OHM": string, "LETTERS": string} Useful symbols for simulations. |
|
public |
PI / 3 constant. |
|
public |
2 * PI constant. |
world
summary | ||
public |
C World The World class handles the canvas and the drawing of elements. |
|
private |
Parent class for all elements added to the world. |