Cesium Utils - v0.2.6
    Preparing search index...

    Class SilhouetteHighlight

    An implementation for highlighting 3D objects in Cesium.

    Supported Object Types:

    • Entity with model graphics. (adjustable outline width)
    • Cesium3DTileset instances. (fixed outline width)

    Currently supports outline style only.

    const viewer = new Viewer("cesiumContainer");
    const silhouetteHighlight = new SilhouetteHighlight(viewer);

    // Highlight an object
    const entity = viewer.entities.add(new Entity({
    model: new ModelGraphics(),
    }));
    silhouetteHighlight.show(entity);

    Implements

    Index

    Constructors

    Properties

    _color: Color = Color.RED
    _composite: PostProcessStageComposite
    _currentObject: undefined | Entity | Cesium3DTileFeature
    _currentOptions: undefined | Options
    _entity?: Entity
    _silhouette: PostProcessStage
    _stages: PostProcessStageCollection

    Accessors

    • get currentObject(): undefined | Entity | Cesium3DTileFeature

      Gets the currently highlighted object

      Returns undefined | Entity | Cesium3DTileFeature

    Methods

    • Highlights a picked Cesium3DTileset by updating silhouette composite.

      Parameters

      • object: Cesium3DTileFeature

        The object to be highlighted.

      • Optionaloptions: Options

        Optional style for the highlight.

      Returns void

    • Highlights a picked Entity by updating the model properties.

      Parameters

      • object: Entity

        The object to be highlighted.

      • Optionaloptions: Options

        Optional style for the highlight.

      Returns void