Closed gz65555 closed 3 days ago
@coderabbitai review
These updates in the GLTFLoader.ts
and EXT_meshopt_compression.ts
files pivot around the integration and utilization of the meshoptDecoder
using async methods. By modifying the import statements and implementing promises to dynamically acquire the meshoptDecoder
, the refactoring enhances flexibility and potential configurations in initializing and releasing this resource across the loader functionalities.
Files | Change Summary |
---|---|
packages/loader/src/GLTFLoader.ts |
Import of MeshoptDecoder changed to getMeshoptDecoder . Refactored release and initialize methods to use promises for obtaining meshoptDecoder . |
packages/loader/src/gltf/extensions/... |
Refactored EXT_meshopt_compression.ts to replace MeshoptDecoder import with a call to getMeshoptDecoder() , updating the method usage accordingly. |
sequenceDiagram
participant GLTFLoader
participant MeshoptDecoder
GLTFLoader ->> MeshoptDecoder: import and usage during initialization
GLTFLoader ->> MeshoptDecoder: invoke decodeGltfBuffer()
GLTFLoader -->> MeshoptDecoder: release resources
sequenceDiagram
participant GLTFLoader
participant meshoptDecoderFactory
GLTFLoader ->> meshoptDecoderFactory: invoke getMeshoptDecoder()
meshoptDecoderFactory -->> GLTFLoader: returns meshoptDecoder
GLTFLoader ->> meshoptDecoder: invoke decodeGltfBuffer()
GLTFLoader ->> meshoptDecoderFactory: async release via promise
In the world of code so fine, We now async our decoder divine. Promises fulfilled with grace, We set the pace, a swifter race. MeshoptDecoder, now you gleam, Through GLTF, you streamline our dream.
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Please check if the PR fulfills these requirements
Summary by CodeRabbit
MeshoptDecoder
is handled. This change ensures more efficient initialization and usage of the decoder in theGLTFLoader
.