Skip to content

Intermact API Reference / @intermact/core / RenderedSceneSource

Interface: RenderedSceneSource

Defined in: packages/core/src/object/traits.ts:160

Opaque handle to an embedded sub-scene that a renderer adapter draws into an offscreen texture (design.md §10.2). Produced by the scene-layer render() and consumed by the renderer. The object/trait layer stays free of animation/scene types by exposing the per-frame snapshot as unknown — the renderer casts it back to its RenderSnapshot. The sub-player is assembled lazily during the build pass, so ready is false until then.

Properties

background?

readonly optional background?: string

Defined in: packages/core/src/object/traits.ts:168

Background clear color for the offscreen pass.


dimension

readonly dimension: "2d" | "3d"

Defined in: packages/core/src/object/traits.ts:162

Dimension of the embedded scene (currently "2d").


domain?

readonly optional domain?: RenderedSceneDomain

Defined in: packages/core/src/object/traits.ts:164

World domain used to fit the offscreen camera (2D scenes).


duration

readonly duration: number

Defined in: packages/core/src/object/traits.ts:172

Total sub-timeline duration in seconds (0 until ready).


fit?

readonly optional fit?: "contain" | "cover" | "stretch"

Defined in: packages/core/src/object/traits.ts:166

Aspect-ratio strategy for the offscreen camera (mirrors Scene2DProps.fit).


ready

readonly ready: boolean

Defined in: packages/core/src/object/traits.ts:170

Whether the sub-player has been assembled (build pass complete).

Methods

advance()

advance(dt): void

Defined in: packages/core/src/object/traits.ts:174

Advance the sub-timeline by dt seconds (live texture mode).

Parameters

dt

number

Returns

void


seek()

seek(time): void

Defined in: packages/core/src/object/traits.ts:176

Seek the sub-timeline to an absolute time (snapshot mode / scrubbing).

Parameters

time

number

Returns

void


snapshot()

snapshot(): unknown

Defined in: packages/core/src/object/traits.ts:178

Latest sub-scene render snapshot; renderer casts to its RenderSnapshot.

Returns

unknown

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)