Taos API Reference
    Preparing search index...

    Class Tileset3D

    Index

    Constructors

    • Parameters

      • asset: GeoDataSource
      • frame: GeoFrame
      • device: GPUDevice
      • cache: TileCache<TileContent>
      • lit: boolean = true

        Force unlit tile materials to lit so engine lighting affects them.

      • useWorker: () => boolean = ...

        Live getter: when it returns true, tile geometry is decoded on a Worker (off the main thread) — read per load so a runtime toggle takes effect immediately.

      • bodyOffset: Vec3d = ...

        Constant ECEF translation planting a self-centered body (e.g. the Moon, whose tiles are authored about the Moon's center) at a chosen point in the shared Earth-centric universe. Applied to BOTH the baked geometry and the bounds centers, so floating-origin placement and SSE/cull (camera in universe coords) stay consistent. (0,0,0) — the default — leaves Earth content untouched.

      • regionEllipsoid: { a: number; b: number } = ...

        Ellipsoid (semi-axes, m) used to interpret region bounding volumes — they're geodetic lon/lat/height on the body's own ellipsoid. Defaults to WGS84 (Earth); the Moon passes its sphere (a = b = 1,737,400) so its region bounds resolve to lunar — not Earth — positions before bodyOffset plants them. Box/sphere volumes are self-describing cartesian and ignore this.

      • albedoBoost: number = 1

        Multiplies tile material albedo (brightens content under the same light). 1 = off. Used to make the Moon's dark regolith read bright in sunlight.

      • smoothNormals: boolean = false

        For tiles whose primitives omit normals, generate SMOOTH (area-weighted) normals rather than the glTF-spec-default FLAT (per-face) normals. Default false (flat) — flat matches the spec and avoids the shading seams smoothing quilts across the hard edges of photogrammetry / building meshes.

      • collision: boolean = false

        Retain a CPU triangle soup (TileContent.collision) on each loaded tile so an app can build a physics collider from the rendered geometry. Default off.

      • OptionalmaterialTweak: (mat: PbrMaterial) => void

        Optional per-material hook applied to every PbrMaterial of each loaded tile after the albedo boost (e.g. the Moon's reflectance + night-time emissive glow).

      • skirtScale: number = 0

        When > 0, generate decode-time radial SKIRTS on each tile to hide LOD-seam cracks (3D-Tiles has no runtime skirts). Depth scales with tile relief × this factor. Only for terrain-like tilesets (a planet surface); leave 0 for photogrammetry. See buildTileSkirts. Mutable so a UI can retune it (re-stream to rebuild).

      • pickable: boolean = false

        Load tiles pickable: extract the _FEATURE_ID_0/_BATCHID attribute and retain a CPU pick soup (TileContent.pickMeshes) so a click ray can select a feature (see pickFeature). Off by default — costs the extra attribute + per-tile soup, and forces inline decode. Set for datasets with per-feature metadata (OSM Buildings).

      Returns Tileset3D

    Properties

    stats: TilesetStats = ...
    diagnostics: boolean = false

    When true, follow each rendered tile's LOD across frames and flag a "pop" — a region drawn at a FINER LOD last frame but at a coarser ancestor this frame. That regression (drop to a lower LOD, then climb back) is the visible flicker. Off by default (the per-frame ancestor walk is cheap but pointless unless you're diagnosing). Populates TilesetStats's lodRegressions/worst* fields.

    maxSSE: number = DEFAULT_MAX_SSE

    Target screen-space error in pixels for THIS tileset — CesiumJS's maximumScreenSpaceError. Lower = sharper / more tiles. Per-tileset so different datasets (e.g. photoreal city tiles vs OSM buildings) tune independently; the global PIXEL ERROR control just writes whichever tileset is active.

    preloadMargin: number = 0

    Preload ring (world meters): each frame, after selecting the visible tiles, warm the content of selection leaves within this distance of the frustum (just off-screen) at a deprioritized urgency, so a quick pan finds them already loading instead of popping in. 0 = off (no warm pass, zero overhead — the default, so this never changes existing behavior). A good value scales with camera altitude (e.g. a fraction of the height above ground); the caller sets it per frame.

    maxRenderDistance: number = DEFAULT_MAX_RENDER_DISTANCE

    Render-distance cap (world meters): content tiles whose nearest bound is farther than this from the camera are neither drawn nor refined into — a hard far-distance cutoff for the tileset (e.g. stop drawing the OSM-building sprawl out to the horizon, which is mostly tiny on screen yet costs a draw + bind-group set each). The root and huge container tiles are exempt (they must still be traversed to reach near descendants), and so is terrain (a separate tileset). Defaults to DEFAULT_MAX_RENDER_DISTANCE (5 km); set Infinity to draw to the horizon.

    skirtScale: number = 0

    When > 0, generate decode-time radial SKIRTS on each tile to hide LOD-seam cracks (3D-Tiles has no runtime skirts). Depth scales with tile relief × this factor. Only for terrain-like tilesets (a planet surface); leave 0 for photogrammetry. See buildTileSkirts. Mutable so a UI can retune it (re-stream to rebuild).

    Accessors

    • get visibleCopyrights(): readonly string[]

      Deduped, sorted data-provider copyrights of the tiles drawn in the last update — for Google Photorealistic, the per-tile asset.copyright providers the Map Tiles Terms of Service require be shown for what's on screen. The array reference is stable while the visible set is unchanged (see collectCopyrights), so a caller can cheaply !==-check it each frame.

      Returns readonly string[]

    Methods

    • The tileset's root bounding sphere in ECEF (universe coords, after bodyOffset) — its location + extent, for "fly to dataset". Null before init. A planet- spanning root (Google Photorealistic, OSM Buildings) reports a huge radius; a localized tileset (a point cloud / single site) a small one, which a viewer can use to decide whether to fly there.

      Returns { centerEcef: Vec3d; radius: number } | null