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

fix: modernize & tree-shake #241

Merged
merged 20 commits into from
May 26, 2023

Conversation

CodyJasonBennett
Copy link
Member

@CodyJasonBennett CodyJasonBennett commented May 26, 2023

Fixes #103
Fixes #114
Fixes #237
Fixes #244

Some examples still used prototype hacks or were missing pure annotations for module side-effects. I've opted to upstream older examples and their types which received no breaking changes, but fixes and improvements. Some modules also had missing types.

Notes:

  • src/offscreen wasn't exported, so I've opted to remove them since they have no utility.
  • src/nodes and src/renderers/webgpu are defunct and based on a now non-existent WebGPU standard. These rely on prototype hacks which breaks WebGL code and can't be removed without changes in the three.js core. This is also very old, SPIR-V support was removed years ago for WGSL, so we won't need @webgpu/glslang either. I've also opted to remove them, but I question whether this is breaking since it's both not used in userland and fixes issues with the library.

TODO:

  • misc
  • renderers
  • textures
  • modifiers
  • exporters
  • animation
  • objects
  • utils
  • math
  • controls
  • postprocessing
  • webxr
  • geometries
  • csm
  • shaders
  • interactive
  • physics (MMDPhysics relies on a global UMD of Ammo #9)
  • effects
  • loaders
  • lines
  • helpers
  • lights
  • curves
  • deprecated
  • libs

@CodyJasonBennett CodyJasonBennett marked this pull request as draft May 26, 2023 14:36
@codesandbox-ci
Copy link

codesandbox-ci bot commented May 26, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 504107d:

Sandbox Source
Vanilla Configuration

@CodyJasonBennett CodyJasonBennett marked this pull request as ready for review May 26, 2023 17:32
@CodyJasonBennett CodyJasonBennett merged commit 858d35d into pmndrs:main May 26, 2023
@CodyJasonBennett CodyJasonBennett deleted the fix/tree-shake branch May 26, 2023 19:53
@github-actions
Copy link

🎉 This PR is included in version 2.22.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment