Add insights

This commit is contained in:
schmelczerandras 2020-10-20 23:09:53 +02:00
commit b445961ad5

View file

@ -10,6 +10,7 @@ const Circle = CircleFactory(rgb255(119, 143, 120));
export class BlobScene implements Scene {
private canvas: HTMLCanvasElement;
private overlay: HTMLDivElement;
public renderer?: Renderer;
public async run(canvas: HTMLCanvasElement, overlay: HTMLDivElement): Promise<void> {
this.canvas = canvas;
@ -52,6 +53,8 @@ export class BlobScene implements Scene {
currentTime: DOMHighResTimeStamp,
deltaTime: DOMHighResTimeStamp
): boolean {
this.renderer = renderer;
const { width, height } = this.canvas.getBoundingClientRect();
renderer.setViewArea([0, height], [width, height]);