Shadow-root and pseudo-element CSS animations land about a frame off, differently each load
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start in packages/core/src/runtime/adapters/waapi.ts, focusing on ensureBaseline and how animation currentTime is captured. Reproduce the issue in headless Chrome with the supplied shadow-root and pseudo-element page, then call window.__player.seek(2) and inspect both computed transforms. Done means both consistently report the expected translateX(50px) across repeated loads.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
A CSS animation inside a shadow root, or on a ::before/::after pseudo-element, lands at a slightly different frame each time the page loads. Seeking to the same time gives a position that varies by about one frame between runs (0.4 to 1.25 px on a 4 s, 100 px slide), in Studio's preview and in renders.
The CSS adapter only drives an element's own animations, so these are left to the WAAPI adapter. The WAAPI adapter records a baseline for each animation the first time it sees it, including the animation's own currentTime at that moment (ensureBaseline in packages/core/src/runtime/adapters/waapi.ts). For a CSS animation that has been running since the page loaded, that value is however much wall-clock time passed before discover, so every later seek is offset by it.
Repro
Headless Chrome, the runtime built from main, window.__player.seek(2), then read the computed transform. Load the page several times.
<style>
@keyframes slide { from { transform: translateX(0) } to { transform: translateX(100px) } }
#el::before { content: "x"; display: inline-block; animation: slide 4s linear 1 both; }
</style>
<div data-composition-id="main" data-root="true" data-start="0" data-duration="10" data-width="640" data-height="360">
<div id="el" class="clip" data-start="0" data-duration="10">el</div>
<div id="host" class="clip" data-start="0" data-duration="10"></div>
</div>
<script>
const sr = document.getElementById("host").attachShadow({ mode: "open" });
sr.innerHTML = '<style>@keyframes slide { from { transform: translateX(0) } to { transform: translateX(100px) } } #in { animation: slide 4s linear 1 both; }</style><div id="in">in</div>';
</script>
<!-- then the runtime script -->
Read after seek(2):
getComputedStyle(document.getElementById("el"), "::before").transformgetComputedStyle(document.getElementById("host").shadowRoot.getElementById("in")).transform
Expected: translateX(50px) on every load.
Observed: about 50.4 to 51.25 px, different from run to run.
Notes
- Animations on an element in the light DOM are driven by the CSS adapter from the clip's
data-startand are exact. - Found while testing #4554. It is not caused by it; main behaves the same.
- Ngôn ngữ chính
- TypeScript
- Star
- 54.1k
- Fork
- 4.9k
- Merge trung bình
- 7 giờ 18 phút
- Pull request đã merge (30 ngày)
- 784
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của heygen-com/hyperframes
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
heygen-com/hyperframes#5027 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(producer): propagate useGpu to HDR layered streaming encoderCó thể đã có người làm @Monster-GM đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
heygen-com/hyperframes#5002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#4702 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Studio catalog prompt editor has no accessible nameCó thể đã có người làm @lorenzozanee đã nhận 12 ngày trước. Đang mởbug difficulty/easy triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
heygen-com/hyperframes#4384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
lint: validate composition variables declared on supported root elementsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug difficulty/easy triage/ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
heygen-com/hyperframes#4383 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của heygen-com/hyperframes
Issue tương tự
-
fix: txId branch of the contract-state streams drops every state after the named transactionĐang mởbot:ai-assisted status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
midnightntwrk/midnight-js#1424 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mksglu/context-mode#1268 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Edit:Đang mởcheck:failed streams:edit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
iptv-org/iptv#54352 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Table] reserveSelectedRowOnPaginate=false 时表头全选包含其他页数据Có thể đã có người làm @dvd233 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Tencent/tdesign-react#4416 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:widget bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
interledger/publisher-tools#894 ·
Maintainer thường phản hồi trong vòng 1 ngày