main.cesium.CustomDataSource.kt Maven / Gradle / Ivy
The newest version!
// Automatically generated - do not modify!
@file:JsModule("cesium")
@file:Suppress(
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* A [DataSource] implementation which can be used to manually manage a group of entities.
* ```
* const dataSource = new CustomDataSource('myData');
*
* const entity = dataSource.entities.add({
* position : Cartesian3.fromDegrees(1, 2, 0),
* billboard : {
* image : 'image.png'
* }
* });
*
* viewer.dataSources.add(dataSource);
* ```
* @see Online Documentation
*
* @constructor
* @property [name] A human-readable name for this instance.
* @see Online Documentation
*/
external class CustomDataSource(var name: String = definedExternally) {
/**
* Gets or sets the clock for this instance.
* @see Online Documentation
*/
var clock: DataSourceClock
/**
* Gets the collection of [Entity] instances.
* @see Online Documentation
*/
var entities: EntityCollection
/**
* Gets or sets whether the data source is currently loading data.
* @see Online Documentation
*/
var isLoading: Boolean
/**
* Gets an event that will be raised when the underlying data changes.
* @see Online Documentation
*/
var changedEvent: Event
/**
* Gets an event that will be raised if an error is encountered during processing.
* @see Online Documentation
*/
var errorEvent: Event
/**
* Gets an event that will be raised when the data source either starts or stops loading.
* @see Online Documentation
*/
var loadingEvent: Event
/**
* Gets whether or not this data source should be displayed.
* @see Online Documentation
*/
var show: Boolean
/**
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
* @see Online Documentation
*/
var clustering: EntityCluster
/**
* Updates the data source to the provided time. This function is optional and
* is not required to be implemented. It is provided for data sources which
* retrieve data based on the current animation time or scene state.
* If implemented, update will be called by [DataSourceDisplay] once a frame.
* @param [time] The simulation time.
* @return True if this data source is ready to be displayed at the provided time, false otherwise.
* @see Online Documentation
*/
fun update(time: JulianDate): Boolean
}