Add insights
This commit is contained in:
parent
49ea5f3e86
commit
b445961ad5
8 changed files with 94 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ export class MetaballScene implements Scene {
|
|||
|
||||
private canvas: HTMLCanvasElement;
|
||||
private overlay: HTMLDivElement;
|
||||
public renderer?: Renderer;
|
||||
|
||||
public async run(canvas: HTMLCanvasElement, overlay: HTMLDivElement): Promise<void> {
|
||||
this.canvas = canvas;
|
||||
|
|
@ -57,6 +58,8 @@ export class MetaballScene implements Scene {
|
|||
currentTime: DOMHighResTimeStamp,
|
||||
deltaTime: DOMHighResTimeStamp
|
||||
): boolean {
|
||||
this.renderer = renderer;
|
||||
|
||||
const { width, height } = this.canvas.getBoundingClientRect();
|
||||
const viewAreaWidth = width / Math.max(width, height);
|
||||
const viewAreaHeight = height / Math.max(width, height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue