MCPcopy
hub / github.com/CesiumGS/cesium / next

Function next

Specs/TerrainTileProcessor.js:60–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 let iterations = 0;
59
60 function next() {
61 ++iterations;
62 ++that.frameState.frameNumber;
63
64 // Keep going until all terrain and imagery provider are ready and states are no longer changing.
65 let changed = false;
66
67 tiles.forEach(function (tile) {
68 const beforeState = getState(tile);
69 GlobeSurfaceTile.processStateMachine(
70 tile,
71 that.frameState,
72 that.terrainProvider,
73 that.imageryLayerCollection,
74 );
75 const afterState = getState(tile);
76 changed =
77 changed ||
78 tile.data.terrainState === TerrainState.RECEIVING ||
79 tile.data.terrainState === TerrainState.TRANSFORMING ||
80 !statesAreSame(beforeState, afterState);
81 });
82
83 if (!changed || iterations >= maxIterations) {
84 resolve(iterations);
85 } else {
86 setTimeout(next, 0);
87 }
88 }
89
90 next();
91 });

Callers 5

server.jsFile · 0.50
checkGzipAndNextFunction · 0.50
serveResultFunction · 0.50
createRouteFunction · 0.50

Calls 4

getStateFunction · 0.85
statesAreSameFunction · 0.85
resolveFunction · 0.85
processStateMachineMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…