diff --git a/Apps/SampleData/circular_particle.png b/Apps/SampleData/circular_particle.png new file mode 100644 index 000000000000..ca1cc10d6b2d Binary files /dev/null and b/Apps/SampleData/circular_particle.png differ diff --git a/Apps/SampleData/snowflake_particle.png b/Apps/SampleData/snowflake_particle.png new file mode 100644 index 000000000000..8fadd9056818 Binary files /dev/null and b/Apps/SampleData/snowflake_particle.png differ diff --git a/Apps/Sandcastle/gallery/Particle System Tails.html b/Apps/Sandcastle/gallery/Particle System Tails.html new file mode 100644 index 000000000000..4062508aef9c --- /dev/null +++ b/Apps/Sandcastle/gallery/Particle System Tails.html @@ -0,0 +1,228 @@ + + + + + + + + + Cesium Demo + + + + + + +
+

Loading...

+
+ + + + diff --git a/Apps/Sandcastle/gallery/Particle System Tails.jpg b/Apps/Sandcastle/gallery/Particle System Tails.jpg new file mode 100644 index 000000000000..633d3820d2af Binary files /dev/null and b/Apps/Sandcastle/gallery/Particle System Tails.jpg differ diff --git a/Apps/Sandcastle/gallery/Particle System Weather.html b/Apps/Sandcastle/gallery/Particle System Weather.html new file mode 100644 index 000000000000..93e2adae3b7d --- /dev/null +++ b/Apps/Sandcastle/gallery/Particle System Weather.html @@ -0,0 +1,167 @@ + + + + + + + + + Cesium Demo + + + + + + +
+

Loading...

+
+
+ + + + diff --git a/Apps/Sandcastle/gallery/Particle System Weather.jpg b/Apps/Sandcastle/gallery/Particle System Weather.jpg new file mode 100644 index 000000000000..24a0bf061120 Binary files /dev/null and b/Apps/Sandcastle/gallery/Particle System Weather.jpg differ diff --git a/CHANGES.md b/CHANGES.md index e67cb71e0711..850691d24eaf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -47,7 +47,13 @@ Change Log * `sourceType` specifies the type of data source if the URL doesn't have a known file extension. * `flyTo=false` optionally disables the automatic `flyTo` after loading the data source. * Added a multi-part CZML example to Sandcastle. [#6320](https://github.com/AnalyticalGraphicsInc/cesium/pull/6320) +* `Credit` has been modified to take an HTML string as the credit content [#6331](https://github.com/AnalyticalGraphicsInc/cesium/pull/6331) +* Added support for ordering in `DataSourceCollection` [#6316](https://github.com/AnalyticalGraphicsInc/cesium/pull/6316) + * All ground geometry from one `DataSource` will render in front of all ground geometry from another `DataSource` in the same collection with a lower index. + * Use `DataSourceCollection.raise`, `DataSourceCollection.lower`, `DataSourceCollection.raiseToTop` and `DataSourceCollection.lowerToBottom` functions to change the ordering of a `DataSource` in the collection. * Improved processing order of 3D tiles. [#6364](https://github.com/AnalyticalGraphicsInc/cesium/pull/6364) +* Added more ParticleSystem Sandcastle examples for rocket and comet tails and weather. [#6375](https://github.com/AnalyticalGraphicsInc/cesium/pull/6375) +* Added ParticleSystem parameter to allow for default of one color or scale instead of always requiring start and end versions.[#6375](https://github.com/AnalyticalGraphicsInc/cesium/pull/6375) ##### Fixes :wrench: * Fixed Cesium ion browser caching. [#6353](https://github.com/AnalyticalGraphicsInc/cesium/pull/6353). diff --git a/Source/Scene/ParticleSystem.js b/Source/Scene/ParticleSystem.js index 6ce7467f73ca..bff7dce9434a 100644 --- a/Source/Scene/ParticleSystem.js +++ b/Source/Scene/ParticleSystem.js @@ -44,8 +44,10 @@ define([ * @param {ParticleEmitter} [options.emitter=new CircleEmitter(0.5)] The particle emitter for this system. * @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the particle system from model to world coordinates. * @param {Matrix4} [options.emitterModelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the particle system emitter within the particle systems local coordinate system. + * @param {Color} [options.color] Sets the start and end colors. * @param {Color} [options.startColor=Color.WHITE] The color of a particle when it is born. * @param {Color} [options.endColor=Color.WHITE] The color of a particle when it dies. + * @param {Number} [options.scale] Sets the start and end scales. * @param {Number} [options.startScale=1.0] The scale of the particle when it is born. * @param {Number} [options.endScale=1.0] The scale of the particle when it dies. * @param {Number} [options.rate=5] The number of particles to emit per second. @@ -115,11 +117,11 @@ define([ this._matrixDirty = true; this._combinedMatrix = new Matrix4(); - this._startColor = Color.clone(defaultValue(options.startColor, Color.WHITE)); - this._endColor = Color.clone(defaultValue(options.endColor, Color.WHITE)); + this._startColor = Color.clone(defaultValue(options.color, defaultValue(options.startColor, Color.WHITE))); + this._endColor = Color.clone(defaultValue(options.color, defaultValue(options.endColor, Color.WHITE))); - this._startScale = defaultValue(options.startScale, 1.0); - this._endScale = defaultValue(options.endScale, 1.0); + this._startScale = defaultValue(options.scale, defaultValue(options.startScale, 1.0)); + this._endScale = defaultValue(options.scale, defaultValue(options.endScale, 1.0)); this._rate = defaultValue(options.rate, 5); @@ -162,7 +164,7 @@ define([ * The particle emitter for this * @memberof ParticleSystem.prototype * @type {ParticleEmitter} - * @default CricleEmitter + * @default CircleEmitter */ emitter : { get : function() {