Skip to content

Cinematic effects API

component · /effects
ts
interface CinematicEffectConfig {
  type: 'none' | 'cosmic-pulse' | 'texture-vortex' |
        'hologram-scan' | 'chrome-breathe'
  intensity?: number
  speed?: number
  progress?: number
  color?: string
}

CinematicEffectDriver

tsx
<CinematicEffectDriver
  modelRef={modelRef}
  effect={effect}
  progressRef={sequenceProgressRef}
/>

effect.progress has highest priority. If it is absent, progressRef.current is used. If neither is present, elapsed time and speed drive the effect.

The driver captures each unique material once, tracks texture state, animates properties in useFrame, and restores original state on effect change or teardown.

Released under the MIT License.