@@ -77,7 +77,8 @@ function BillboardVisualizer(entityCluster, entityCollection) {
77
77
* Entity counterpart at the given time.
78
78
*
79
79
* @param {JulianDate } time The time to update to.
80
- * @returns {boolean } This function always returns true.
80
+ * @returns {boolean } True if the visualizer successfully updated to the provided time,
81
+ * false if the visualizer is waiting for asynchronous image textures to be created.
81
82
*/
82
83
BillboardVisualizer . prototype . update = function ( time ) {
83
84
//>>includeStart('debug', pragmas.debug);
@@ -89,6 +90,7 @@ BillboardVisualizer.prototype.update = function (time) {
89
90
const items = this . _items . values ;
90
91
const cluster = this . _cluster ;
91
92
93
+ let ready = true ;
92
94
for ( let i = 0 , len = items . length ; i < len ; i ++ ) {
93
95
const item = items [ i ] ;
94
96
const entity = item . entity ;
@@ -226,6 +228,7 @@ BillboardVisualizer.prototype.update = function (time) {
226
228
time ,
227
229
defaultSplitDirection ,
228
230
) ;
231
+ ready = billboard . _imageTexture . ready ;
229
232
230
233
const subRegion = Property . getValueOrUndefined (
231
234
billboardGraphics . _imageSubRegion ,
@@ -236,7 +239,7 @@ BillboardVisualizer.prototype.update = function (time) {
236
239
billboard . setImageSubRegion ( billboard . image , subRegion ) ;
237
240
}
238
241
}
239
- return true ;
242
+ return ready ;
240
243
} ;
241
244
242
245
/**
0 commit comments