EFFECT_PARAM
A param value or param attribute was rejected, so the effect keeps the value from the layer below it.
On this page
EFFECT_PARAM: "{effect}" rejects {key} = {value}A param value comes from a cascade: the default, then app.attach() params, then data-dio-* attributes, then runtime writes. A rejected value never stops the effect, and each warning prints once per element and key.
Why it happens
- An attribute does not parse as the param type, such as
data-dio-strength="strong"for a number. The key in the message is thendata-dio strength. - A runtime write through
paramsorset(), or a param passed toapp.attach(), has the wrong type:NaN, a string that is not a number, or a tuple of the wrong length. Once the definition has loaded, a param the effect does not declare is rejected the same way. - A short attribute matches two effects on one element, such as
data-dio-strengthwithdata-dio="ripple bend". It applies to neither, and the message readsdata-dio-strength matches ripple and bend; use data-dio-ripple-strength. - A token repeats in
data-dio:"{effect}" is repeated in data-dio. - In development, a param listed in
rebuildchanges more than 3 times a second. Each change runssetupagain, so the message readsdo not tween rebuild params. - A source passed to
app.effects.pin()throws. The layer falls back to its built-in pin value.
How to fix
Write a value of the param type, and address the param to its effect when two effects share a param name:
<img src="/img/cover.avif" data-dio="ripple bend" data-dio-strength="strong"/><img src="/img/cover.avif" data-dio="ripple bend" data-dio-ripple-strength="0.6" data-dio-bend-strength="1.2"/>Tween params that update in place, not params listed in rebuild. For a pin source, return a finite number from 0 to 1, and call the function that app.effects.pin() returns before you kill the ScrollTrigger behind it.