Refactor scene

This commit is contained in:
schmelczerandras 2020-09-17 17:51:53 +02:00
parent 77d5938b4b
commit 7e8ad0a125
10 changed files with 232 additions and 159 deletions

View file

@ -1,10 +1,5 @@
import { Drawable, DrawableDescriptor } from 'sdf-2d';
export interface Scene {
readonly descriptors: Array<DrawableDescriptor>;
animate(
currentTime: DOMHighResTimeStamp,
viewAreaSize: { width: number; height: number }
): void;
readonly drawables: Array<Drawable>;
initialize(canvas: HTMLCanvasElement, overlay: HTMLDivElement): Promise<void>;
drawNextFrame(currentTime: DOMHighResTimeStamp, deltaTime: DOMHighResTimeStamp): void;
destroy(): void;
}