MCPcopy Create free account
hub / github.com/bwasti/mebm / render_time

Method render_time

script.js:447–458  ·  view source on GitHub ↗
(ctx, y_coord, base_width, selected)

Source from the content-addressed store, hash-verified

445
446 // moveable layers have anchor points we'll want to show
447 render_time(ctx, y_coord, base_width, selected) {
448 super.render_time(ctx, y_coord, base_width, selected);
449 let scale = ctx.canvas.clientWidth / this.player.total_time;
450 let width = 4 * base_width;
451 for (let i = 0; i < this.frames.length; ++i) {
452 if (this.is_anchor(i)) {
453 let anchor_x = this.start_time + 1000 * (i / fps);
454 ctx.fillStyle = `rgb(100,210,255)`;
455 ctx.fillRect(scale * anchor_x, y_coord - width / 2, 3, width);
456 }
457 }
458 }
459
460}
461

Callers

nothing calls this directly

Calls 2

is_anchorMethod · 0.95
render_timeMethod · 0.45

Tested by

no test coverage detected