IFClite TypeScript API
    Preparing search index...

    Class FederationRegistry

    Central registry for multi-model federation Manages ID offsets and provides O(1) to-global / O(log N) from-global transformations

    Index
    • Clear all registrations (for full reset)

      Returns void

    • Transform a global ID back to model + local expressId O(log N) - binary search on sorted ranges

      Parameters

      • globalId: number

      Returns GlobalIdLookup | null

    • Get all global IDs for a model (as a range) Useful for bulk operations like "hide all entities in model X"

      Parameters

      • modelId: string

      Returns { end: number; start: number } | null

    • Get the number of registered models

      Returns number

    • Get the model ID that owns a global ID (without computing expressId) O(log N)

      Parameters

      • globalId: number

      Returns string | null

    • Get all registered model IDs

      Returns string[]

    • Get the offset for a model (useful for batch transformations)

      Parameters

      • modelId: string

      Returns number | null

    • Check if a model is registered

      Parameters

      • modelId: string

      Returns boolean

    • Check if a global ID belongs to a specific model O(1) when we know the model

      Parameters

      • globalId: number
      • modelId: string

      Returns boolean

    • Resolve an owned overlay range while it is still detached from its mutation transaction. This validates the exact range that will be publishable, but deliberately does not make it pickable or owned yet. Callers must publish it only after the backing records commit.

      Parameters

      • modelId: string
      • start: number
      • end: number
      • expressId: number

      Returns number

    • Publish derived/overlay IDs from the separately reserved headroom.

      Parameters

      • modelId: string
      • start: number
      • end: number

      Returns void

    • Publish the next contiguous owned local range inside a reservation.

      Parameters

      • modelId: string
      • start: number
      • end: number

      Returns void

    • Register a new model and get its ID offset Call this BEFORE adding meshes to the scene

      Parameters

      • modelId: string

        Unique identifier for this model

      • maxExpressId: number

        Highest expressId in this model (scan meshes first)

      Returns number

      The offset to add to all expressIds for this model

    • Reserve a fixed local-ID envelope before progressive publication.

      Parameters

      • modelId: string
      • reservedMaxExpressId: number

      Returns number

    • Transform a local expressId to a globally unique ID O(1) - direct map lookup + addition

      Parameters

      • modelId: string
      • expressId: number

      Returns number

    • Unregister a model (when removed from viewer) Note: The offset space is NOT reclaimed to avoid invalidating any existing references (selections, undo stack, etc.)

      Parameters

      • modelId: string

      Returns void