Skip to content

Intermact API Reference / @intermact/core / render

Function: render()

render(source, _camera, options?): IMObject2D

Defined in: packages/core/src/scene/rendered-scene.ts:107

Compose source (a 2D scene) as a RenderedSceneTrait-bearing IMObject2D that other scenes can register and animate (design.md §10.2). The returned object keeps stroke/fill traits for a headless quad fallback (SVG / bounds / hit-testing); a GL renderer reads the rendered-scene trait to draw the live sub-scene texture instead.

Parameters

source

Scene2D | Scene3D

_camera

RegisteredCamera2D

options?

RenderOptions = {}

Returns

IMObject2D

Throws

IntermactError invalid-argument if source is a 3D scene — only 2D source scenes are supported as offscreen panels in v1.

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