Closed yiiqii closed 4 months ago
The recent changes across multiple files primarily focus on refining the handling of rendering levels within the effects-core and related packages. Key modifications include the removal of the renderLevel
property from the Composition
class, updates to type declarations to use specific enums, and enhancements to the type safety and conditional checks within various classes. Additionally, a new demo page for hierarchical rendering has been introduced.
Files/Paths | Change Summary |
---|---|
packages/effects-core/src/composition.ts |
Removed the renderLevel property and adjusted destructuring assignments. |
packages/effects/src/player.ts |
Updated condition to check opts.renderLevel instead of composition.renderLevel . |
.../sub-composition-clip-playable.ts |
Added a check for boundObject existence before setting its time property. |
packages/effects-core/src/asset-manager.ts |
Updated SceneType declaration to include SceneRenderLevel instead of string . |
.../composition-source-manager.ts |
Changed type of renderLevel to SceneRenderLevel . |
.../pass-render-level.ts |
Updated to use SceneRenderLevel and spec.RenderLevel instead of strings. |
.../calculate-vfx-item.ts |
Enhanced type safety by checking the type of bound objects before certain operations. |
.../particle/particle-system.ts |
Changed renderLevel property's type from string to spec.RenderLevel . |
.../particle/particle-vfx-item.ts |
Refactored variable names and conditions for better clarity and type safety. |
.../sprite/sprite-item.ts |
Updated usage of VFXItem to a direct import and adjusted property access. |
.../activation-mixer-playable.ts |
Refactored logic related to bindingItem and boundObject for better transformation validity handling. |
packages/effects-core/src/scene.ts |
Changed renderLevel property in Scene interface to use SceneRenderLevel . |
packages/effects-core/src/utils/index.ts |
Added a new type PickEnum for picking keys from an enum type. |
plugin-packages/alipay-downgrade/src/utils.ts |
Updated import and return types to use SceneRenderLevel . |
web-packages/demo/html/render-level.html |
Introduced a new HTML file for a demo page on hierarchical rendering. |
web-packages/demo/index.html |
Added a new list item linking to the render-level.html demo page. |
web-packages/demo/src/render-level.ts |
Added functionality for rendering scenes with different levels of detail using a player component. |
In the code where levels blend and play,
We’ve made some changes to clear the way.
Render levels now precise and neat,
Ensuring scenes are quite the treat.
With demos new and checks refined,
Our code’s more robust, well-defined.
🎨✨
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?
Summary by CodeRabbit
New Features
render-level.html
) for hierarchical rendering with selectable render levels.render-level.ts
to dynamically load scenes and switch render levels.Bug Fixes
Refactor
renderLevel
with specific types (SceneRenderLevel
andspec.RenderLevel
) across multiple files for better type enforcement.Chores