@kayelaa/canvas API - v0.2.15
    Preparing search index...

    Function createScene

    • Creates a scene that manages a collection of entities and their update/draw lifecycle.

      Scenes handle z-sorted drawing, paused state, and entity addition/removal. Use scene.spawn() to mount a root component tree.

      Parameters

      • name: string

        Unique identifier for the scene

      Returns KaylaInternals.KaylaScene

      A KaylaScene wrapper with .spawn() and other methods

      const scene = createScene("main");
      scene.spawn(<GameWorld />);