MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / start

Method start

modules/drivers/neostrand/neostrand.js:503–519  ·  view source on GitHub ↗
(ms = this.freq)

Source from the content-addressed store, hash-verified

501 }
502
503 start(ms = this.freq) {
504 //trace("start - ms: " + ms + "\n");
505 this.running = 1;
506 this.fill(0);
507
508 this.scheme.forEach( function(effect) {
509 effect.activate(effect);
510 trace(` activating: ${effect.name} [${effect.start}-${effect.end}]\n`);
511 } );
512 this.timer = Timer.repeat(id => {
513 let t = Time.ticks;
514 this.scheme.forEach( function(effect) { effect.idle(effect, t); });
515 this.update(this);
516
517 //trace("effect cycle took" + (Time.ticks - t) + "ms\n");
518 }, ms);
519 }
520
521 stop() {
522 Timer.clear(this.timer);

Callers 1

setSchemeMethod · 0.95

Calls 5

updateMethod · 0.95
repeatMethod · 0.80
idleMethod · 0.80
fillMethod · 0.65
activateMethod · 0.45

Tested by

no test coverage detected