What the renderer draws
Which entity fields reach the screen, how overlaps resolve, and what is not supported yet
Every entity field is part of the frame data, but not every field has a
visual effect. This page lists what @effect-motion/renderer draws today,
in the browser (studio, Player) and in Node (motion frames,
motion render). Both renderers draw the same things.
Fields that render
Every paintable entity renders position, rotation, scale, opacity
and visible. Rotation and scale act about position, and all of them
compose down the tree: moving, fading, scaling or rotating a Group
carries its whole subtree.
| Entity | Its own fields |
|---|---|
Circle | radius, fillColor, strokeColor, strokeWidth |
Ellipse | radiusX, radiusY, fillColor, strokeColor, strokeWidth |
Rect | width, height, fillColor, strokeColor, strokeWidth |
Line | start, end, strokeColor, strokeWidth |
Path | commands (M/L/H/V/C/S/Q/T/A/Z and lowercase forms), fillColor, strokeColor, strokeWidth |
Text | text, fontSize, fontFamily, fillColor, textAnchor, baseline |
Image | image, width, height (both, or neither for natural size) |
Group | children (paints nothing itself) |
Hud | children, drawn in screen space on top of everything |
Camera | position, rotation, poi, focalLength |
A few details:
-
Stroke controls.
Line,Path,Rect,Circle, andEllipsealso rendertrimStart,trimEnd,trimOffset,strokeDasharray, andstrokeDashoffset. These affect strokes and leave fills intact. See Curves, trim paths, and dashes. -
Facing. A planar shape (
Circle,Ellipse,Rect,Text,Image) with rotation 0 faces the camera. Any other rotation, its own or an ancestor's, makes it a real plane in 3D.LineandPathare always drawn in 3D space as authored. -
Outlines are opt-in:
Rect,Circle,EllipseandPathdraw none until you setstrokeColor(strokeWidthdefaults to 1). ALineis its stroke, so it defaults to black at width 1. -
Strokes scale with the shape: the drawn width is
strokeWidthtimes the narrower of|scale.x|and|scale.y|(ancestors included), so a shape scaled to zero on either axis draws nothing. -
Group opacity multiplies into each child. Children that overlap each other show through one another while the group fades. To fade a section as one flat layer, build it as its own scene and mount it with
Scene.play, then fade the mount. -
Depth of field follows the camera's
apertureandfocusDistance(see Camera depth of field). Blur comes from the depth buffer, so it is correct for opaque content; a translucent shape blurs at its own depth.Hudcontent stays sharp. A scene mounted withScene.playrenders sharp inside, whatever its own camera'saperture, and its plane blurs as one layer by the parent camera's lens. -
Alpha masks use the rendered alpha of an existing shape, text, image, or group to reveal or hide another entity or group. See Alpha masks for modes, animation, and boundaries.
Overlaps
Occlusion follows depth, not the order you created things in:
- Content nearer the camera (larger
zunder the default camera) hides content behind it, whatever the tree order. - Content at the same depth paints in tree order, later over earlier,
like layers in a compositing tool. Text on a card at the same
zis drawn on top as long as the text is created after the card. - Translucent content (
opacitybelow 1) does not hide what is drawn after it: a fading card tints the text behind it instead of cutting holes.
Images
In the browser an Image decodes anything the browser's
createImageBitmap supports. In Node (motion frames, motion render)
only PNG and JPEG decode; any other format fails loudly with the
image's id. Use PNG or JPEG for assets that must render in both. SVG is not
an image format here — trace it into Paths instead.
Paths
Path supports typed SVG-style commands for lines, quadratic/cubic curves,
smooth continuations, and elliptical arcs, including relative forms. Curves
are flattened deterministically with their authored endpoints preserved.
Each closed subpath fills on its own, so there are no holes: a ring or the
counter of a letter needs separate shapes layered on top.
Not available yet
Plan around these; none of them render today:
- luminance masks, dedicated mask feather controls, and Boolean mask operations;
- per-letter text (a
Textis one block; use oneTextper word or line); - motion blur, and blur of any kind other than depth of field;
- lit or shaded 3D meshes;
- compound holes and configurable fill rules in
Path; - configurable stroke caps and joins (the existing styles are round).