Skip to main content

Logic

Custom JavaScript effects that run inside the file.

Updated November 2026

Effect scripts let you write JavaScript that draws a layer every frame. You export a params object, which becomes sliders and colour pickers in the inspector, and a render(ctx, env) function that draws with the canvas API. The script can read time, size, the pointer and state machine inputs, and set inputs back.

Free Community plan · Browser, macOS and Windows

Language
JavaScript
Draws with
Canvas 2D (and GLSL)
Params
Become inspector controls
Reads
Time, pointer, inputs

How it works, step by step

  1. 1Add a custom effect

    Select a layer and open Custom Effect. You start from working starter code.

  2. 2Declare params

    export const params = { speed: 1, color: "#3b82f6" }. Each one shows up as a control in the inspector.

  3. 3Write render(ctx, env)

    Draw with the canvas API. env gives you width, height, time, params, the pointer and hover and press state.

  4. 4Talk to the state machine

    Read inputs with env.input, set them with env.setInput, and send events with env.emit.

Every control

ControlWhat it does
paramsNumbers and colours that become inspector controls.
render(ctx, env)Called every frame to draw the layer.
env.timeSeconds since start, for motion.
env.width / env.heightThe layer’s size.
PointerMouse position (also local to the layer), hover and pressed.
env.input / env.setInputRead and write state machine inputs.
env.shaderRun a GLSL fragment shader over the layer.

What you can make with it

Generative backgrounds

Noise, waves and particle fields.

Mini games

Game loops that read the pointer and update a score input.

Data art

Visuals driven by an input or API value.

Text effects

Per-letter motion and gradients.

Use it from your code

Effect script
export const params = { speed: 1, color: "#3b82f6", size: 24 };

export function render(ctx, env) {
  const { width, height, time, params } = env;
  const x = Math.sin(time * params.speed * 2) * width * 0.25;
  const y = Math.cos(time * params.speed * 2) * height * 0.2;

  ctx.fillStyle = params.color;
  ctx.beginPath();
  ctx.arc(x, y, params.size, 0, Math.PI * 2);
  ctx.fill();
}

Three good tools for this

We make ExodeUI, so weigh our pick with that in mind.

  1. 1

    p5.js

    Best forCreative coding sketches

    Pick it whenYou want a creative coding library for sketches and art on a web page.

  2. 2

    After Effects expressions

    Best forScripted motion in video

    Pick it whenYour output is video and you want JavaScript expressions on layer properties.

  3. 3

    ExodeUI

    Best forScripted effects inside interactive UI

    Pick it whenYou want scripted visuals that sit inside a designed, interactive file and talk to its state machine.

When another tool is the better fit

Effect scripts run on the web runtimes, Flutter and SwiftUI, but not on React Native. For React Native, use timeline, spring and state machine animation instead.

Questions

What language are effect scripts written in?

JavaScript. You export params and a render(ctx, env) function that draws with the canvas 2D API.

How do params become controls?

Each value in the exported params object shows up in the inspector as a number field, slider or colour picker.

Can a script change state machine inputs?

Yes. Use env.setInput to set a value and env.input to read one. env.emit sends an event.

Which runtimes run effect scripts?

The web runtimes, Flutter and SwiftUI. React Native does not run them.

More in the editor

All features →

Open the editor and try it

Free to start. Your work saves to one open .exode file that you own.

ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →