Closed zhuxudong closed 1 week ago
Try opt Promise count
Create a issue with can't query sub asset array
The recent updates primarily focus on enhancing the ResourceManager
and GLTFParserContext
for managing sub-asset promises more efficiently and adjusting URL construction logic for asset processing. Key additions include methods for creating and releasing sub-asset promises and refining method parameters involving URL handling.
Files & Directories | Change Summary |
---|---|
packages/core/src/asset/ResourceManager.ts |
Improved sub-asset promise management, added new methods for handling promises, and adjusted internal structures. |
packages/loader/src/gltf/parser/GLTFParserContext.ts |
Refined URL construction logic for _onSubAssetSuccess method calls, improving resource handling. |
tests/src/core/resource/ResourceManager.test.ts |
Added tests for new functionality, including AssetPromise and ResourceManager , with chai and chai-spies . |
sequenceDiagram
participant GLTFParserContext
participant ResourceManager
GLTFParserContext->>ResourceManager: call _onSubAssetSuccess(url, resourceKey, asset)
ResourceManager->>ResourceManager: create sub-asset promise callback(resourceKey, asset)
ResourceManager->>ResourceManager: store callback in _subAssetPromiseCallbacks
ResourceManager-->>GLTFParserContext: promise resolved
Note over GLTFParserContext, ResourceManager: Handle sub-asset success efficiently
GLTFParserContext->>ResourceManager: call _onSubAssetFail(url, resourceKey)
ResourceManager->>ResourceManager: release sub-asset promise callback(url)
ResourceManager-->>GLTFParserContext: promise rejected
Note over GLTFParserContext, ResourceManager: Handle sub-asset failure gracefully
🐰 In bytes and whispers, code unfurls, Glimmering paths in techie whirls. Resources managed, promises made, URLs crafted in logic's parade. The tests now spy, with chai delight, In these changes, functions take flight! 🚀
[!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?
Attention: Patch coverage is 57.14286%
with 18 lines
in your changes missing coverage. Please review.
Project coverage is 66.15%. Comparing base (
4b28345
) to head (e556493
). Report is 18 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
packages/core/src/asset/ResourceManager.ts | 52.63% | 10 Missing and 8 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary by CodeRabbit