Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated sandcastle particle system example for better visual #6132

Merged
merged 5 commits into from
Jan 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shift-tab this block, or else it will show up with an extra tab in Sandcastle.

'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 @@ -31,6 +31,7 @@ Change Log
* Fixed a bug when creating billboard and model entities without a globe. [#6109](https://github.com/AnalyticalGraphicsInc/cesium/pull/6109)
* Added support for vertex shader uniforms when `tileset.colorBlendMode` is `MIX` or `REPLACE`. [#5874](https://github.com/AnalyticalGraphicsInc/cesium/pull/5874)
* 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