-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Changes from 2 commits
3afca15
f02d48e
cadb5d6
3243915
e870316
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'); | ||
|
||
|
@@ -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 | ||
}; | ||
|
||
|
@@ -244,7 +244,7 @@ | |
|
||
//Load the Cesium plane model to represent the entity | ||
model : { | ||
uri : '../../SampleData/models/CesiumAir/Cesium_Air.gltf', | ||
uri : '../../../../Apps/SampleData/models/CesiumAir/Cesium_Air.gltf', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think these need to be changed, this path should work with both the built and non-built versions of sandcastle. |
||
minimumPixelSize : 64 | ||
}, | ||
|
||
|
@@ -254,7 +254,7 @@ | |
|
||
var scene = viewer.scene; | ||
var particleSystem = scene.primitives.add(new Cesium.ParticleSystem({ | ||
image : '../../SampleData/fire.png', | ||
image : '../../../../Apps/SampleData/fire.png', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
|
||
startColor : Cesium.Color.RED.withAlpha(0.7), | ||
endColor : Cesium.Color.YELLOW.withAlpha(0.3), | ||
|
@@ -278,13 +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.SphereEmitter(5.0), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove comment |
||
emitter : new Cesium.CircleEmitter(0.5), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're starting with the |
||
|
||
emitterModelMatrix : computeEmitterModelMatrix(), | ||
|
@@ -398,6 +400,11 @@ | |
}); | ||
|
||
var options = [{ | ||
text : 'Sphere', | ||
onselect : function() { | ||
particleSystem.emitter = new Cesium.SphereEmitter(2.5); | ||
} | ||
}, { | ||
text : 'Circle', | ||
onselect : function() { | ||
particleSystem.emitter = new Cesium.CircleEmitter(0.5); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do any of these other emitters need tweaks to their size to look good with the changes> |
||
|
@@ -412,23 +419,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> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
### 1.41 - 2018-01-02 | ||
|
||
|
There was a problem hiding this comment.
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.