Skip to content

Commit

Permalink
Merge pull request #6132 from hanbollar/particle-system-demo-fix
Browse files Browse the repository at this point in the history
updated sandcastle particle system example for better visual
  • Loading branch information
ggetz authored Jan 23, 2018
2 parents 6896cd5 + e870316 commit f9c53a3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
46 changes: 24 additions & 22 deletions Apps/Sandcastle/gallery/Particle System.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@
</div>

<script id="cesium_sandcastle_script">
function startup(Cesium) {
'use strict';
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
var viewer = new Cesium.Viewer('cesiumContainer');

Expand All @@ -164,19 +164,19 @@
gravity : 0.0,
minimumLife : 1.0,
maximumLife : 1.0,
minimumSpeed : 5.0,
maximumSpeed : 5.0,
minimumSpeed : 1.0,
maximumSpeed : 4.0,
startScale : 1.0,
endScale : 4.0,
particleSize : 20.0,
endScale : 5.0,
particleSize : 25.0,
transX : 2.5,
transY : 4.0,
transZ : 1.0,
heading : 0.0,
pitch : 0.0,
roll : 0.0,
fly : false,
spin : false,
fly : true,
spin : true,
show : true
};

Expand Down Expand Up @@ -278,14 +278,15 @@
rate : viewModel.rate,

bursts : [
new Cesium.ParticleBurst({time : 5.0, minimum : 300, maximum : 500}),
// these burst will occasionally sync to create a multicolored effect
new Cesium.ParticleBurst({time : 5.0, minimum : 10, maximum : 100}),
new Cesium.ParticleBurst({time : 10.0, minimum : 50, maximum : 100}),
new Cesium.ParticleBurst({time : 15.0, minimum : 200, maximum : 300})
],

lifeTime : 16.0,

emitter : new Cesium.CircleEmitter(0.5),
emitter : new Cesium.CircleEmitter(2.0),

emitterModelMatrix : computeEmitterModelMatrix(),

Expand Down Expand Up @@ -400,7 +401,12 @@
var options = [{
text : 'Circle',
onselect : function() {
particleSystem.emitter = new Cesium.CircleEmitter(0.5);
particleSystem.emitter = new Cesium.CircleEmitter(2.0);
}
}, {
text : 'Sphere',
onselect : function() {
particleSystem.emitter = new Cesium.SphereEmitter(2.5);
}
}, {
text : 'Cone',
Expand All @@ -412,23 +418,19 @@
onselect : function() {
particleSystem.emitter = new Cesium.BoxEmitter(new Cesium.Cartesian3(10.0, 10.0, 10.0));
}
}, {
text : 'Sphere',
onselect : function() {
particleSystem.emitter = new Cesium.SphereEmitter(5.0);
}
}];

Sandcastle.addToolbarMenu(options);

//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
//Sandcastle_End
Sandcastle.finishedLoading();
}

if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
}
</script>

</body>
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Change Log
* Added support for vertex shader uniforms when `tileset.colorBlendMode` is `MIX` or `REPLACE`. [#5874](https://github.com/AnalyticalGraphicsInc/cesium/pull/5874)
* Added separate file for the Cesium [Code of Conduct](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CODE_OF_CONDUCT.md). [#6129](https://github.com/AnalyticalGraphicsInc/cesium/pull/6129)
* Fixed applying a translucent style to a point cloud tileset. [#6113](https://github.com/AnalyticalGraphicsInc/cesium/pull/6113)
* Fixed Sandcastle Particle System example for better visual [#6132](https://github.com/AnalyticalGraphicsInc/cesium/pull/6132)

### 1.41 - 2018-01-02

Expand Down

0 comments on commit f9c53a3

Please sign in to comment.