You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
642 B
23 lines
642 B
function Controls(node, animation) {
|
|
this.node = node;
|
|
this.animation = new animation(node);
|
|
|
|
if (this.animation.init === undefined) {
|
|
console.error("Animation passed to Control doesn't have an init() method.");
|
|
}
|
|
|
|
if (this.animation.reset === undefined) {
|
|
console.error("Animation passed to Control doesn't have a reset() method.");
|
|
}
|
|
|
|
this.animation.init();
|
|
}
|
|
|
|
Controls.prototype.mount = function() {
|
|
// this.node.style.border = '10px solid purple'; WORKING
|
|
|
|
// right aligned panel, pass in extra custom controls array of nodes
|
|
// set of prescribed styles
|
|
}
|
|
|
|
export default Controls;
|
|
|