Your own effects

Make an effect

POST/api/custom-effects
Guest area “effects”. Open unless a PIN lock is set and guests aren't allowed this area (settings.guest.effects); then it needs an unlock token.

Makes an effect from a pattern, an axis, what drives it and its colours. Answers it with its id (u-…). At most 100.

Request body application/json

namestring
Up to 40 characters
patternstringrequired
One of "wave" "chase" "pulse" "sparkle" "fill" "breathe" "gradient"
axisstring
One of "along" "x" "y" "around" "centre"
Default "along"
drivestring

What moves it.

One of "beat" "kick" "bass" "loud" "time"
Default "beat"
tagstring
One of "calm" "build" "drop" "home"
Default "drop"
colors"palette" | string[]

palette, or two colours.

speednumber
Default 10.1 to 8
widthnumber
Default 0.150.01 to 1
cyclesnumber
Default 10.25 to 8
bgnumber

Background glow.

Default 0.050 to 0.5

Responses

200OKapplication/json
idstringrequired

u-…

namestring
Up to 40 characters
patternstringrequired
One of "wave" "chase" "pulse" "sparkle" "fill" "breathe" "gradient"
axisstring
One of "along" "x" "y" "around" "centre"
Default "along"
drivestring

What moves it.

One of "beat" "kick" "bass" "loud" "time"
Default "beat"
tagstring
One of "calm" "build" "drop" "home"
Default "drop"
colors"palette" | string[]

palette, or two colours.

speednumber
Default 10.1 to 8
widthnumber
Default 0.150.01 to 1
cyclesnumber
Default 10.25 to 8
bgnumber

Background glow.

Default 0.050 to 0.5
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequired

What went wrong, in a sentence for people.

403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X POST 'http://localhost:8080/api/custom-effects' \
  -H 'content-type: application/json' \
  -d '{
  "name": "Pink chase",
  "pattern": "chase",
  "axis": "along",
  "drive": "kick",
  "tag": "drop",
  "colors": [
    "#ff0066",
    "#00ccff"
  ],
  "speed": 2,
  "width": 0.1
}'
Response
{
  "id": "u-k3j9q2",
  "name": "Pink chase",
  "tag": "drop",
  "pattern": "chase",
  "axis": "along",
  "drive": "kick",
  "colors": [
    "#ff0066",
    "#00ccff"
  ],
  "speed": 2,
  "width": 0.1,
  "bg": 0.05,
  "cycles": 1
}
Edit on GitHub