{"id":23494546,"url":"https://github.com/erasta/three-octree-vertices","last_synced_at":"2026-03-07T05:05:52.892Z","repository":{"id":59522702,"uuid":"535384158","full_name":"erasta/three-octree-vertices","owner":"erasta","description":"Octree of vertices for three.js","archived":false,"fork":false,"pushed_at":"2022-09-17T06:40:49.000Z","size":1976,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T11:44:41.529Z","etag":null,"topics":["3d","javascript","octree","space-partitioning","threejs","vertices"],"latest_commit_sha":null,"homepage":"https://erasta.github.io/three-octree-vertices/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erasta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-11T18:09:13.000Z","updated_at":"2025-07-25T03:57:18.000Z","dependencies_parsed_at":"2022-09-18T09:02:44.563Z","dependency_job_id":null,"html_url":"https://github.com/erasta/three-octree-vertices","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erasta/three-octree-vertices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasta%2Fthree-octree-vertices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasta%2Fthree-octree-vertices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasta%2Fthree-octree-vertices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasta%2Fthree-octree-vertices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erasta","download_url":"https://codeload.github.com/erasta/three-octree-vertices/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erasta%2Fthree-octree-vertices/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30208730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T03:24:23.086Z","status":"ssl_error","status_checked_at":"2026-03-07T03:23:11.444Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","javascript","octree","space-partitioning","threejs","vertices"],"created_at":"2024-12-25T03:11:20.969Z","updated_at":"2026-03-07T05:05:52.869Z","avatar_url":"https://github.com/erasta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# three-octree-vertices\nOctree of vertices for three.js\n\n[![npm](https://img.shields.io/npm/v/three-octree-vertices?style=plastic)](https://www.npmjs.com/package/three-octree-vertices)\n\nOctree is a space partitioning tree data structure in which each internal node has exactly eight children, used for O(logn) spatial queries.\nFor information on Octree from [wikipedia](https://en.wikipedia.org/wiki/Octree).\n\n## Demo\nShow the octree of a mesh and adds a few more points every second.\nhttps://erasta.github.io/three-octree-vertices/index.html  \n\u003cimg src=\"files/ScreenShotSmall.png\" width=500/\u003e\n\n## Install\n```sh\nnpm install --save three-octree-vertices\n```\n\n## Usage\n```js\nimport { Octree } from 'three-octree-vertices';\nconst octree = new Octree(mesh.geometry);\nconst found = octree.search(new THREE.Sphere(point, radius));\n```\n\n#### `octree = new Octree(vertices, maxVerticesPerNode)`\nBuilds an Octree from the vertices.  \nvertices - (array-like of Vector3 | BufferGeometry) points to build the tree from.\nmaxVerticesPerNode - (Integer) threshold for splitting a tree node into 8 sub-trees.\n\n#### `octree.addVertex(vertex)`\nAdding a vertex (Vector3) to the tree\n\n#### `foundIndices = octree.search(sphere)`\nSearches for vertices inside the sphere and returns their indices (array of Integer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferasta%2Fthree-octree-vertices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferasta%2Fthree-octree-vertices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferasta%2Fthree-octree-vertices/lists"}