Sandcastle sample submissions - explosion

I’ve got a pretty cool explosion billboard example that I was going to share, and I was wondering if there was a submission process? Or should I just post everything here? Sample image file used posted.



Cool, we’d love to see it!
You can submit a pull request to our GitHub. All of the Sandcastle examples live in Apps/Sandcastle/gallery, You can use the ‘Save As’ button on the Sandcastle toolbar to save the full HTML file, and the ‘View as Thumbnail’ button to make the viewer the correct size for the snapshots used in the gallery.

We have a Contributing Guide written up that has pull request guidelines.

If we think the demo is something that showcases Cesium’s capabilities or is something that will help other users, we’ll merge it into our repository.

Regardless, we’ll try to find some way to spread it around.



Here’s the html file so everyone can check this out for themselves. The image above goes into the Apps/Sandcastle/images folder. If this is worthy of a Sandcastle demo, let me know and I’ll submit a PR.

Sorry about the location of the explosion. :wink:


Explosion.html (3.21 KB)

Thanks Scott! The demo turned out really cool!

However, this approach isn’t what we would recommend for creating this kind of animation.

If you look at BillboardGraphics, it actually has a subregion property. So you can set ‘image’ to explosion.png and simply update the subregion as needed. This is a lot more efficient.

It would also be cleaner to use a CallbackProperty for subregion instead of adding an event listener to scene.preRender.

If you’re interested, Matt was working on creating animated billboards using GIF images a while ago. His work is on this branch:

He also has a demo here to show how to use the BillboardAnimator class he created:



Does the subregion callback get called every render? Essentially, it gets called everytime there’s a ‘get’ of the property.


Yes, I believe callback properties get called every frame.


Ok, I got our application working with the subregion property callback. Would it be worth while to update the Explosion.html?


I don’t think it’s something we would add to sandcastle right now. Once Matt gets around to cleaning up his branch we would probably add an example based on what he did.
Thanks though!