Animations a script creates before the runtime loads land up to a frame off, differently each load
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- computer-graphics, frontend
Direzione di ricerca
Start in packages/core/src/runtime/adapters/waapi.ts, focusing on ensureBaseline and how it records an animation's currentTime. Run the supplied headless Chrome reproduction with window.__player.seek(2) across several page loads, then verify the computed transform consistently reads translateX(50px) for the pre-runtime animation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
An animation a composition's script creates with el.animate() before the runtime loads lands up to a frame off after a seek, differently on each page load. A 4 s linear 100 px slide seeked to 2 s reads 50 to 51.25 px instead of 50.
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). An animation created before the runtime has already been running on the wall clock for however long loading took, so every later seek is offset by that amount. Animations created after the runtime loads go through the adapter's Element.prototype.animate hook and are anchored where they are created.
Repro
Headless Chrome, the runtime built from main, window.__player.seek(2), then read the computed transform. Load the page several times.
<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>
<script>
document.getElementById("el").animate(
[{ transform: "translateX(0)" }, { transform: "translateX(100px)" }],
{ duration: 4000, easing: "linear", fill: "both" },
);
</script>
<!-- then the runtime script -->
Expected: translateX(50px) on every load.
Observed: 50 to 51.25 px, varying by load.
Notes
- Same family as #4555 (CSS animations in shadow roots and on pseudo-elements), which anchors CSS animations at their clip's start. Script-created animations need their own decision about where they start, so they are kept separate.
- Lingua principale
- TypeScript
- Stelle
- 54.1k
- Fork
- 4.9k
- Merge medio
- 7h 29m
- PR unite (30g)
- 778
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di heygen-com/hyperframes
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
heygen-com/hyperframes#5027 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(producer): propagate useGpu to HDR layered streaming encoderForse già presa @Monster-GM l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
heygen-com/hyperframes#5002 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
heygen-com/hyperframes#4702 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Studio catalog prompt editor has no accessible nameForse già presa @lorenzozanee l’ha presa 11 giorni fa. Apertabug difficulty/easy triage/ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
heygen-com/hyperframes#4384 ·
I maintainer di solito rispondono entro 1 giorno
-
lint: validate composition variables declared on supported root elementsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug difficulty/easy triage/ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
heygen-com/hyperframes#4383 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di heygen-com/hyperframes
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno