(ctx, time, update_preview)
| 1278 | } |
| 1279 | |
| 1280 | render(ctx, time, update_preview) { |
| 1281 | ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); |
| 1282 | for (let layer of this.layers) { |
| 1283 | if (layer.start_time > time) { |
| 1284 | continue; |
| 1285 | } |
| 1286 | if (layer.start_time + layer.total_time < time) { |
| 1287 | continue; |
| 1288 | } |
| 1289 | layer.render(ctx, time); |
| 1290 | if (update_preview) { |
| 1291 | layer.show_preview(time); |
| 1292 | } |
| 1293 | } |
| 1294 | } |
| 1295 | |
| 1296 | resize_time() { |
| 1297 | this.time_canvas.style.width = this.time_holder.clientWidth * this.time_scale; |
no test coverage detected