Skip to content

Commit

Permalink
Merge pull request #7412 from AnalyticalGraphicsInc/particle-size
Browse files Browse the repository at this point in the history
Fix particle image size
  • Loading branch information
mramato authored Jan 3, 2019
2 parents 1735997 + 526b95e commit 0d0e37a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Change Log
##### Additions :tada:
* Added the ability to specify the width of the intersection volume for `Scene.sampleHeight`, `Scene.clampToHeight`, `Scene.sampleHeightMostDetailed`, and `Scene.clampToHeightMostDetailed`. [#7287](https://github.com/AnalyticalGraphicsInc/cesium/pull/7287)

##### Fixes :wrench:
* Fixed image size issue when using multiple particle systems [#7412](https://github.com/AnalyticalGraphicsInc/cesium/pull/7412)

### 1.53 - 2019-01-02

##### Additions :tada:
Expand Down
4 changes: 2 additions & 2 deletions Source/Scene/ParticleSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ define([
this._minimumMass = defaultValue(options.mass, defaultValue(options.minimumMass, 1.0));
this._maximumMass = defaultValue(options.mass, defaultValue(options.maximumMass, 1.0));

this._minimumImageSize = defaultValue(options.imageSize, defaultValue(options.minimumImageSize, defaultImageSize));
this._maximumImageSize = defaultValue(options.imageSize, defaultValue(options.maximumImageSize, defaultImageSize));
this._minimumImageSize = Cartesian2.clone(defaultValue(options.imageSize, defaultValue(options.minimumImageSize, defaultImageSize)));
this._maximumImageSize = Cartesian2.clone(defaultValue(options.imageSize, defaultValue(options.maximumImageSize, defaultImageSize)));

this._lifetime = defaultValue(options.lifetime, Number.MAX_VALUE);

Expand Down
5 changes: 5 additions & 0 deletions Specs/Scene/ParticleSystemSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,11 @@ defineSuite([
}).toThrowDeveloperError();
});

it('clones default image size', function() {
var p = new ParticleSystem();
expect(p.maximumImageSize).not.toBe(p.minimumImageSize);
});

it('renders', function() {
scene.primitives.add(new ParticleSystem({
image : greenImage,
Expand Down

0 comments on commit 0d0e37a

Please sign in to comment.