Update engineControllerBase.ts

This commit is contained in:
syuilo 2026-05-13 21:13:26 +09:00 committed by GitHub
commit 410cc8ac50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,9 +18,9 @@ export type EngineControllerBaseOptions = {
};
// 抽象化レイヤー
export abstract class EngineControllerBase {
export abstract class EngineControllerBase<T extends RoomEngineBase> {
private worker: Worker | null = null;
private engine: RoomEngineBase | null = null;
private engine: T | null = null;
private canvas: HTMLCanvasElement | null = null;
protected options: EngineControllerBaseOptions;
private returnHooks = new Map<number, (value: any) => void>();
@ -35,7 +35,7 @@ export abstract class EngineControllerBase {
protected async _init_(canvas: HTMLCanvasElement, params: {
createWorker: (offscreen: OffscreenCanvas) => Promise<Worker>;
createEngine: (babylonEngine: BABYLON.WebGPUEngine) => Promise<RoomEngineBase>;
createEngine: (babylonEngine: BABYLON.WebGPUEngine) => Promise<T>;
}) {
this.canvas = canvas;