https://github.com/threeletters/binaryspacetree
Simple 2d binary space tree for Javascript
https://github.com/threeletters/binaryspacetree
Last synced: about 1 year ago
JSON representation
Simple 2d binary space tree for Javascript
- Host: GitHub
- URL: https://github.com/threeletters/binaryspacetree
- Owner: ThreeLetters
- License: other
- Created: 2017-05-30T12:17:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T13:50:34.000Z (about 9 years ago)
- Last Synced: 2025-03-02T23:16:28.582Z (over 1 year ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BinarySpaceTree
Simple 2d binary space tree for Javascript
## Usage
```js
var tree = new Tree(width,height)
var node = {
bounds: {
minX: 0,
minY: 0,
maxX: 100,
maxY: 100
}
}
tree.insert(node)
tree.forEach({
minX: 0,
minY: 0,
maxX: 100,
maxY: 100
},(n)=>{
console.log(n)
})
```