This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the tree | |
var box = new THREE.Box3(new THREE.Vector3(-25, -25, -25), new THREE.Vector3(25, 25, 25)); | |
var tree = new Octree(box, { | |
maxDepth: 10, | |
splitThreshold: 5, | |
joinThreshold: 3 | |
}); | |
scene.add(tree); | |
// Add children the same way you would any other regular object. |