Application/controller with Cesium.Viewer property.
See class documentation.
Is the layer removable?
The wind/force update event's name.
Current force (e.g., wind speed/multiplier).
Unique ID for this layer.
Display/UI name.
Layer grouping/filter tags.
Layer type (matches Layer.LayerTypes string values).
Configuration/source URL.
Static
LayerStatic enumeration of supported layer types (for easy type checking).
Returns the bounding sphere of the layer, for spatial queries and UI zoom-to-fit. The implementation is type-dependent:
The bounding sphere, or undefined if not computable.
Get or set clipping polygons for this layer (used in 3D terrain/model clipping). Setter will propagate to the underlying Cesium content.
Set the global color for all grouped features (handled externally). For mesh types, this may be handled elsewhere.
Cesium primitive/entity/imagery/terrain object.
Set or get the underlying Cesium.ParticleSystem/primitive.
Assigns a new custom shader to this layer (or disables if falsy). For non-GEOJSON layer types, handles full reconstruction (with translucency mode handling). For GEOJSON and GEOJSON3D, directly updates polygon or polyline material alpha.
Shader instance or null to disable.
Set or get direction (actively transforms relative to local frame).
Adjust particle scale inversely to distance.
Whether this layer is currently set as opaque. Triggers shader/mode update when changed.
Emits Cartesian3 position and updates Cesium particle system transform.
Sets scaled size for particle system (affects both start and end scale). Updates Cesium.ParticleSystem content accordingly.
[startScale, endScale]
Show or hide this Layer. Deeply propagates the visible state to underlying Cesium content. If the layer is of type FEATURE, it also updates the style manager’s feature visibility and hideIDs. Triggers the onShowChange callback.
True to show, false to hide.
Sets or retrieves styling for the layer (e.g. for GeoJSON/tiles/features). For mesh types, style setting is usually not allowed.
Style object.
Layer ID of the wind/target for this system.
Iterator protocol implementation for Layer.
For Layer collections/objects, allows use in for...of
loops.
Always returns the Layer instance itself (not a collection).
Sets the content of this Layer, and assigns this layer as its parent. Will throw if content is not a Layer.
The Layer to add as content.
Returns the current "content" object assigned to this layer.
The Cesium or sublayer content object.
Returns this Layer if any of its tags are in the provided tags array.
Tags to check against.
Returns this Layer if its type matches the given type, else null. Typically used for gathering/iterating matching content.
Type string to check.
Returns this layer's ID if any of its tags are in the provided tags array.
Tags to check against.
ID if a tag matches, else null.
Returns this layer's ID if its type matches the given type, else null.
Type string to check.
ID if match, else null.
Returns this layer instance (used for lookup patterns in layer registries).
Checks if a given object is a valid Layer: Must be truthy, have an 'id' property, and be an actual Layer instance.
The object to check.
True if the object is a valid Layer instance.
Removes the Cesium primitive/entity/etc. for this layer from the scene and severs parent links. Handles resource de-allocation by layer type (removes primitive, data source, imagery, or terrain).
Removes a layer (and its content), unlinks its parent, and disables its content link. Used for structured layer collections.
The layer instance to remove.
Starts event listeners for real-time wind/force updates and external distance scale changes.
Stops (removes) all registered DOM event listeners.
Shows the layer unless its ID or its content's UUID is present in the excludeIds array, otherwise hides it. Useful for toggling all layers except given ones.
Shows/hides the Layer if its ID is in layerIds (or if layerIds unspecified). Batch operation interface for toggling by ID sets.
Target visible state.
ID or array of IDs to show/hide.
ParticleSystemLayer – Specialized Layer subclass for managing live Cesium particle systems, such as wind or fluid visualizations.
Extends Layer, adding support for dynamic direction, force (wind speed), event-driven updates, and real-time rescaling. Handles all spatial transforms and interactive updates to its underlying Cesium.ParticleSystem via content-based properties.
Param: app
The main application/controller with a .viewer property (Cesium Viewer).
Param: options
Param: options.id
Unique identifier for this layer.
Param: options.targetId
UUID or layer id of the target entity (e.g., for wind targets).
Param: options.name
Human-readable name for UI/legend.
Param: options.tags
Tag array for filtering/grouping.
Param: options.content
Particle system Cesium primitive, assigned directly.
Param: options.show
Initial visible state.
Param: options.parent
Optional parent/group for organizational use.
Param: options.direction
Initial wind/particle direction vector.
Param: options.forceFactor
Particle force constant (e.g., wind speed).
Param: options.eventName
Name of external event to listen for changes to wind/direction/force.
Param: options.position
Position of particle emitter.
Param: options.scale
Start/end scale factors for particles.
Method
startEventListener() - Attach window event listeners for direction/force/distance updates.
Method
stopEventListener() - Detach all event listeners.
Example