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 use the accepted direct Web boundary 2.42.0 -> C++ runtime-v0.1.344; current editor-only and later-source findings are labelled separately. GPU callback guidance remains rollout-dependent. Web 2.42.0 adds a separate experimental, default-off enableGPUCanvas import option at the JavaScript host layer; it is not a Luau callback or LSP declaration. For versioned API tracking, see Runtime Compatibility Baseline.

Three separate truths

Runtime source registration, public documentation, and editor/release availability are separate claims. FileFormat and TextFileFormat are current editor Luau protocols, but serialized host fields, implemented-method bits, scriptProtocolValue, dependency verification, module IDs, and RASC workspace messages are not callable APIs. Native host methods such as StateMachineInstance:keyInput and module trace labels are also not Luau contracts. Context.log is a current editor property, while the exact target's C++ Luau Context has no matching dispatch.

An authored utility module is a ScriptAsset marked as a module and is loaded with its authored require("Name"). A ScriptModuleAsset is a distinct self-contained compiled WASM host payload. Its language value, handle, and serialized identity never become a Luau global, type, or alternate require name.


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; draw only when renderingcontext: Context (init), renderer: Renderer (draw), Canvas/GPUCanvas work merged into draw, seconds: number (advance), event: PointerEvent (pointerDown/Move/Up/Exit), current Editor-reference gamepad payloads (gamepadConnected/Event/Disconnected); source/runtime-only keyboard/text callbacks are tracked separately
Layoutinit; resize is optionalcontext: Context (init), size: Vector and displayScale: number (resize; old two-parameter callbacks remain compatible), renderer: Renderer (draw), Canvas/GPUCanvas work merged into 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)
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(...)

Editor document extensions

ProtocolFactoryCallback inputsRuntime/export handoff
FileFormatreturn function(): FileFormatFormatDocument; optional EditorContext, FormatSurface, cached bufferBinary Blob
TextFileFormatreturn function(): TextFileFormatSame view inputs plus pure highlight, diagnostic, completion, hover, and format callbacksPlain Blob via context:blob(name)

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 work inside draw⚠️ 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 merge offscreen Canvas/Early Access GPUCanvas render passes into draw(self, renderer) and composite the resulting image there. The retired drawCanvas name must not be added to new scripts.

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. In the August 14 current Editor reference, ReportedEvent, ViewModelChange, and NoneEvent expose no public fields, while gamepad payloads use three distinct connected/event/disconnected types with full state on the first two. Historical *Invocation wrapper names belong to pinned runtime source, not current Editor-authored examples.

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 merged draw + GPUCanvas, Early Access / 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