Advanced / Scene · guide
Scene layers — customLines & surface
Current Apexify.js 6.0.0 documentation for Scene layers — customLines & surface.
customLines
Same CustomOptions model as painter.path2d.custom (see createCustom API): startCoordinates, endCoordinates, lineStyle, arrows, dash patterns, splines, etc.
lines: a single CustomOptions or CustomOptions[].
Validation: validateSceneCustomLinesOptions — every entry needs numeric startCoordinates / endCoordinates.
Variant: single connector
Variant: polyline-style chain (singleLine)
(When singleLine is set, later segments reuse previousEndCoordinates as in the custom-lines guides.)
Variant: dashed separator + arrow head
Use the same fields as CustomOptions in Arrows & markers.
surface — nested mini-canvas
A child scene: placement (geometry + transforms on the parent), optional background, layers (full SceneLayer[] including more **surface**s).
SceneSurfacePlacement
| Field | Default | Role |
|---|---|---|
x, y | — | Top-left on parent |
width, height | — | Child canvas size |
opacity | 1 | |
rotation | 0 | Degrees |
scaleX, scaleY | 1 | |
globalCompositeOperation | — | e.g. "multiply" |
Variant: simple card (solid bg + text)
Variant: rotated badge
Variant: picture-in-picture (surface over full-bleed image)
Variant: nested surface (surface inside surface)
Note: Rounded child rects use background.borderRadius on the surface’s CanvasConfig, not fields on SceneSurfacePlacement (placement only has x, y, width, height, opacity, rotation, scale, blend mode).