Skip to content

Commit 099212f

Browse files
fix(Glitch): set non-null chromatic offset
1 parent d034be0 commit 099212f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/effects/Glitch.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Vector2 } from 'three'
12
import { GlitchEffect, GlitchMode } from 'postprocessing'
23
import { Ref, forwardRef, useMemo, useLayoutEffect } from 'react'
34
import { ReactThreeFiber, useThree } from '@react-three/fiber'
@@ -22,7 +23,7 @@ export const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(
2223
const duration = useVector2(props, 'duration')
2324
const strength = useVector2(props, 'strength')
2425
const effect = useMemo(
25-
() => new GlitchEffect({ ...props, delay, duration, strength }),
26+
() => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset: new Vector2() }),
2627
[delay, duration, props, strength]
2728
)
2829
useLayoutEffect(() => {

0 commit comments

Comments
 (0)