Facade()
The Facade() constructor creates a new Facade object.
Syntax
new Facade(svg)
Parameters
- svg
- An object representing an HTML <svg> tag, or CSS selectors.
- When a Core object is created within Facade, this parameter is passed to its constructor. In addition, Animator and BasicCreator objects are also created.
Examples
const facade = new jmotion.Facade("#board");
// facade = {
// "animator": {
// "arms": [],
// "core": {
// "back": g#board_back,
// "defs": defs#board_definition,
// "front": g#board_front,
// "middle": g#board_middle,
// "svg": svg#board,
// },
// "props": [],
// },
// "creator": {
// "offset": {
// "left": { "x": 0, "y": -10, },
// "right": { "x": 0, "y": -10, },
// },
// "paths": {
// "left": [
// [ path, path ],
// [ path, path ],
// ],
// "right": [
// [ path, path ],
// [ path, path ],
// ],
// },
// },
// }