Showing an animated explosion from

1. A concise explanation of the problem you’re experiencing.

Images from other billboards showing up when setting the imageSubRegion on a billboard. The image is attached. The last two images on the last row look to cause the billboard to be transparent. Is there a known bug about this? Or is there a better way to do this? This works really well but occasionally images outside of the attached photo are appearing? Maybe I’m stepping off the bounds?

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

cesium.entities.add( new Cesium.Entity( {

“position”: targetLocation,

“billboard”: {

//“image”: “images/explosion.png”,

“image”: FileLoader.getImage( “explosion” ).image,

“imageSubRegion”: new Cesium.CallbackProperty( function( time, result ) {

msg.imageInfo.rect.x = msg.imageInfo.x();

msg.imageInfo.rect.y = msg.imageInfo.y();

return msg.imageInfo.rect;

}, false ),

“show”: true,

“eyeOffset”: new Cesium.Cartesian3( 0.0, 0.0, -2*UNIT_DIMENSIONS ),

“scale”: 1.0,

“width”: 2 * UNIT_DIMENSIONS,

“height”: 2 * UNIT_DIMENSIONS

}

} ) );

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

To show a 2D explosion on a billboard.

4. The Cesium version you’re using, your operating system and browser.

Cesium: 1.36

Windows 7 Enterprise

**Chrome **Version 60.0.3112.113 (Official Build) (64-bit)

explosion.png

Hi Scott,

Animated billboards are a very often requested feature. We have a GitHub issue open here to track it.

There’s a whole list of other forum threads like this one that are looking to do the same thing, and there are a couple solutions proposed in each. It’s probably worth taking a look and finding one that meets your needs.

Thanks,

Gabby