Skip to main content

Interface: SceneOptions

Defined in: src/core/Scene.ts:54

Options for configuring a Scene.

Extended by​

Properties​

autoRender?​

optional autoRender: boolean

Defined in: src/core/Scene.ts:70

Enable auto-render on add/remove. Defaults to true.


autoResize?​

optional autoResize: boolean

Defined in: src/core/Scene.ts:81

Automatically resize the canvas when its container (or the window, on mobile rotation) changes size. Only active when both width and height are omitted — passing either dimension is treated as a request for a pinned canvas size, so auto-resize stays off. Defaults to true.


backgroundColor?​

optional backgroundColor: string

Defined in: src/core/Scene.ts:60

Background color as CSS color string. Defaults to Manim's dark gray (#1C1C1C).


backgroundOpacity?​

optional backgroundOpacity: number

Defined in: src/core/Scene.ts:72

Background opacity (0 = fully transparent, 1 = fully opaque). Defaults to 1. Not supported when exporting to video or GIF formats.


frameHeight?​

optional frameHeight: number

Defined in: src/core/Scene.ts:64

Frame height in world units. Defaults to 8 (Manim standard).


frameWidth?​

optional frameWidth: number

Defined in: src/core/Scene.ts:62

Frame width in world units. Defaults to 14 (Manim standard).


frustumCulling?​

optional frustumCulling: boolean

Defined in: src/core/Scene.ts:68

Enable frustum culling optimization. Defaults to true.


headless?​

optional headless: boolean

Defined in: src/core/Scene.ts:74

Enable headless mode (no WebGL renderer). Useful for testing scene logic without a DOM.


height?​

optional height: number

Defined in: src/core/Scene.ts:58

Canvas height in pixels. Defaults to container height.


targetFps?​

optional targetFps: number

Defined in: src/core/Scene.ts:66

Target frame rate in fps. Defaults to 60.


width?​

optional width: number

Defined in: src/core/Scene.ts:56

Canvas width in pixels. Defaults to container width.