Fix insights

This commit is contained in:
schmelczerandras 2020-10-21 09:31:32 +02:00
parent 8412c6bc9e
commit ee4fdadd76
8 changed files with 29 additions and 33 deletions

View file

@ -12,7 +12,7 @@ export class RainScene implements Scene {
private canvas: HTMLCanvasElement;
private overlay: HTMLDivElement;
public renderer?: Renderer;
public insights?: any;
public async run(canvas: HTMLCanvasElement, overlay: HTMLDivElement): Promise<void> {
this.canvas = canvas;
@ -47,7 +47,7 @@ export class RainScene implements Scene {
currentTime: DOMHighResTimeStamp,
deltaTime: DOMHighResTimeStamp
): boolean {
this.renderer = renderer;
this.insights = renderer.insights;
const { width, height } = this.canvas.getBoundingClientRect();
renderer.setViewArea(vec2.fromValues(0, height), vec2.fromValues(width, height));