Skip to content
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

QuadtreePrimitive.tileLoadProgressEvent Cleanup #3606

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion Source/Scene/QuadtreePrimitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ define([
}

updateHeights(this, frameState);
callAfterRenderFunctions(frameState);

var debug = this._debug;
if (debug.suspendLodUpdate) {
Expand Down Expand Up @@ -485,7 +486,9 @@ define([
}
}

raiseTileLoadProgressEvent(primitive);
frameState.afterRender.push(function () {
raiseTileLoadProgressEvent(primitive);
});
}

/**
Expand Down Expand Up @@ -707,5 +710,15 @@ define([
}
}

function callAfterRenderFunctions(frameState) {
// Functions that are queued up in frame state should be executed here at the end
// of the frame.
var functions = frameState.afterRender;
for (var i = 0, length = functions.length; i < length; ++i) {
functions[i]();
}
functions.length = 0;
}

return QuadtreePrimitive;
});