{"id":16153268,"url":"https://github.com/danielesteban/r3f-voxels-pathfinder","last_synced_at":"2025-07-26T09:07:53.445Z","repository":{"id":246252818,"uuid":"820616166","full_name":"danielesteban/r3f-voxels-pathfinder","owner":"danielesteban","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-07T22:21:48.000Z","size":87,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T11:56:23.919Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/danielesteban.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-26T20:43:10.000Z","updated_at":"2024-07-07T22:21:51.000Z","dependencies_parsed_at":"2024-06-26T22:06:07.085Z","dependency_job_id":"c5c62c0e-c05b-419b-958c-45b40719fb82","html_url":"https://github.com/danielesteban/r3f-voxels-pathfinder","commit_stats":null,"previous_names":["danielesteban/r3f-voxels-pathfinder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fr3f-voxels-pathfinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fr3f-voxels-pathfinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fr3f-voxels-pathfinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fr3f-voxels-pathfinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielesteban","download_url":"https://codeload.github.com/danielesteban/r3f-voxels-pathfinder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945561,"owners_count":20372897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T01:10:49.547Z","updated_at":"2025-03-18T19:32:19.660Z","avatar_url":"https://github.com/danielesteban.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"r3f-voxels-pathfinder\n==\n\n### Examples\n\n* [Example](https://codesandbox.io/p/sandbox/r3f-voxels-pathfinder-jm3y5r)\n\n### Installation \n\n```bash\nnpm install r3f-voxels-pathfinder\n```\n\n### Basic usage\n\n```jsx\nimport { Suspense, useRef } from 'react';\nimport { Canvas } from '@react-three/fiber';\nimport { Voxels, VoxelsApi } from 'r3f-voxels';\nimport { Pathfinder, PathfinderApi } from 'r3f-voxels-pathfinder';\nimport { Vector3 } from 'three';\n\nconst Scene = () =\u003e {\n  const voxels = useRef\u003cVoxelsApi\u003e(null!);\n  const pathfinder = useRef\u003cPathfinderApi\u003e(null!);\n  useLayoutEffect(() =\u003e {\n    for (let i = 0; i \u003c 16; i++) {\n      voxels.current.setVoxel(new Vector3(i, 0, 0), 1);\n    }\n    console.log(\n      pathfinder.current.getPath(\n        new Vector3(0, 0, 0),\n        new Vector3(10, 0, 0)\n      )\n    );\n  }, []);\n  return (\n    \u003cVoxels ref={voxels}\u003e\n      \u003cSuspense\u003e\n        \u003cPathfinder ref={pathfinder} /\u003e\n      \u003c/Suspense\u003e\n    \u003c/Voxels\u003e\n  );\n};\n\nconst App = () =\u003e  (\n  \u003cCanvas\u003e\n    \u003cScene /\u003e\n    \u003cambientLight /\u003e\n  \u003c/Canvas\u003e\n);\n```\n\n### Api\n\n```ts\ntype PathfinderApi = {\n  addObstacle: (position: Vector3) =\u003e void;\n  removeObstacle: (position: Vector3) =\u003e void;\n  getPath: (from: Vector3, to: Vector3, height?: number) =\u003e Vector3[];\n  ground: (position: Vector3, height?: number, minY?: number) =\u003e boolean;\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielesteban%2Fr3f-voxels-pathfinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielesteban%2Fr3f-voxels-pathfinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielesteban%2Fr3f-voxels-pathfinder/lists"}