Introducing a new way to review your PRs.

Read the announcement

walterlow / freecut

FreeCut is a professional-grade video editor that runs entirely in your browser. Professional video editing, zero installation. Create stunning videos with multi-track editing, keyframe animations, real-time preview, and high-quality exports.

View on GitHub

19 documents · Updated Oct 30, 2026

docs / effects-and-animation

Effects and animation

Effects and animation give a composition time-based visual change. Effects alter the rendered look of an item or the items below an adjustment layer. Keyframes describe values at chosen frames so the system can resolve an animated property during preview and export.

Visual effects

The visual effect system applies GPU-based effects to timeline items. An effect has a stable identity, an enabled state, and a set of parameters. The effect registry groups available effects into color, blur, distortion, stylize, and keying categories. src/…/effects.ts src/…/types.ts src/…/registry.ts

Effect controls

The Effects section is the control surface for adding, removing, enabling, reordering, and resetting effects. It shows controls for the selected visual items and can apply the same change across a multi-item selection. The surface can appear in the editor sidebar or in a docked grading area, while some grading controls can link to the Color workspace. src/…/effects-section.tsx src/…/effects-section.tsx

The effect picker groups effects by category and supports search. Built-in effect presets and saved user presets apply a group of effects as one action, so each resulting effect remains part of the normal stack and can be edited or disabled. Numeric and color controls can expose a keyframe toggle when the parameter supports animation. src/…/effects-section.tsx src/…/gpu-effect-panel.tsx

References: src/…/effects-section.tsx• L53-120 src/…/effects-section.tsx• L577-765 src/…/gpu-effect-panel.tsx• L101-115

Effect parameters

Each effect definition describes its visible parameters and their defaults. A parameter can also define a number range, step, unit-like label, visibility rule, and whether it is animatable. This lets the editor use the same parameter contract for control display and animation eligibility. src/…/types.ts

Only numeric and color parameters marked as animatable become keyframe properties. Boolean, choice, point, text, and structured parameters remain direct controls unless a dedicated effect surface gives them another editing model. Some numeric parameters are intentionally excluded when they control render quality or sampling rather than the visual value. src/…/effect-keyframes.ts src/…/effect-animatable-properties.ts

References: src/…/types.ts• L1-13 src/…/effect-keyframes.ts• L11-46 src/…/effect-animatable-properties.ts• L72-127

Effect scope

An item can carry its own effects. An adjustment layer carries effects that affect items on the tracks below it while the layer is active. The render path combines active adjustment-layer effects before the item’s own effects, which makes track order part of the visual result. src/…/timeline.ts src/…/canvas-effects.ts

The effect stack is sent to the GPU render path only for enabled effects. A failed GPU effect path is non-fatal to the frame, so the source content can still continue through the render flow. src/…/canvas-effects.ts

References: src/…/timeline.ts• L156-166 src/…/canvas-effects.ts• L156-215 src/…/canvas-effects.ts• L222-259

Keyframe authoring

Keyframes are frame-relative value points for one timeline item. An item’s animation state groups scalar property lanes and may also group coupled two-dimensional lanes for position, scale, or anchor. The same model can represent item transforms, crop, audio volume, text and shape values, path vertices, and eligible effect parameters. src/…/keyframe.ts src/…/keyframe.ts src/…/animatable-properties.ts

Keyframe controls

The keyframe toggle adds a property value at the current item-relative frame or removes the keyframe already at that frame. When the property already has a lane, editing another frame extends that lane. The explicit auto-keyframe setting is needed when an edit starts a new lane. src/…/keyframe-toggle.tsx src/…/auto-keyframe.ts

Property edits use the current frame to choose between changing the base value and changing an animated value. When auto-keyframing handles the edit, the change is grouped as one operation so a multi-item or multi-parameter edit stays coherent in undo history. src/…/effects-section.tsx src/…/keyframe-actions.ts

References: src/…/keyframe-toggle.tsx• L27-131 src/…/auto-keyframe.ts• L67-108 src/…/effects-section.tsx• L182-247

