Nocturna
    Preparing search index...

    Class BaseSceneAbstract

    Abstract base class for all game scenes in Nocturna.

    Handles Babylon.js scene creation, rendering, physics initialization (Havok), and input management. Provides utility methods for restarting the scene, enabling the debug layer, and rendering.

    Subclasses must implement the update method for per-frame logic.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    engine: Engine

    The Babylon.js engine instance.

    inputHandler: InputHandler

    Handles user input for the scene.

    scene: Scene

    The Babylon.js scene instance.

    Methods

    • Initializes Havok physics for the scene with high gravity and a fixed timestep. Should be called asynchronously.

      Returns Promise<void>

    • Enables the Babylon.js debug layer for scene inspection.

      Returns void

    • Restarts the scene by disposing and recreating it.

      Returns void

    • Abstract update method to be implemented by subclasses. Called every frame with the time delta.

      Parameters

      • dt: number

        Time delta since last frame (in seconds).

      Returns void