Skip to main content

Code

Run custom JavaScript code to transform your data. Available variables: data (all input data), d (first element), op() (access other operators), sequenceTime (timeline position), frame (current frame), totalFrames, sequence (timeline metadata). Includes d3, turf, and other utilities. Use this to store state between executions.

Syntax​

{ "id": "n1", "op": "CodeOp", "name": "code-host", "x": 0, "y": 0, "params": {} }

One out of it starts at "sourcePort": "data".

Inputs​

This operator has no input ports.

Parameters​

ParameterKindDefaultChoices
datafield[]
codefield[""]

Outputs​

PortType
dataany

Details​

  • Category: Host operators
  • Operator: CodeOp
  • Runs: on the page, not in the engine: it cannot be compiled to SQL or an expression