Skip to content

fix(engine): preserve zero root opacity#2544

Open
tianma-if wants to merge 1 commit into
heygen-com:mainfrom
tianma-if:codex/draw-element-zero-root-opacity
Open

fix(engine): preserve zero root opacity#2544
tianma-if wants to merge 1 commit into
heygen-com:mainfrom
tianma-if:codex/draw-element-zero-root-opacity

Conversation

@tianma-if

Copy link
Copy Markdown

Summary

  • preserve an initial composition-root opacity of zero in DrawElement capture
  • fall back to opacity 1 only for non-finite computed values
  • add a DOM regression test for canvas injection

Why

The legacy root-opacity correction records the composition root opacity before wrapping it. The previous truthy fallback converted a valid opacity: 0 to 1, producing an incorrect correction ratio on later frames.

Validation

  • bunx oxfmt and bunx oxlint on changed files
  • bun run --filter @hyperframes/engine test -- drawElementService.dom.test.ts
  • bun run --filter @hyperframes/engine typecheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant