import { Vector3, Scene, Engine } from 'babylonjs'; import { ArcRotateCamera, FollowCamera, FreeCamera } from 'babylonjs'; import { HemisphericLight } from 'babylonjs'; import { AmmoJSPlugin } from 'babylonjs'; import { AdvancedDynamicTexture } from 'babylonjs-gui'; import { ScalarTween, V3Tween } from '../middle/tween'; import { BabyEngine, MeshHandle, gameCmd } from '../middle/babyengine'; import { PhysicsImpostor } from 'babylonjs'; export declare class Babylon { canvas: HTMLCanvasElement; engine: Engine; scene: Scene; camera: ArcRotateCamera | FollowCamera | FreeCamera; isCameraSet: boolean; activeCameraHandle: MeshHandle; playerNumber: number; advancedTexture: AdvancedDynamicTexture; babyEngine: BabyEngine; light0: HemisphericLight; light1: HemisphericLight; gravityVector: Vector3; physicsPlugin: AmmoJSPlugin; constructor(babyEngine: BabyEngine); enableAmmo(): Promise; createBabylonMesh(cmd: gameCmd, handle: MeshHandle): void; setCamera(cmd: gameCmd, handle: MeshHandle): void; attachControls(cmd: gameCmd, handle: MeshHandle): void; setOrthographic(cmd: gameCmd, handle: MeshHandle): void; impostorLookup(a: PhysicsImpostor): MeshHandle; /** if Ammo tells us a collision happened, this cleans up and notifies the parties */ onCollisionHelper(a: PhysicsImpostor, b: PhysicsImpostor): void; importShape(cmd: gameCmd, handle: MeshHandle): void; dispose(cmd: gameCmd, handle: MeshHandle): void; addSkeleton(cmd: gameCmd, handle: MeshHandle): void; attachTo(cmd: gameCmd, handle: MeshHandle): void; addAxes(cmd: gameCmd, handle: MeshHandle): void; collide(cmd: gameCmd, handle: MeshHandle): void; setColor(cmd: gameCmd, handle: MeshHandle): void; setPosition(cmd: gameCmd, handle: MeshHandle): void; addToPosition(cmd: gameCmd, handle: MeshHandle): void; setRotation(cmd: gameCmd, handle: MeshHandle): void; addToRotation(cmd: gameCmd, handle: MeshHandle): void; setScale(cmd: gameCmd, handle: MeshHandle): void; setGrid(cmd: gameCmd, handle: MeshHandle): void; move(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; moveToward(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; moveToZero(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; moveSetupTween(cmd: gameCmd, tween: V3Tween, handle: MeshHandle, start: Vector3, end: Vector3): void; turn(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; moveAndTurn(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; turnSetupV3Tween(cmd: gameCmd, tween: V3Tween, handle: MeshHandle, start: Vector3, end: Vector3): void; size(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; color(cmd: gameCmd, tween: V3Tween, handle: MeshHandle): void; opacity(cmd: gameCmd, tween: ScalarTween, handle: MeshHandle): void; animatedGif(cmd: gameCmd, tween: ScalarTween, handle: MeshHandle): void; break(cmd: gameCmd, handle: MeshHandle): void; createGUI(cmd: gameCmd, handle: MeshHandle): void; textGUI(cmd: gameCmd, handle: MeshHandle): void; colorGUI(cmd: gameCmd, handle: MeshHandle): void; positionGUI(cmd: gameCmd, handle: MeshHandle): void; resizeGUI(cmd: gameCmd, handle: MeshHandle): void; /** can't resize an impostor, so drop it and recreate */ recreatePhysicsImpostor(handle: MeshHandle): void; inspector(cmd: gameCmd): void; setTexture(cmd: gameCmd, handle: MeshHandle): void; print(cmd: gameCmd, handle: MeshHandle): void; drawScreen(handle: MeshHandle): void; penUp(cmd: gameCmd, handle: MeshHandle): void; penDown(cmd: gameCmd, handle: MeshHandle): void; lineErase(cmd: gameCmd, handle: MeshHandle): void; gameDispose(): void; drawGrid(cmd: gameCmd, handle: MeshHandle): void; drawLine(cmd: gameCmd, handle: MeshHandle): void; drawCircle(cmd: gameCmd, handle: MeshHandle): void; drawRect(cmd: gameCmd, handle: MeshHandle): void; textAt(cmd: gameCmd, handle: MeshHandle): void; runRenderStep(): this; runPhysicsStep(): void; }