Taos API Reference
    Preparing search index...

    Class TerrainEditSession

    Index

    Constructors

    Properties

    heights: EditableHeights | null
    splatA: EditableSplat | null
    splatB: EditableSplat | null
    hole: EditableHoleMask | null
    color: EditableColorMap | null
    originX: number
    originZ: number
    extentX: number
    extentZ: number
    layerCount: number

    Methods

    • Apply one height brush stamp and flush the touched region (texture upload

      • VT page re-bake). Returns the dirty texel rect, or null when the brush missed the map. flattenTarget is the normalized height flatten pulls toward (sample it once at stroke start).

      Parameters

      Returns TexelRect | null

    • Normalized height at a world point (bilinear), for flatten targets.

      Parameters

      • x: number
      • z: number

      Returns number

    • Paint one layer's weight up (renormalizing the others down) and flush the touched splat region. Returns the dirty texel rect in SPLAT texels, or null when painting is unavailable (no splat maps / layer out of range).

      Parameters

      Returns TexelRect | null

    • Punch (or fill, erase) a hole under the stamp and flush the touched mask region. Hole edges are binary — every texel within the radius is set — so the brush is predictable; strength/falloff don't apply. Returns the dirty texel rect in HOLE-MASK texels, or null when no mask is bound.

      Parameters

      Returns TexelRect | null

    • Tint the color map toward color (linear 0-1 rgb; 0.5 gray = neutral in the shader's overlay encoding) under the stamp with soft falloff, raising the paint opacity as the brush dwells — or fade the paint back out with erase. Returns the dirty texel rect in COLOR-MAP texels, or null when no color map is bound.

      Parameters

      • stamp: BrushStamp
      • color: [number, number, number]
      • erase: boolean = false

      Returns TexelRect | null

    • Upload a hole-mask texel region (sampled at shade time — no VT rebake; the collider rebuild rides the editor's dataVersion bump).

      Parameters

      Returns void