updateEffectProps()v4.0.528
Updates explicit properties in an inline effect configuration.
Draft API: This API is experimental and may change.
update-effect-props.tsimport {updateEffectProps , typeCodemodProject , typeEffectReference } from '@remotion/codemods'; declare constproject :CodemodProject ; declare consteffect :EffectReference ; constresult = awaitupdateEffectProps ({project ,effect ,props : {radius : 12}, });console .log (result );
Other effect properties are preserved. Use updateEffectKeyframes() to edit an animation. The effects array and configuration must be inline.
Options
project
An in-memory CodemodProject. The input project is not mutated.
effect
An EffectReference: filePath, nodePath, and a zero-based effectIndex in the node's inline effects array.
props
A non-empty record of serializable values. Keys must be JavaScript identifiers. Computed values are rejected; recognized keyframed values are replaced with static values.
schema?
A Remotion InteractivitySchema for schema-specific defaults and enum variants. By default, no schema-specific behavior is applied.
Return value
A promise resolving to an object with the following properties.
project
The updated project. Unchanged files and extra project fields are preserved.
changes
An array of {filePath, previousContents, nextContents} file changes. A null content value indicates a created or deleted file.
nodePathRemappings
An array of {filePath, oldNodePath, newNodePath} mappings. A null old path indicates an insertion; a null new path indicates removal. Apply these mappings to references from the input project. See node references.
updatedEffect
The effect reference in the updated project.
Errors
Throws or rejects when the target cannot be resolved, the requested edit is unsupported, or an option is invalid. Failed edits leave the input project unchanged.
Compatibility
| Browsers | Servers | Environments | |||||||
|---|---|---|---|---|---|---|---|---|---|
Chrome | Firefox | Safari | Node.js | Bun | Serverless Functions | ||||