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

    Class SunlightExperimental

    Cesium 1.132.0

    Point sunlight analysis utility for shadow calculations.

    ⚠️ Warning: This is an experimental feature that uses Cesium's internal APIs. The API may change or break in future versions of Cesium or cesium-utils.

    const sunlight = new Sunlight(viewer);
    sunlight.analyze(point, JulianDate.now());
    Index

    Constructors

    Properties

    _analyzing: boolean = false
    _objectsToExclude: any[] = []
    _pointEntityId?: string
    _points: EntityCollection
    _polylines: PolylineCollection
    _uniformState: any
    _viewer: Viewer

    Accessors

    • get isAnalyzing(): boolean
      Experimental

      Whether sunlight analysis is currently in progress.

      Returns boolean

    • get sunDirectionWC(): Cartesian3
      Experimental

      A normalized vector to the sun in 3D world coordinates at the current scene time.

      Returns Cartesian3

    • get sunPositionWC(): Cartesian3
      Experimental

      The sun position in 3D world coordinates at the current scene time.

      Returns Cartesian3

    Methods

    • Experimental

      Parameters

      • OptionalobjectsToExclude: any[]

      Returns any[]

    • Experimental

      Create an ellipsoid entity for ray collision detection to complement cesium's native click event accuracy

      Parameters

      • at: Cartesian3

        where to create the entity

      • Optionalshow: boolean

        whether to show point entity

      • OptionalerrorBoundary: number

        size of the point entity for error tolerance

      • color: Color = ...

      Returns Entity

    • Experimental

      Gets virtual position and direction of the sun to reduce calculation overhead.

      Parameters

      • from: Cartesian3

        target point to start from

      • radius: number = 10000

        virtual distance between target point and the sun. Defaults to 10000 (10km)

      Returns { direction: Cartesian3; position: Cartesian3 }