Surface interface
The element's single GL copy.
import type { Surface } from '@dioramajs/diorama/effects'Effects add transforms in the order they sit on the element.
interface SurfaceMembers
| Name | Type | Description |
|---|---|---|
readonly material | MeshBasicNodeMaterial | The material currently drawn. Replaced when the set of transforms changes. |
readonly mesh | Mesh | A 1x1 plane on the box. Shared: read or tweak it, never dispose or reparent it. |
color | | Changes the colour. |
position | | Moves vertices in the plane's local 1x1 space. |
segments | | Requests plane subdivisions. The largest request wins, default 1. |
uv | | Bends box UV (0..1, y up) before sampling. |
zoom | | Frames the media: scales it by |
Also exported from @dioramajs/effects.
Defined in packages/effects/src/types.ts.