MCPcopy Create free account
hub / github.com/alienkitty/space.js / constructor

Method constructor

src/ui/MuteButton.js:11–35  ·  view source on GitHub ↗
({
        sound,
        callback
    })

Source from the content-addressed store, hash-verified

9
10export class MuteButton extends Interface {
11 constructor({
12 sound,
13 callback
14 }) {
15 super('.button');
16
17 this.sound = sound;
18 this.callback = callback;
19
20 this.width = 24;
21 this.height = 16;
22 this.animatedIn = false;
23 this.needsUpdate = false;
24
25 this.props = {
26 progress: 0,
27 yMultiplier: this.sound ? 1 : 0
28 };
29
30 this.init();
31 this.initCanvas();
32 this.setSound(this.sound);
33
34 this.addListeners();
35 }
36
37 init() {
38 this.css({

Callers

nothing calls this directly

Calls 4

initMethod · 0.95
initCanvasMethod · 0.95
setSoundMethod · 0.95
addListenersMethod · 0.95

Tested by

no test coverage detected