3D-City Model
    Preparing search index...

    Class Feature

    Feature – Abstracts and normalizes access to various Cesium/Scene feature types (Cesium3DTileFeature, Primitive, Entity).

    Provides unified API for identifier, type, color, show/hide, selectability, and dynamic property handling. Supports colorizing and clearing highlights for all supported entity types. Useful for consistent layer, selection, or property editing logic regardless of underlying Cesium/scene primitive type.

    The underlying Cesium or custom feature object (entity, primitive, or 3D tile feature).

    The property name used as primary identifier.

    getProperty(property) - Gets a dynamic property value, abstraction over Cesium feature types.

    colorize(color, keep=true) - Temporarily set feature highlight color, optionally keeping previous.

    clearColor() - Restore to the previous color.

    const feat = new Feature(tileFeature);
    feat.colorize(new Color(0,1,0), false);
    feat.show = false;
    console.log(feat.getProperty("HEIGHT"));
    Index

    Constructors

    Properties

    keep: undefined | boolean
    locked: {}

    Tracks locked state (custom).

    obj: object

    Raw input object (feature/entity/primitive).

    originalColor: any

    Stores previous color before highlighting.

    picked: boolean

    Feature marked as currently picked.

    selectable: boolean

    Is the feature interactively selectable.

    Accessors

    • get color(): undefined | Color

      Main visual color of the feature.

      Returns undefined | Color

    • set color(color: Color): void

      Set the current color (for highlight or visual change).

      Parameters

      • color: Color

      Returns void

    • get content(): null | object

      Access the main Cesium/scene content portion for this feature.

      Returns null | object

    • get entity(): any

      For Entities, access the low-level primitive (polygon, polyline, point).

      Returns any

    • get reactive(): boolean

      Status of 'reactive' for this feature (if present).

      Returns boolean

    • get show(): undefined | boolean

      Show or hide the visual feature (all supported types).

      Returns undefined | boolean

    • set show(show: boolean): void

      Set show/hide state of the feature.

      Parameters

      • show: boolean

      Returns void

    • get type(): undefined | Function

      Detect the feature type for Cesium/scene abstraction.

      Returns undefined | Function

    • get uuid(): string

      Universal feature UUID getter (from property or fallback).

      Returns string

    Methods

    • Revert to the previous (stored) color, if available.

      Returns void

    • Colorize the feature (temporary highlight).

      Parameters

      • color: Color

        Color to apply.

      • Optionalkeep: boolean = true

        Keep the original color for restoring.

      Returns void

    • Retrieve a dynamic property from the underlying object.

      Parameters

      • property: string

      Returns any