CloudCollection
A renderable collection of clouds in the 3D scene.
Clouds are added and removed from the collection using CloudCollection.add and CloudCollection.remove.
// Create a cloud collection with two cumulus clouds
const clouds = scene.primitives.add(new CloudCollection());
clouds.add({
position : new Cartesian3(1.0, 2.0, 3.0),
maximumSize: new Cartesian3(20.0, 12.0, 8.0)
});
clouds.add({
position : new Cartesian3(4.0, 5.0, 6.0),
maximumSize: new Cartesian3(15.0, 9.0, 9.0),
slice: 0.5
});
See also
Properties
This property is for debugging only; it is not for production use nor is it optimized.
This property is for debugging only; it is not for production use nor is it optimized.
Controls the amount of detail captured in the precomputed noise texture used to render the cumulus clouds. In order for the texture to be tileable, this must be a power of two. For best results, set this to be a power of two between 8.0
and 32.0
(inclusive).
Applies a translation to noise texture coordinates to generate different data. This can be modified if the default noise does not generate good-looking clouds.
Functions
Creates and adds a cloud with the specified initial properties to the collection. The added cloud is returned so it can be modified or removed from the collection later.
Check whether this collection contains a given cloud.
Returns the cloud in the collection at the specified index. Indices are zero-based and increase as clouds are added. Removing a cloud shifts all clouds after it to the left, changing their indices. This function is commonly used with CloudCollection.length to iterate over all the clouds in the collection.
Returns true if this object was destroyed; otherwise, false.
Removes a cloud from the collection.