Conversation
Merge origin/main into origin/dev
Merge origin/main into origin/dev
Merge origin/main into origin/dev
Merge origin/main into origin/dev
* fix: spine and particle mask * style: import --------- Co-authored-by: yiiqii <yfj5tzl2005@sina.com>
docs: changelog 2.4.5
fix: 3d mesh component modifies the original data
fix: particle hitTest is invalid
Merge origin/dev into origin/main
docs: changelog 2.4.6
WalkthroughThis update adds two new patch releases (2.4.5 and 2.4.6) to the changelogs and updates package versions across multiple packages. It modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant Renderer
participant ParticleSystem
participant SpineComponent
Note over ParticleSystem,SpineComponent: Both implement Maskable interface
Renderer->>ParticleSystem: drawStencilMask(renderer)
ParticleSystem->>ParticleSystem: Save colorMask states
ParticleSystem->>ParticleSystem: Set colorMask to false
ParticleSystem->>Renderer: Render meshes (stencil mask)
ParticleSystem->>ParticleSystem: Restore colorMask states
Renderer->>SpineComponent: drawStencilMask(renderer)
SpineComponent->>SpineComponent: Check active/content
SpineComponent->>SpineComponent: Save colorMask states
SpineComponent->>SpineComponent: Set colorMask to false
SpineComponent->>Renderer: Render meshGroups (stencil mask)
SpineComponent->>SpineComponent: Restore colorMask states
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
CHANGELOG-zh_CN.md (1)
11-17: Approve changelog entry for 2.4.6
Accurately documents the new patch release and its fixes.Nitpick: capitalize "3D"
Consider updating "3d mesh component" to "3D mesh component" for consistency.🧰 Tools
🪛 LanguageTool
[grammar] ~16-~16: Did you mean “3D”(= three-dimensional) or “3rd” (= third)?
Context: ...untime/pull/1023) @wumaolinmaoan - Fix: 3d mesh component modifies the original da...(THREE_D)
CHANGELOG.md (1)
10-16: Approve changelog entry for 2.4.6
Lists the patch release date and fixes accurately.Nitpick: capitalize "3D"
Change "3d mesh component" to "3D mesh component" in the fix description.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (21)
CHANGELOG-zh_CN.md(1 hunks)CHANGELOG.md(1 hunks)packages/effects-core/package.json(1 hunks)packages/effects-core/src/material/types.ts(1 hunks)packages/effects-core/src/plugins/particle/particle-system.ts(3 hunks)packages/effects-helper/package.json(1 hunks)packages/effects-threejs/package.json(1 hunks)packages/effects-webgl/package.json(1 hunks)packages/effects/package.json(1 hunks)plugin-packages/alipay-downgrade/package.json(1 hunks)plugin-packages/downgrade/package.json(1 hunks)plugin-packages/editor-gizmo/package.json(1 hunks)plugin-packages/model/package.json(1 hunks)plugin-packages/model/src/plugin/model-item.ts(1 hunks)plugin-packages/multimedia/package.json(1 hunks)plugin-packages/orientation-transformer/package.json(1 hunks)plugin-packages/rich-text/package.json(1 hunks)plugin-packages/spine/package.json(1 hunks)plugin-packages/spine/src/spine-component.ts(3 hunks)plugin-packages/stats/package.json(1 hunks)web-packages/test/case/src/common/test-controller.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
packages/effects-core/src/material/types.ts (1)
packages/effects-core/src/render/renderer.ts (1)
Renderer(13-146)
plugin-packages/spine/src/spine-component.ts (3)
packages/effects-core/src/components/renderer-component.ts (3)
RendererComponent(10-45)material(25-27)material(28-34)packages/effects-core/src/material/types.ts (1)
Maskable(98-100)packages/effects-core/src/render/renderer.ts (1)
Renderer(13-146)
🪛 LanguageTool
CHANGELOG-zh_CN.md
[grammar] ~16-~16: Did you mean “3D”(= three-dimensional) or “3rd” (= third)?
Context: ...untime/pull/1023) @wumaolinmaoan - Fix: 3d mesh component modifies the original da...
(THREE_D)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (24)
packages/effects/package.json (1)
3-3: Version bumped to 2.4.6
Aligns this package with the coordinated 2.4.6 release documented in the changelogs.plugin-packages/stats/package.json (1)
3-3: Version bumped to 2.4.6
Consistent with the synchronized release across all effects plugins and matches the changelog entry.packages/effects-core/package.json (1)
3-3: Version bumped to 2.4.6
Correctly updates the core package to the new release version; changelog reflects these fixes.packages/effects-helper/package.json (1)
3-3: Version bumped to 2.4.6
Helper package now matches the coordinated 2.4.6 release lineup.plugin-packages/rich-text/package.json (1)
3-3: Version bumped to 2.4.6
Rich-text plugin version aligns with the overall 2.4.6 release across the monorepo.plugin-packages/orientation-transformer/package.json (1)
3-3: Version bumped to 2.4.6
The update aligns this plugin with the coordinated 2.4.6 release across all packages.packages/effects-webgl/package.json (1)
3-3: Version bumped to 2.4.6
This version update matches the cross-package release—no other changes detected.packages/effects-threejs/package.json (1)
3-3: Version bumped to 2.4.6
Consistent with the 2.4.6 release cycle; dependencies remain unchanged.plugin-packages/editor-gizmo/package.json (1)
3-3: Version bumped to 2.4.6
Aligns the editor-gizmo plugin with the overall release version.plugin-packages/downgrade/package.json (1)
3-3: Version bumped to 2.4.6
The downgrade plugin version is in sync with the rest of the ecosystem.plugin-packages/alipay-downgrade/package.json (1)
3-3: Version update looks good.The version bump to 2.4.6 is consistent with the coordinated release across all packages.
plugin-packages/model/src/plugin/model-item.ts (1)
122-134: Excellent fix to prevent data mutation.The updated
fromDatamethod correctly addresses the issue where the original input data was being modified. Creating a new object with spread syntax and properly resolving references ensures the original data remains immutable while maintaining the same functionality.This is a good defensive programming practice that prevents unexpected side effects.
plugin-packages/model/package.json (1)
3-3: Version update is consistent with the release.The version bump to 2.4.6 aligns with the functional fixes implemented in this package.
plugin-packages/spine/package.json (1)
3-3: Version update aligns with the coordinated release.The version bump to 2.4.6 is consistent with the other packages and the stencil mask improvements mentioned in the release notes.
plugin-packages/multimedia/package.json (1)
3-3: Approve version bump to 2.4.6
Aligns with the updated patch releases across related packages.web-packages/test/case/src/common/test-controller.ts (1)
7-7: Verify fallback oldVersion alignment
The defaultoldVersionis set to'2.4.5'. Should this be bumped to'2.4.6'to reflect the latest patch release?CHANGELOG-zh_CN.md (1)
18-23: Approve changelog entry for 2.4.5
Correctly adds the 2.4.5 release details above the existing entries.CHANGELOG.md (1)
17-22: Approve changelog entry for 2.4.5
Accurately inserts the 2.4.5 fixes at the top of the changelog.packages/effects-core/src/material/types.ts (1)
99-99: LGTM! Interface method signature improvement.The change from a function property to a method signature is more conventional for TypeScript interfaces and aligns better with the implementations in the other files.
plugin-packages/spine/src/spine-component.ts (3)
4-4: LGTM! Proper import addition.Correctly added
Maskableto the imports to support the interface implementation.
60-60: LGTM! Interface implementation added.The
SpineComponentnow properly implements theMaskableinterface, enabling it to participate in stencil masking operations.
201-224: LGTM! Correct stencil masking implementation.The
drawStencilMaskmethod correctly implements stencil masking by:
- Validating component state (
isActiveAndEnabledandcontentexistence)- Temporarily disabling color mask on all materials to prevent color buffer writes
- Rendering content to write only to the stencil buffer
- Restoring original color mask states
This follows the proper pattern for stencil masking operations.
packages/effects-core/src/plugins/particle/particle-system.ts (2)
156-156: LGTM! Interface implementation added.The
ParticleSystemnow properly implements theMaskableinterface, enabling particle systems to participate in stencil masking operations.
502-524: LGTM! Consistent stencil masking implementation.The
drawStencilMaskmethod correctly implements stencil masking following the same pattern asSpineComponent:
- Validates component state with
isActiveAndEnabledcheck- Temporarily disables color mask on all renderer mesh materials
- Renders meshes individually to write only to the stencil buffer
- Restores original color mask states using proper indexing
The implementation is consistent and handles particle system stencil masking correctly.
Summary by CodeRabbit
Bug Fixes
New Features
Chores