Motion preset authoring

Motion presets provide ready-made entrance, exit, and emphasis changes for a clip. Each preset is described by the properties it can write, which lets the Animate workspace group presets by category and clear the matching property lanes when a new preset replaces animation in its frame window. src/…/animation-preset-catalogue.ts

Presets resolve their changes from the clip’s resting transform and duration. Entrance changes settle into that resting state, exit changes leave it, and emphasis changes return to it. The authored result is ordinary keyframe data, so it uses the same timing, editing, preview, and export path as manually created animation. Preset generation stays within the clip bounds and produces no points for a one-frame clip. src/…/motion-presets.ts src/…/motion-presets.ts src/…/motion-presets.test.ts

References: src/…/animation-preset-catalogue.ts• L10-37 src/…/motion-presets.ts• L31-114 src/…/motion-presets.test.ts• L33-87

Keyframe graph

The value graph gives an overview of value change over time. Engineers can use it to select and move keyframes, scrub the playhead, change the visible property range, and edit easing handles. The dopesheet view complements it by focusing on keyframe timing and selection across properties. src/…/index.tsx src/…/keyframe-timing-strip.tsx

The Dopesheet editor can show the sheet, graph, or both at once. It also supports a lane presentation for embedded timeline editing, along with property filters and locked rows that keep large animation sets focused while preserving shared frame and selection behavior. src/…/index.tsx src/…/index.tsx src/…/index.tsx

The graph can show more than one property as an overlay. A property can be selected for editing while other curves provide visual context. Procedural motion can also appear as a preview curve without turning that motion into stored keyframe points. src/…/index.tsx src/…/index.tsx

References: src/…/index.tsx• L56-126 src/…/keyframe-timing-strip.tsx• L15-33 src/…/index.tsx• L219-227 src/…/index.tsx• L322-368

Vector animation

Position, scale, and anchor can use coupled vector lanes. A vector keyframe stores both dimensions at one frame, which keeps their timing aligned and supports shared temporal easing. Position can also use spatial Bezier tangents to describe a curved path. src/…/keyframe.ts src/…/keyframe.ts src/…/vector-interpolation.ts

The model can preserve intentionally separated scalar dimensions when independent control is needed. Promotion between scalar lanes and vector lanes is an explicit operation, so existing animation is not silently changed by a view choice. src/…/keyframe.ts src/…/keyframe-actions.ts

References: src/…/keyframe.ts• L61-72 src/…/keyframe.ts• L342-356 src/…/vector-interpolation.ts• L135-177

Property ranges and interpolation

Property ranges define the useful graph and control domain for each animatable value. Built-in properties use domains based on their meaning, while path vertex and effect parameter ranges come from the relevant property definition. The range also supplies display precision and a unit label where one is known. src/…/property-value-ranges.ts src/…/property-value-ranges.ts src/…/property-value-ranges.ts

Built-in property domains

The built-in domains cover spatial values in pixels, rotation in degrees, opacity from zero to one, audio volume in decibels, text values, crop values, and shape path controls. These domains guide the editor’s view and numeric presentation. They do not prevent a composition from producing a value outside the preferred graph view when another system supplies it. src/…/property-value-ranges.ts

References: src/…/property-value-ranges.ts• L19-63 src/…/keyframe.ts• L459-493

Effect property domains

Effect parameter ranges are read from the registered effect definition. Numeric parameters use their declared minimum, maximum, and step. Color parameters use a packed color value for storage and a color-aware display path. Non-numeric parameters do not receive a generic numeric range. src/…/property-value-ranges.ts src/…/color-keyframes.ts

References: src/…/property-value-ranges.ts• L97-156 src/…/color-keyframes.ts• L143-174

Easing and color change

Each scalar keyframe supplies the easing used to reach the next keyframe. The model supports linear, ease-in, ease-out, ease-in-out, hold, cubic Bezier, and spring timing. Before the first point and after the last point, the resolved value holds at the nearest keyframe. src/…/keyframe.ts src/…/interpolation.ts

