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

Improve the performance of certain GraphNode methods and avoid recalculating the AABB multiple times during rendering. #7245

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Fix linter comment
querielo committed Jan 3, 2025
commit c85208b8ec10c41874d06df85a848dd5251b839a
3 changes: 2 additions & 1 deletion src/scene/graph-node.js
Original file line number Diff line number Diff line change
@@ -645,8 +645,9 @@ class GraphNode extends EventHandler {

while (stack.length) {
const current = stack.pop();
if (test(current))
if (test(current)) {
return current;
}

const children = current._children;
for (let i = 0; i < children.length; i++) {