Cesium Utils - v0.3.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
    _debugEntityIds: string[] = []
    _pointEntityId?: string
    _sunDirectionWC: Cartesian3
    _sunPositionWC: Cartesian3
    _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

      Create a point entity for collision detection

      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

      Returns Entity

    • Experimental

      Parameters

      • OptionalobjectsToExclude: any[]

      Returns any[]

    • Experimental

      Gets a virtual position of the sun to reduce calculation overhead.

      Parameters

      • from: Cartesian3

        target point to start from

      • radius: number = 1000

        virtual distance between target point and the sun. Defaults to 1000 (1km)

      Returns Cartesian3