Skip to main content

Function: renderParametrized()

renderParametrized<P, D>(definition, inputProps?, options?): Promise<ParametrizedRenderResult<P, D>>

Defined in: src/serialization/parametrized.ts:323

Render a parametrized scene: merge input props over defaults (input wins), run calculateMetadata (which may fetch data and override size/fps/duration), apply the metadata to the scene, build the scene, and expose the resolved props as a shareable URL hash.

Headless-safe: with no scene and no DOM it builds a headless scene and the URL write is a no-op. The data fetch goes through the injectable DataFetcher seam, so tests never touch the network.

Type Parameters​

P​

P extends object

D​

D = unknown

Parameters​

definition​

ParametrizedSceneDefinition<P, D>

The parametrized scene definition.

inputProps?​

PropsRecord

Partial input props (merged over the defaults).

options?​

RenderParametrizedOptions = {}

Scene, fetcher and URL-write options.

Returns​

Promise<ParametrizedRenderResult<P, D>>

The built scene, resolved props, data, metadata and shareable URL.