Skip to main content

Script Capability Matrix

Use this page when you need exact boundaries such as:

  • "Can this script type access PathData?"
  • "Which script gets PointerEvent?"
  • "Can this script draw to the renderer?"
  • "Where do script inputs actually come from?"
Runtime baseline

Matrix details are aligned to the June 4, 2026 compatibility baseline: public npm runtime line 2.37.8 plus source-level API snapshot runtime-v0.1.106. GPU callback guidance remains Rive Early Access editor workflow material. For versioned API-surface tracking, see Runtime Compatibility Baseline.


1) Callback Parameter Matrix (What Each Script Receives)

This is the quickest way to see all runtime callback parameters by script type.

Script TypeRequired CallbacksCallback Parameters You Get
Nodeinit, drawcontext: Context (init), renderer: Renderer (draw), no-argument canvas phase (drawCanvas), seconds: number (advance), event: PointerEvent (pointerDown/Move/Up/Exit), keyboard/text invocations (keyboardEvent, textEvent)
Layoutinit, resizecontext: Context (init), size: Vector (resize), renderer: Renderer (draw), no-argument canvas phase (drawCanvas), seconds: number (advance)
Converterconvert, reverseConvertinput: DataInputs (convert), input: DataOutput (reverseConvert), optional context: Context (init), optional seconds: number (advance)
Path EffectupdateinPath: PathData + node: NodeReadData (update), seconds: number (advance), optional context: Context (init)
ListenerActionperformActionlistenerContext: ListenerContext (performAction), optional context: Context (init)
TransitionConditionevaluateno parameters (evaluate), optional context: Context (init)
Utilnoneno lifecycle callback params (module table only)
Testsetup(test: Tester)test: Tester, and expect inside each test.case(...)

2) Capability / Limitation Matrix

Legend: supported, ⚠️ conditional/indirect, not supported.

2A) Core Runtime Scripts

CapabilityNodeLayoutConverterPath Effect
Place or bind to scene target
Read editor Input<T> fields⚠️ 1
Access Context in init
Custom render with Renderer
Offscreen Canvas / GPUCanvas render phase⚠️ 5⚠️ 5
Receive PointerEvent directly
Transform host PathData geometry
Has per-frame callback⚠️ 4
Importable via require()
Primary unit-test target⚠️⚠️⚠️⚠️

2B) State + Utility Scripts

CapabilityListenerActionTransitionConditionUtilTest
Place or bind to scene target
Read editor Input<T> fields⚠️ 2✅ 3
Access Context in init
Custom render with Renderer
Receive PointerEvent directly⚠️ 2
Transform host PathData geometry
Has per-frame callback
Importable via require()
Primary unit-test target⚠️⚠️

Notes:

  1. Converter scripts consume binding values through convert(input) / reverseConvert(input) callback parameters.
  2. ListenerAction scripts are event-driven (performAction(listenerContext)). Pointer data is accessed through listener context when the listener event carries it.
  3. TransitionCondition scripts often use threshold-style inputs plus ViewModel/context state to decide evaluate().
  4. Converter scripts can optionally define advance(self, seconds) for time-based conversion logic, but many converters are purely data-driven.
  5. Node and Layout scripts can use drawCanvas(self) for offscreen Canvas and early-access GPUCanvas render passes, then composite the resulting image from draw(self, renderer).

2C) Script-by-Script Boundaries

Script TypeStrong AtCannot Do
NodeRendering, interaction, per-frame animation, input-driven visualsCannot receive host PathData from existing stroke/fill
LayoutChild sizing/positioning and optional custom drawNot a data-binding transformer protocol
ConverterData transformation between binding endpointsNo rendering, no pointer handlers, no host path geometry
Path EffectDirect path-geometry transformation of attached stroke/fillNo Renderer drawing callback for arbitrary scene rendering
ListenerActionState-machine listener reactions with typed ListenerContext branching (is... / as...)No per-frame lifecycle, no rendering
TransitionConditionCustom boolean gating for state transitionsNo rendering, no pointer event callback parameter
UtilShared reusable code via require()No lifecycle callbacks, cannot attach directly
TestUnit-test harness for util logicNot an attached runtime behavior script

Important Boundaries

  1. Only Path Effect scripts receive PathData of an existing host shape.
  2. Node scripts can draw custom Path objects, but do not receive inPath: PathData from an existing stroke/fill.
  3. Nesting a Node script under a shape or group affects hierarchy behavior, not callback shape. It changes local transform, inherited opacity, and draw order, but it does not pass an implicit host NodeData or parent PathData into Node callbacks.
  4. Listener<T> is not a script type; it is a function signature used by addListener()/removeListener() APIs.
  5. Util/Test scripts are non-attached scripts: Util is imported code; Test is manual test execution.
  6. ListenerContext payload detail is not uniform across kinds at this baseline (ReportedEvent and ViewModelChange are currently limited payloads).

2D) Runtime-Backed Advanced Protocol

ProtocolCallback SurfaceCurrent Guidance
ScriptedInterpolatortransform(factor), transformValue(from, to, factor)Runtime-backed in current baseline; use for custom interpolation/easing logic, with linear fallback when omitted or failing

3) "What Should I Use?" Quick Mapping

NeedUse
Draw custom graphics every frameNode (draw, optional advance)
Render GPU shader effects or post-processingNode or Layout with drawCanvas + GPUCanvas, preview / rollout-dependent
Position/size children in a layoutLayout (resize, optional measure)
Transform binding valuesConverter (convert, reverseConvert)
Distort or rebuild existing shape path geometryPath Effect (update(inPath, node))
Run logic on state machine listener eventsListenerAction (performAction)
Gate transitions with custom boolean logicTransitionCondition (evaluate)
Customize keyframe interpolation/easing in scriptScriptedInterpolator (transform, transformValue)
Share reusable helpers/typesUtil
Validate utility logicTest

Source Pages