Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for new potree format #139

Merged
merged 34 commits into from
May 6, 2024

Conversation

MPanknin
Copy link
Collaborator

@MPanknin MPanknin commented Apr 17, 2024

This PR adds support for the new Potree format 2.0 aka metadata.json.

It is based to a large extent on this community fork https://github.com/shiukaheng/potree-loader and on https://github.com/tentone/potree-core as well as https://github.com/potree/potree obviously.

Main differences being:

  • We stick with WebPack rather then swicthing to Parcel or Vite
  • Removed the support for brotli decoding because embedding the complete library feels unnatural. Brotli decoding should be based on https://github.com/foliojs/brotli.js as dependency. Scope of another PR
  • We stick with our current shader model rather than upgrading to #version 300 es. If we really need this at some point it should be scope of another PR since all the refactoring clutters the actual update.
  • Tried to obey our conventions for file names
  • Preserves our code for screen space clipping

@MPanknin MPanknin self-assigned this Apr 17, 2024
src/potree.ts Outdated Show resolved Hide resolved
src/potree.ts Outdated Show resolved Hide resolved
@MPanknin MPanknin marked this pull request as ready for review April 29, 2024 07:43
package.json Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
src/loading2/decoder.worker.js Outdated Show resolved Hide resolved
webpack.config.prod.js Show resolved Hide resolved
webpack.config.js Show resolved Hide resolved
MPanknin and others added 3 commits April 29, 2024 10:51
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
MPanknin and others added 6 commits April 29, 2024 10:54
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
Co-authored-by: Piotr Jurczyński <619650+pjurczynski@users.noreply.github.com>
example/viewer.ts Outdated Show resolved Hide resolved
example/main.ts Outdated Show resolved Hide resolved
if (loaded[version]) {
return;
}
loaded[version] = true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For an example, it would probably feel more natural to check if the url is loaded rater than the version

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions @turien-pix4d I've updated the unloading accordingly. In terms of checking the url, I personally think we can leave it as is as this is really just meant as an example to show how to load and dump the two different Pointcloud versions.

@MPanknin MPanknin merged commit a875062 into pnext:master May 6, 2024
@MPanknin MPanknin deleted the new-potree-format branch May 6, 2024 13:23
@MPanknin MPanknin mentioned this pull request May 29, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants