Interface: ViewportOptions
Experimental
Properties
| Property | Type | Description |
|---|---|---|
background? | RGBA | null | Experimental Background fill for rect (sRGB 0–1). Omit/null to draw over what is below. |
clearDepth? | boolean | Experimental Clear depth before drawing. Defaults to true for 3D viewports, false for 2D. |
clip? | boolean | ViewportRect | Experimental Clipping. true (default): content is clipped to rect. false: no clipping (content may draw anywhere on the canvas, e.g. cliponaxis: false). A rect: clip to that rect (container coordinates, top-left origin) instead of rect. |
far? | number | Experimental |
fit? | boolean | Experimental Track the full canvas size (used by the overlay viewport). |
fov? | number | Experimental 3D perspective vertical field of view in degrees. Default 45. |
kind? | ViewportKind | Experimental Default '2d'. |
name? | string | Experimental Debug label. |
near? | number | Experimental Camera near/far. Defaults: 2D ±10000, 3D 0.01..1000. |
order? | number | Experimental Draw order; lower draws first. Ties keep insertion order. Default 0. |
orthoHalfHeight? | number | Experimental 3D orthographic: half of the visible height in world units. Default 1. |
projection? | "perspective" | "orthographic" | Experimental 3D only. Default 'perspective'. |
rect? | ViewportRect | Experimental Rect in CSS px (top-left origin of the container). Required unless fit is true. |