Cosmos Journeyer API Documentation - v1.10.1
    Preparing search index...

    The StarSystemDatabase defines the content of the universe. It is responsible for generating star system models and system positions in the galaxy.

    Index

    Constructors

    Properties

    fallbackSystem: DeepReadonly<StarSystemModel>

    Fallback system that is guaranteed to exist This can be useful for default mechanisms relying on finding a system in the database if nothing is found

    Methods

    • Searches the database for the given id

      Parameters

      • universeObjectId: {
            idInSystem: string;
            systemCoordinates: {
                localX: number;
                localY: number;
                localZ: number;
                starSectorX: number;
                starSectorY: number;
                starSectorZ: number;
            };
        }

        The id to look for

        • idInSystem: string
        • systemCoordinates: {
              localX: number;
              localY: number;
              localZ: number;
              starSectorX: number;
              starSectorY: number;
              starSectorZ: number;
          }

          The coordinates of the star system.

          • localX: number

            Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • localY: number

            Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • localZ: number

            Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • starSectorX: number

            Integer coordinates of the star sector along the universe X axis

          • starSectorY: number

            Integer coordinates of the star sector along the universe Y axis

          • starSectorZ: number

            Integer coordinates of the star sector along the universe Z axis

      Returns null | DeepReadonly<OrbitalObjectModel>

      The model if it exists, null otherwise

    • Parameters

      • starSectorX: number
      • starSectorY: number
      • starSectorZ: number
      • index: number

        The index of the generated system in the star sector.

      Returns {
          localX: number;
          localY: number;
          localZ: number;
          starSectorX: number;
          starSectorY: number;
          starSectorZ: number;
      }

      The system coordinates of the system generated given the seed.

      • localX: number

        Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

      • localY: number

        Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

      • localZ: number

        Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

      • starSectorX: number

        Integer coordinates of the star sector along the universe X axis

      • starSectorY: number

        Integer coordinates of the star sector along the universe Y axis

      • starSectorZ: number

        Integer coordinates of the star sector along the universe Z axis

    • Parameters

      • sectorX: number
      • sectorY: number
      • sectorZ: number

      Returns readonly DeepReadonly<
          {
              localX: number;
              localY: number;
              localZ: number;
              starSectorX: number;
              starSectorY: number;
              starSectorZ: number;
          },
      >[]

      The coordinates of the systems in the given star sector.

    • Parameters

      • coordinates: {
            localX: number;
            localY: number;
            localZ: number;
            starSectorX: number;
            starSectorY: number;
            starSectorZ: number;
        }

        The coordinates of the system you want the position of.

        • localX: number

          Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localY: number

          Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localZ: number

          Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • starSectorX: number

          Integer coordinates of the star sector along the universe X axis

        • starSectorY: number

          Integer coordinates of the star sector along the universe Y axis

        • starSectorZ: number

          Integer coordinates of the star sector along the universe Z axis

      Returns Vector3

      The position of the given system in the galaxy.

    • Parameters

      • coordinates: {
            localX: number;
            localY: number;
            localZ: number;
            starSectorX: number;
            starSectorY: number;
            starSectorZ: number;
        }

        The coordinates of the system you want the model of.

        • localX: number

          Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localY: number

          Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localZ: number

          Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • starSectorX: number

          Integer coordinates of the star sector along the universe X axis

        • starSectorY: number

          Integer coordinates of the star sector along the universe Y axis

        • starSectorZ: number

          Integer coordinates of the star sector along the universe Z axis

      Returns null | DeepReadonly<StarSystemModel>

      The StarSystemModel for the given coordinates, or null if the system is not found.

    • Parameters

      • sectorX: number
      • sectorY: number
      • sectorZ: number

      Returns Vector3[]

      The positions of all systems in the given star sector in galactic space.

    • Check if a system is in the human bubble.

      Parameters

      • systemCoordinates: {
            localX: number;
            localY: number;
            localZ: number;
            starSectorX: number;
            starSectorY: number;
            starSectorZ: number;
        }

        The coordinates of the system to check.

        • localX: number

          Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localY: number

          Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localZ: number

          Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • starSectorX: number

          Integer coordinates of the star sector along the universe X axis

        • starSectorY: number

          Integer coordinates of the star sector along the universe Y axis

        • starSectorZ: number

          Integer coordinates of the star sector along the universe Z axis

      Returns boolean

      true if the system is in the human bubble, false otherwise.

    • Register a plugin that modifies a single system.

      Parameters

      • coordinates: {
            localX: number;
            localY: number;
            localZ: number;
            starSectorX: number;
            starSectorY: number;
            starSectorZ: number;
        }

        The coordinates of the system to modify.

        • localX: number

          Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localY: number

          Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • localZ: number

          Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

        • starSectorX: number

          Integer coordinates of the star sector along the universe X axis

        • starSectorY: number

          Integer coordinates of the star sector along the universe Y axis

        • starSectorZ: number

          Integer coordinates of the star sector along the universe Z axis

      • plugin: (systemModel: StarSystemModel) => StarSystemModel

        The plugin to apply to the system.

      Returns void