Update public/AnimSys.js
Browse files- public/AnimSys.js +12 -6
public/AnimSys.js
CHANGED
@@ -14,35 +14,41 @@ class AnimSys {
|
|
14 |
this.UI.id('ui-container');
|
15 |
|
16 |
this.createFrame_btn = createButton('<i class="fa-solid fa-circle-plus"></i>');
|
17 |
-
this.createFrame_btn.mousePressed(this.create_new_frame.bind(this))
|
|
|
18 |
//this.createFrame_btn.parent(this.UI);
|
19 |
this.createFrame_btn.parent('right-panel');
|
20 |
|
21 |
this.show_onion_btn = createButton('<span class="spec-onions"><i class="fa-regular fa-circle"></i><i class="fa-solid fa-circle"></i><span>');
|
22 |
-
this.show_onion_btn.mousePressed(this.switch_onions.bind(this))
|
|
|
23 |
//this.show_onion_btn.parent(this.UI);
|
24 |
this.show_onion_btn.parent('right-panel');
|
25 |
|
26 |
this.hide_onion_btn = createButton('<span class="spec-onions"><i class="fa-regular fa-circle"></i><i class="fa-solid fa-circle"></i><span>').hide();
|
27 |
this.hide_onion_btn.id('hide-onion-btn');
|
28 |
-
this.hide_onion_btn.mousePressed(this.switch_onions.bind(this))
|
|
|
29 |
//this.hide_onion_btn.parent(this.UI);
|
30 |
this.hide_onion_btn.parent('right-panel');
|
31 |
|
32 |
this.clear_frame_btn = createButton('<i class="fa-solid fa-hand-sparkles"></i>');
|
33 |
-
this.clear_frame_btn.mousePressed(this.clear_frame.bind(this))
|
|
|
34 |
//this.clear_frame_btn.parent(this.UI);
|
35 |
this.clear_frame_btn.parent('left-panel');
|
36 |
|
37 |
this.play_btn = createButton('<i class="fa-solid fa-play"></i>');
|
38 |
this.play_btn.id('play-btn');
|
39 |
-
this.play_btn.mousePressed(this.play_anim.bind(this))
|
|
|
40 |
//this.play_btn.parent(this.UI);
|
41 |
this.play_btn.parent('right-panel');
|
42 |
|
43 |
this.stop_btn = createButton('<i class="fa-solid fa-pause"></i>').hide();
|
44 |
this.stop_btn.id('stop-btn');
|
45 |
-
this.stop_btn.mousePressed(this.play_anim.bind(this))
|
|
|
46 |
//this.stop_btn.parent(this.UI);
|
47 |
this.stop_btn.parent('right-panel');
|
48 |
|
|
|
14 |
this.UI.id('ui-container');
|
15 |
|
16 |
this.createFrame_btn = createButton('<i class="fa-solid fa-circle-plus"></i>');
|
17 |
+
this.createFrame_btn.mousePressed(this.create_new_frame.bind(this))
|
18 |
+
.attribute('title', 'Create new virgin frame');
|
19 |
//this.createFrame_btn.parent(this.UI);
|
20 |
this.createFrame_btn.parent('right-panel');
|
21 |
|
22 |
this.show_onion_btn = createButton('<span class="spec-onions"><i class="fa-regular fa-circle"></i><i class="fa-solid fa-circle"></i><span>');
|
23 |
+
this.show_onion_btn.mousePressed(this.switch_onions.bind(this))
|
24 |
+
.attribute('title', 'Show onions');
|
25 |
//this.show_onion_btn.parent(this.UI);
|
26 |
this.show_onion_btn.parent('right-panel');
|
27 |
|
28 |
this.hide_onion_btn = createButton('<span class="spec-onions"><i class="fa-regular fa-circle"></i><i class="fa-solid fa-circle"></i><span>').hide();
|
29 |
this.hide_onion_btn.id('hide-onion-btn');
|
30 |
+
this.hide_onion_btn.mousePressed(this.switch_onions.bind(this))
|
31 |
+
.attribute('title', 'Hide onions');
|
32 |
//this.hide_onion_btn.parent(this.UI);
|
33 |
this.hide_onion_btn.parent('right-panel');
|
34 |
|
35 |
this.clear_frame_btn = createButton('<i class="fa-solid fa-hand-sparkles"></i>');
|
36 |
+
this.clear_frame_btn.mousePressed(this.clear_frame.bind(this))
|
37 |
+
.attribute('title', 'Clear the canvas');
|
38 |
//this.clear_frame_btn.parent(this.UI);
|
39 |
this.clear_frame_btn.parent('left-panel');
|
40 |
|
41 |
this.play_btn = createButton('<i class="fa-solid fa-play"></i>');
|
42 |
this.play_btn.id('play-btn');
|
43 |
+
this.play_btn.mousePressed(this.play_anim.bind(this))
|
44 |
+
.attribute('title', 'Play animation');
|
45 |
//this.play_btn.parent(this.UI);
|
46 |
this.play_btn.parent('right-panel');
|
47 |
|
48 |
this.stop_btn = createButton('<i class="fa-solid fa-pause"></i>').hide();
|
49 |
this.stop_btn.id('stop-btn');
|
50 |
+
this.stop_btn.mousePressed(this.play_anim.bind(this))
|
51 |
+
.attribute('title', 'Pause animation');
|
52 |
//this.stop_btn.parent(this.UI);
|
53 |
this.stop_btn.parent('right-panel');
|
54 |
|