-
Notifications
You must be signed in to change notification settings - Fork 23
refactor: render pass options initialization and execute logic #1291
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
Conversation
WalkthroughMajor refactoring of the RenderPass system: simplified public API surface by removing legacy constructs (RenderPassAttachmentOptions, RenderPassDelegate), introduced default values for priority/name/meshes/meshOrder, replaced "destroyed" with "disposed" flag, moved mesh configuration from constructor to runtime addMesh() method, and removed delegate-based lifecycle hooks from renderer. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant RenderPass
participant DrawObjectPass
participant Renderer
participant Framebuffer
Note over Client,Framebuffer: New: Constructor-based defaults with specialized subclasses
Client->>DrawObjectPass: new DrawObjectPass(renderer, options)
DrawObjectPass->>DrawObjectPass: this.priority = RenderPassPriorityNormal
DrawObjectPass->>DrawObjectPass: this.name = 'DrawObjectPass'
Client->>DrawObjectPass: addMesh(mesh)
DrawObjectPass->>DrawObjectPass: meshes.push(mesh)
Client->>Renderer: executeRenderPass(drawObjectPass)
Renderer->>DrawObjectPass: execute(renderer)
DrawObjectPass->>Framebuffer: clear(color, depth, stencil via TextureLoadAction)
DrawObjectPass->>Renderer: renderMeshes (direct, no delegate)
DrawObjectPass->>Framebuffer: storeAction.clear()
Renderer->>DrawObjectPass: dispose()
DrawObjectPass->>Renderer: engine.off('resize', onResize)
DrawObjectPass->>DrawObjectPass: this.disposed = true
Note over Client,Framebuffer: Old: Constructor-based configuration with delegates
Note over Client,Framebuffer: (Before: name/priority/meshes passed in constructor, delegate lifecycle hooks invoked)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (12)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2024-10-18T09:15:08.038ZApplied to files:
📚 Learning: 2025-08-05T07:50:26.317ZApplied to files:
🧬 Code graph analysis (3)web-packages/test/unit/src/effects-webgl/gl-render-frame.spec.ts (1)
packages/effects-core/src/render/draw-object-pass.ts (2)
plugin-packages/editor-gizmo/src/gizmo-component.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (23)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
Summary by CodeRabbit
Release Notes
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.