Skip to content

Commit

Permalink
adjust function call
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjohnson committed Aug 19, 2023
1 parent d8472f3 commit 648edf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/MeshBVH.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class MeshBVH {
this._roots = null;
if ( ! options[ SKIP_GENERATION ] ) {

this._roots = buildPackedTree( geometry, options );
buildPackedTree( geometry, options, this );

if ( ! geometry.boundingBox && options.setBoundingBox ) {

Expand Down
5 changes: 3 additions & 2 deletions src/core/build/buildTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function buildTree( geo, options ) {

}

export function buildPackedTree( geo, options ) {
export function buildPackedTree( geo, options, target ) {

// boundingData : 6 float32
// right / offset : 1 uint32
Expand All @@ -168,7 +168,8 @@ export function buildPackedTree( geo, options ) {

}

return packedRoots;
target._roots = packedRoots;
return;

function countNodes( node ) {

Expand Down

0 comments on commit 648edf3

Please sign in to comment.