prendy
Version:
Make games with prerendered backdrops using babylonjs and repond
14 lines (11 loc) • 348 B
text/typescript
import { Engine, Scene } from "@babylonjs/core";
import { getRefs } from "repond";
export function getScene() {
const globalRefs = getRefs().global.main;
return globalRefs.scene as null | Scene;
}
export function getEngine() {
const scene = getScene();
const engine = scene ? scene.getEngine() : null;
return engine as null | Engine;
}