Define WorldNavigationService interface.

Implements

Constructors

Accessors

Methods

  • Get the World configuration.

    Parameters

    • worldId: string

      The id of the world.

    Returns Promise<null | {
        preload: boolean;
        sceneList: {
            id: string;
            name: string;
            url: string;
        }[];
        worldId: string;
    }>

    • The configuration of the world. If the world is not found, the promise will return null.
  • Switch to a new scene.

    Parameters

    • sceneName: string

      The name of the scene.

    • Optionaloptions: {
          onComplete: (() => {});
          switchChannel: boolean;
          worldId: string;
      }

      Optional parameters.

      • onComplete: (() => {})

        Callback function triggered when the scene is switched.

          • (): {}
          • Returns {}

        • switchChannel: boolean

          Whether to switch the channel. Default is true.

        • worldId: string

          The id of the world. If not provided, the current world will be used.

      Returns Promise<void>