Class Fz2D
| Defined in: | src/fz2d.coffee |
Overview
Constant Summary
-
VERSION
=
Public: Version Number.
-
'0.0.6' -
NONE
=
Public: None.
-
0 -
FG
=
Public: Default foreground color.
-
'#FFFFFF' -
BG
=
Public: Default background color.
-
'#3F7CB6' -
SELECTOR
=
Public: Default canvas selector.
-
'#canvas' -
PATH
=
Public: Default assets path.
-
'assets'
Class Method Summary
- .any(o) Returns true if an array, hash or string is not empty.
- .appendEl(el, parent = document.body) Adds a HTML DOM element to a parent HTML DOM element.
- .callable(o) Returns true if the argument if a callable.
- .clamp(d, min, max) Clamps a given number between two limits.
- .collide(o1, o2, cb) Determines if there's a collision between two objects.
- .contains(o, p) Determines if an object or group contains a point.
- .createEl(type, attrs = {}, styles = {}) Creates a new HTML DOM element.
- .dist(o1, o2) Determines the distance between two objects.
- .distSqr(o1, o2) Determines the squared distance between two objects.
- .empty(o) Returns true if an array, hash or string is empty.
- .enumerable(o) Returns true if the argument is enumerable.
- .getCollisionSide(o1, o2) Determines the side of a collision.
- .getJSON(url, cb) Performs an asynchronous HTTP GET request.
- .object(o) Returns true if the argument is an object.
- .overlap(o1, o2) Determines if an object or group overlaps with another object or group.
- .present(o) Returns true if an array, hash or string is not empty.
- .require(file) Requires a single class of Fz2D, used by tests.
- .setStyleEl(el, styles = {}) Sets style properties of a HTML DOM element.
- .step(t, d, min, max) Linearly interpolates a number within two limits based on time.
- .string(o) Returns true if the argument is a string.
- .swap(a, b) Swaps A with B.
- .toRGB(color) Converts HTML color code into floating point RGB components.
Class Method Details
.any(o) Source
.appendEl(el, parent = document.body) Source
.callable(o) Source
.clamp(d, min, max) Source
.collide(o1, o2, cb) Source
.contains(o, p) Source
.createEl(type, attrs = {}, styles = {}) Source
.dist(o1, o2) Source
.distSqr(o1, o2) Source
.empty(o) Source
.enumerable(o) Source
.getCollisionSide(o1, o2) Source
.getJSON(url, cb) Source
.object(o) Source
.overlap(o1, o2) Source
.present(o) Source
.require(file) Source
.setStyleEl(el, styles = {}) Source
.step(t, d, min, max) Source
.string(o) Source
.swap(a, b) Source
.toRGB(color) Source