Color keyframes keep the same time model as numeric keyframes but interpolate colors in a perceptual color space before converting the result back to a display color. This avoids treating a color string as an ordinary number during an animated color change. src/…/color-keyframes.ts

References: src/…/keyframe.ts• L238-316 src/…/interpolation.ts• L18-75 src/…/color-keyframes.ts• L176-198

Animated visual changes

At a frame, the system resolves the item’s base visual state and then applies the stored animation that belongs to that item. Effect parameters use the same frame-relative lookup, so a GPU effect can respond to the playhead without changing its authored base settings. src/…/animated-transform-resolver.ts src/…/effect-keyframes.ts

The main frame relationship is shown below.

flowchart LR
    A[Timeline item and base values] --> B[Item-relative frame]
    B --> C[Scalar or vector keyframes]
    B --> D[Animated effect parameters]
    B --> E[Procedural motion]
    C --> F[Resolved transform, crop, text, shape, or volume]
    D --> G[Resolved effect stack]
    E --> F
    F --> H[Preview or export frame]
    G --> H

Effect animation

An effect parameter key identifies the effect type, effect instance, and parameter name. At render time, the resolver finds the matching effect instance and evaluates its keyframes against the item-relative frame. If no keyframes exist, the parameter keeps its base value. src/…/keyframe.ts src/…/effect-animatable-properties.ts

Color effect parameters follow the same lookup but use color conversion for the stored value and the resolved string. An enabled audio-pulse driver can take precedence for selected trigger-wave parameters, which keeps sparse audio events procedural instead of creating a large keyframe set. src/…/effect-animatable-properties.ts src/…/effect-animatable-properties.ts src/…/effects.ts

References: src/…/keyframe.ts• L505-532 src/…/effect-animatable-properties.ts• L247-307 src/…/effect-animatable-properties.ts• L310-412

Procedural motion

Procedural motion is continuous motion described by a small set of parameters rather than by many stored points. The supported modifiers include drift, breathing, shake, sway, and spin. The evaluator converts the current frame to seconds through the project frame rate, so the motion keeps the same timing across frame rates. src/…/motion.ts src/…/motion-modifier-eval.ts

The modifier contribution is layered onto the keyframe-resolved transform. Position and rotation use additive changes. Width and height use scale factors. Opacity is kept within its visible range. An enabled flag and per-channel gains let the same modifier remain present while contributing to only selected channels. src/…/motion-modifier-eval.ts src/…/motion-modifier-eval.ts

Named motion layers provide a separate, removable animation source for preset-style changes. They apply after base keyframes and before continuous modifiers, so removing a generated layer can preserve the underlying authored animation. src/…/motion.ts src/…/timeline.ts

References: src/…/motion.ts• L1-57 src/…/motion-modifier-eval.ts• L237-280 src/…/motion.ts• L59-93

Preview and export resolution

Preview and export use the same item-relative animation meaning. The canvas path resolves the animated transform and crop for the requested global frame, then applies visual clip fades and canvas scaling before drawing the item. src/…/canvas-keyframes.ts

Effect resolution then combines active adjustment-layer effects with the item’s enabled effects and sends the resulting stack through the GPU path. This keeps a keyframed effect parameter in step with the rendered frame instead of only changing the inspector display. src/…/canvas-effects.ts src/…/canvas-effects.ts

References: src/…/canvas-keyframes.ts• L144-201 src/…/canvas-effects.ts• L167-215 src/…/canvas-effects.ts• L222-259

Editing boundaries

Transitions block keyframe placement in their protected frame regions. Add and move operations check this boundary, while the keyframe control reports whether the current playhead is outside the item or inside a blocked transition region. src/…/keyframe-actions.ts src/…/keyframe-toggle.tsx

Trimming an item does not immediately delete keyframes beyond its new out point. Those points remain available if the item is extended. An explicit trim cleanup instead writes the evaluated value at the last visible frame and removes parked points. src/…/trimmed-keyframes.ts src/…/keyframe-actions.ts

