Taos API Reference
    Preparing search index...

    Interface GeoAttachOptions

    Options for GeoScene.attach: everything GeoFeatureOptions needs minus scene (it's the scene attach is called on), plus optional one-call floating-origin wiring.

    interface GeoAttachOptions {
        fovY?: number;
        cull?: () => boolean;
        dt?: (frame: Frame) => number;
        draw?: () => boolean;
        shadows?: () => boolean;
        materialOverride?: (lodLevel: number) => Material | null;
        cullProjection?: (frame: Frame) => Mat4;
        cameraGO?: GameObject;
        reanchorDist?: number;
        before?: string;
    }

    Hierarchy

    Index

    Properties

    fovY?: number

    Vertical field of view in radians for the screen-space-error LOD metric. Default: the live camera's fov, read every frame — so changing the camera FOV just works, and there's no stale value to keep in sync. Pass a number only to override it, e.g. when you also pass a cullProjection built with a different FOV.

    cull?: () => boolean

    Live frustum-cull toggle. Default true.

    dt?: (frame: Frame) => number

    LOD cross-fade dt; return 0 to disable the fade. Default frame.dt.

    draw?: () => boolean

    When false this frame, stream but emit nothing. Default true.

    shadows?: () => boolean

    When false, don't append shadow casters. Default true.

    materialOverride?: (lodLevel: number) => Material | null

    Per-content material override (LOD-debug).

    cullProjection?: (frame: Frame) => Mat4

    The cull projection to extract frustum planes from. Default: the camera's projection (correct as long as the camera's near/far are set in beforeFrame, since the engine caches the projection just after). Supply a freshly-built projection only if you set near/far elsewhere.

    cameraGO?: GameObject

    Camera GameObject to auto-reanchor the floating origin under — installs GeoScene.autoOriginShift in the same call. Omit to manage reanchoring yourself (or if this isn't a roaming planet-scale scene).

    reanchorDist?: number

    Reanchor distance (m) for the auto origin shift; only used with cameraGO. Default 10 000.

    before?: string

    RenderFeature name to register the GeoFeature before. Default 'ShadowFeature' so the appended tile draws are picked up by the stock Shadow + Geometry features (which read frame.opaque / frame.shadowCasters).