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

@ -11,7 +11,7 @@ export class MetaballScene 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;
@ -58,7 +58,7 @@ export class MetaballScene implements Scene {
currentTime: DOMHighResTimeStamp,
deltaTime: DOMHighResTimeStamp
): boolean {
this.renderer = renderer;
this.insights = renderer.insights;
const { width, height } = this.canvas.getBoundingClientRect();
const viewAreaWidth = width / Math.max(width, height);