References: src/…/keyframe-actions.ts• L36-57 src/…/keyframe-toggle.tsx• L184-203 src/…/trimmed-keyframes.ts• L123-160

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep effect parameter metadata, generic controls, keyframe eligibility, and property ranges aligned. A new animatable parameter can otherwise display correctly but fail to author or resolve animation.
  • Preserve the effect instance ID when reordering or editing an effect. Effect keyframe property identities use that ID to find the target instance.
  • Keep scalar and vector transform conversion rules aligned with preview and export. A mismatch can change the path or timing when a lane changes form.
  • Update both adjustment-layer and item-effect resolution when effect order or scope changes. Their order affects the final composite.
  • Keep motion preset categories, declared property lists, replacement clearing, and preset builders aligned. A mismatch can leave old animation in place or apply a preset to an unsupported property.
  • Keep dopesheet sheet, graph, split, and lane presentations on the same frame, selection, lock, and transition-boundary rules.
  • Keep procedural motion evaluation and any preview or bake path on the same frame-rate and channel rules.
  • Treat transition regions as a shared write boundary for keyframe add, move, preset apply, and auto-keyframe flows.

Important failure modes

TriggerConsequenceGuard
An effect keyframe points to an effect instance that was removed or changedThe parameter keeps its base value instead of showing the authored animationBuild effect property identities from the current effect instance and preserve IDs during list edits
A motion preset declares one property set but writes anotherReplacement clearing can leave stale animation or compatibility checks can hide a valid presetKeep each preset’s declared properties aligned with its generated keyframes
A keyframe is added or moved into a transition regionThe operation is rejected or a preset apply becomes a no-opCheck the transition boundary before writing scalar or vector keyframes
A color value is treated as a plain numeric valueThe effect can show an invalid color or an incorrect transitionConvert color strings to the supported packed value and use color interpolation
A procedural modifier is applied more than once during frame resolutionPosition, scale, rotation, or opacity can drift from the authored resultApply modifiers once after keyframe resolution and keep their contribution model consistent
An animation is trimmed with destructive cleanup when the clip may be extendedRestoring the clip no longer restores the removed future animationUse ordinary trim behavior unless the user explicitly requests animation cleanup
An adjustment layer is resolved with the wrong track orderEffects appear on the wrong items or in the wrong stack orderRequire the adjustment to be active and visually above the target before combining effects

Key files

FileWhy to read it
src/…/effects.tsDefines effect instances, presets, and audio-reactive effect data.
src/…/types.tsDefines effect parameter metadata and the effect categories used by controls and ranges.
src/…/effects-section.tsxShows the editor and dock effect surfaces, preset application, selection mapping, and animation-aware parameter edits.
src/…/gpu-effect-panel.tsxShows the user-facing effect parameter controls and keyframe affordances.
src/…/keyframe.tsDefines scalar, vector, effect, and path animation identities and stored item animation state.
src/…/property-value-ranges.tsDefines the graph and display range for built-in, path, and effect properties.
src/…/interpolation.tsDefines the basic frame-to-value behavior for scalar keyframes.
src/…/vector-interpolation.tsDefines coupled vector timing and spatial path behavior.
src/…/index.tsxDefines the graph view used to inspect and edit animated values.
src/…/index.tsxCoordinates sheet, graph, split, and lane views for keyframe authoring.
src/…/animation-preset-catalogue.tsDefines how motion presets are grouped and which properties replacement can clear.
src/…/motion-presets.tsDefines the built-in entrance, exit, and emphasis animation behaviors.
src/…/effect-animatable-properties.tsResolves animated effect parameters and procedural audio overrides.
src/…/animated-transform-resolver.tsResolves item transforms from base values, keyframes, links, and expressions.
src/…/motion-modifier-eval.tsDefines how continuous motion is evaluated and layered onto a resolved transform.
src/…/canvas-keyframes.tsConnects frame resolution to preview and export rendering.
src/…/canvas-effects.tsCombines item and adjustment-layer effects before GPU rendering.