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?"

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), seconds: number (advance), event: PointerEvent (pointerDown/Move/Up/Exit)
Layoutinit, resizecontext: Context (init), size: Vector (resize), renderer: Renderer (draw), 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)
ListenerActionperformpointerEvent: PointerEvent (perform), 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
Attach to scene/binding target
Read editor Input<T> fields⚠️ 1
Access Context in init
Custom render with Renderer
Receive PointerEvent directly
Transform host PathData geometry
Has per-frame callback⚠️ 4
Importable via require()
Primary unit-test target⚠️⚠️⚠️⚠️

2B) State + Utility Scripts

CapabilityListenerActionTransitionConditionUtilTest
Attach to scene/binding target
Read editor Input<T> fields⚠️ 2✅ 3
Access Context in init
Custom render with Renderer
Receive PointerEvent directly
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 (perform(pointerEvent)); they are not typically used as editor-input-driven render logic.
  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.

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 event reactions with pointer contextNo 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. Listener<T> is not a script type; it is a function signature used by addListener()/removeListener() APIs.
  4. Util/Test scripts are non-attached scripts: Util is imported code; Test is manual test execution.

3) "What Should I Use?" Quick Mapping

NeedUse
Draw custom graphics every frameNode (draw, optional advance)
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 (perform)
Gate transitions with custom boolean logicTransitionCondition (evaluate)
Share reusable helpers/typesUtil
Validate utility logicTest

Source Pages