Taos API Reference
    Preparing search index...

    Class GeoScene

    Index

    Constructors

    Properties

    frame: GeoFrame

    The shared floating origin every tileset rebases against.

    Accessors

    • get labels(): readonly GeoLabel[]

      Labels from the vector tiles rendered in the most recent update (absolute ECEF anchors). Consumed by GeoLabelFeature, which projects + declutters them each frame.

      Returns readonly GeoLabel[]

    Methods

    • Convenience wiring: creates a GeoFeature for this scene and registers it on engine (before ShadowFeature by default, so the appended tile draws are rendered by the stock Shadow + Geometry features), and — when opts.cameraGO is given — also installs the floating-origin autoOriginShift. This collapses the per-app boilerplate (engine.addFeatureBefore(new GeoFeature(...), ShadowFeature.name) plus a beforeFrame reanchor) into one call. Returns the created GeoFeature (tweak/disable it later via the returned handle). GeoScene stays engine-agnostic — engine is used here, not stored.

      Parameters

      Returns GeoFeature

    • Installs the floating-origin auto-reanchor for a camera GameObject: registers an engine.beforeFrame hook that, once the camera roams past reanchorDist meters from the origin, recenters this scene's GeoFrame under it and shifts the camera to compensate — keeping world coordinates f32-safe at planetary distances with nothing moving on screen. This is the one bit of per-frame geo wiring an app would otherwise write by hand (see reanchorCamera); call once after creating the camera. engine is used to register the hook, not stored.

      Parameters

      Returns void

    • Adds a vector-tile tileset (OSM/OpenMapTiles MVT) streamed as draped fills + roads + extruded 3D buildings. Geometry is clamped to this scene's terrain via heightAt, so add terrain first for it to sit on the ground. opts.style drives which layers render and their colors / widths / heights (from parseMapLibreStyle); omit for the built-in default look. Returns the tileset (tune maxSSE) + a ready promise.

      Parameters

      Returns { tileset: VectorTileset; ready: Promise<void> }

    • Removes and clears every tileset + static (e.g. on a place/dataset switch).

      Returns void

    • Terrain ground height (m) at a geodetic point (radians), from the terrain tileset with the finest covering tile. Null when no terrain covers it / none loaded.

      Parameters

      • lonRad: number
      • latRad: number

      Returns number | null

    • Updates the cache budget on every tileset (e.g. from a quality slider).

      Parameters

      • bytes: number
      • tris: number

      Returns void