{"id":18411047,"url":"https://github.com/guyettinger/gle-potree","last_synced_at":"2025-04-12T22:52:08.535Z","repository":{"id":204289905,"uuid":"711528968","full_name":"guyettinger/gle-potree","owner":"guyettinger","description":"Potree loader for ThreeJS, converted and adapted to Typescript.","archived":false,"fork":false,"pushed_at":"2024-08-05T04:14:01.000Z","size":209,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T22:51:57.190Z","etag":null,"topics":["point-cloud","potree","three","typescript"],"latest_commit_sha":null,"homepage":"https://gle-scene-components.vercel.app/?path=/story/gle-scene-components-scene--point-clouds","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guyettinger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-10-29T14:49:25.000Z","updated_at":"2024-12-18T09:44:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e793142-c034-4b21-90b8-8e256cc9f575","html_url":"https://github.com/guyettinger/gle-potree","commit_stats":null,"previous_names":["guyettinger/gle-potree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-potree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-potree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-potree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guyettinger%2Fgle-potree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guyettinger","download_url":"https://codeload.github.com/guyettinger/gle-potree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643043,"owners_count":21138353,"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":["point-cloud","potree","three","typescript"],"created_at":"2024-11-06T03:35:01.641Z","updated_at":"2025-04-12T22:52:08.515Z","avatar_url":"https://github.com/guyettinger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThis project is based on the core/loading parts of [Potree](http://potree.org/), converted to Typescript for usage directly in ThreeJS-based third-party applications.\n\nThis project focuses solely on the loading of point clouds into ThreeJS applications and doesn't try to provide other things which are available in Potree: earth controls, measurement tools, elevation profiles, etc.\n\nIf you have a need for such auxiliary components/tools, we would most definitely welcome contributions, potentially as part of another project under the PNext organization.\n\nAnd of course, suggestions for better/easier APIs or new features, as well as PRs, are very welcome too!\n\n# Usage\n\n```typescript\nimport { Scene } from 'three';\nimport { PointCloudOctree, Potree } from '@pnext/three-loader';\n\nconst scene = new Scene();\n// Manages the necessary state for loading/updating one or more point clouds.\nconst potree = new Potree();\n// Show at most 2 million points.\npotree.pointBudget = 2_000_000;\n// List of point clouds which we loaded and need to update.\nconst pointClouds: PointCloudOctree[] = [];\n\npotree\n  .loadPointCloud(\n    // The name of the point cloud which is to be loaded.\n    'cloud.js',\n    // Given the relative URL of a file, should return a full URL (e.g. signed).\n    relativeUrl =\u003e `${baseUrl}${relativeUrl}`,\n  )\n  .then(pco =\u003e {\n    pointClouds.push(pco);\n    scene.add(pco); // Add the loaded point cloud to your ThreeJS scene.\n\n    // The point cloud comes with a material which can be customized directly.\n    // Here we just set the size of the points.\n    pco.material.size = 1.0;\n  });\n\nfunction update() {\n  // This is where most of the potree magic happens. It updates the visiblily of the octree nodes\n  // based on the camera frustum and it triggers any loads/unloads which are necessary to keep the\n  // number of visible points in check.\n  potree.updatePointClouds(pointClouds, camera, renderer);\n\n  // Render your scene as normal\n  renderer.clear();\n  renderer.render(scene, camera);\n}\n```\n\nYou can play with a live example here: https://codesandbox.io/s/yw2p3446j9?autoresize=1\u0026view=preview\n\n# Local Development\n\nTo develop and contribute to the project, you need to start by cloning the repositry and then install all the dependencies with yarn:\n\n```bash\n\u003e yarn\n```\n\nOnce that is done you can start a development server by running:\n\n```bash\n\u003e yarn start\n```\n\nYou can also start the example application (`/example`) by running:\n\n```bash\n\u003e yarn start:example\n```\n\nTo create a production-ready build of the library which can be published to NPM, you can run the following command:\n\n```bash\n\u003e yarn build\n```\n\n# Thank You!\n\nThank you to Markus Schütz for his work on Potree, on which this project is based.\n\n# Contributors\n\n## Pix4D\n\nWe use this as part of our online 3D model viewer (http://cloud.pix4d.com).\n\n## Georepublic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyettinger%2Fgle-potree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguyettinger%2Fgle-potree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguyettinger%2Fgle-potree/lists"}