diff --git a/apps/web/src/components/engine/encode/image-encoder.ts b/apps/web/src/components/engine/encode/image-encoder.ts index 5d29493..4e78815 100644 --- a/apps/web/src/components/engine/encode/image-encoder.ts +++ b/apps/web/src/components/engine/encode/image-encoder.ts @@ -106,10 +106,21 @@ export async function createImageEncoder(sourceWorld: EngineWorld, config: Image // computed start is 0 unless it carries a Trim, whose start offsets it. const startFrame = c.Computed.start[rootEid] ?? 0; + // Entities in the clone that own a timeline clock + const clockEids = clonedEids.filter(eid => hasComponent(world, eid, c.Playback)); + const seek = (frame: number) => { const stageFrame = startFrame + frame; + const stageSeconds = framesToSeconds(stageFrame, world.frameRate); c.Computed.localTime[stageEid] = stageFrame; - c.Computed.localTimeInSeconds[stageEid] = framesToSeconds(stageFrame, world.frameRate); + c.Computed.localTimeInSeconds[stageEid] = stageSeconds; + + for (const eid of clockEids) { + c.Computed.localTime[eid] = stageFrame; + c.Computed.localTimeInSeconds[eid] = stageSeconds; + c.Playback.playing[eid] = 1; + } + world.timestamp.delta = 1000 / world.frameRate; world.timestamp.now += world.timestamp.delta; diff --git a/reference/jsx/html-paint.md b/reference/jsx/html-paint.md index 8462000..a913a60 100644 --- a/reference/jsx/html-paint.md +++ b/reference/jsx/html-paint.md @@ -3,7 +3,7 @@ An element whose children are **real HTML**: the browser lays them out at the element's box size and the result is drawn into the box via the [html-in-canvas](https://github.com/WICG/html-in-canvas) API. `dapi` always drives the Diffusion Studio Electron app, which ships with this API enabled, so `` is always available — reach for it liberally. It is the recommended way to build motion graphics, overlays, and any UI-heavy content: styled cards, tables, code blocks, flex/grid layouts — anything painful to assemble from `` and ``. ```tsx - +
01 Introduction @@ -21,14 +21,6 @@ An element whose children are **real HTML**: the browser lays them out at the el ``` -A [``](./scene.md) is a filled visual element too, so an `` can sit directly on it: the paint fills the whole composition box and the scene becomes a **pure HTML scene**, laid out entirely with real HTML and CSS: - -```tsx - - - -``` - ## Reactivity @@ -65,3 +57,4 @@ The compiled module is persisted with the document: on reload, export, and `dapi - Cross-origin subresources (e.g. remote images) are excluded from the painted output by the browser's read-back rules; use local assets. - `