BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    Interface CurrentSpaceTracker

    Locates the camera in the loaded models' spaces without server round trips (docs/current-space-design.md §8). Obtain it with Viewer3d.ensureCurrentSpaceTracker().

    interface CurrentSpaceTracker {
        settings: CurrentSpaceTrackerSettings;
        configure(settings: Partial<CurrentSpaceTrackerSettings>): Promise<void>;
        dispose(): void;
        getCurrent(): CurrentSpaceResult;
        getSpaces(): { centre: vec3; inside: vec3; qid: string }[];
        off(
            event: "current_space_changed" | "current_zone_changed",
            fn: (payload: any) => void,
        ): this;
        on(
            event: "current_space_changed",
            fn: (current: CurrentSpaceResult) => void,
        ): this;
        on(
            event: "current_zone_changed",
            fn: (payload: { stale: boolean; zones: CurrentZone[] }) => void,
        ): this;
        prefetch(): Promise<void>;
        spacesInZone(zoneQid: string): string[];
    }
    Index

    Properties

    Methods

    • Returns void

    • The spaces of the loaded index, no query: a point inside each footprint and the footprint's centre, both at the floor (render frame)

      Returns { centre: vec3; inside: vec3; qid: string }[]

    • Parameters

      • event: "current_space_changed" | "current_zone_changed"
      • fn: (payload: any) => void

      Returns this

    • Parameters

      Returns this

    • Parameters

      • event: "current_zone_changed"
      • fn: (payload: { stale: boolean; zones: CurrentZone[] }) => void

      Returns this

    • Re-runs the bulk BQL prefetch of every space's features.

      Returns Promise<void>

    • The qids ("vid-oid") of every prefetched space that belongs to the zone: no query.

      Parameters

      • zoneQid: string

      Returns string[]