@react-three/postprocessing 2.15.11 → 2.15.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,8 @@ const Glitch = React.forwardRef(function Glitch2({ active = true, ...props }, re
21
21
  }, [active, effect, invalidate, props.mode]);
22
22
  React.useEffect(() => {
23
23
  return () => {
24
- effect.dispose();
24
+ var _a;
25
+ (_a = effect.dispose) == null ? void 0 : _a.call(effect);
25
26
  };
26
27
  }, [effect]);
27
28
  return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ref, object: effect, dispose: null });
@@ -1 +1 @@
1
- {"version":3,"file":"Glitch.cjs","sources":["../../src/effects/Glitch.tsx"],"sourcesContent":["import { Vector2 } from 'three'\nimport { GlitchEffect, GlitchMode } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useLayoutEffect, useEffect } from 'react'\nimport { ReactThreeFiber, useThree } from '@react-three/fiber'\nimport { useVector2 } from '../util'\n\nexport type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] &\n Partial<{\n mode: GlitchMode\n active: boolean\n delay: ReactThreeFiber.Vector2\n duration: ReactThreeFiber.Vector2\n chromaticAberrationOffset: ReactThreeFiber.Vector2\n strength: ReactThreeFiber.Vector2\n }>\n\nexport const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(\n { active = true, ...props }: GlitchProps,\n ref: Ref<GlitchEffect>\n) {\n const invalidate = useThree((state) => state.invalidate)\n const delay = useVector2(props, 'delay')\n const duration = useVector2(props, 'duration')\n const strength = useVector2(props, 'strength')\n const chromaticAberrationOffset = useVector2(props, 'chromaticAberrationOffset')\n const effect = useMemo(\n () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),\n [delay, duration, props, strength, chromaticAberrationOffset]\n )\n useLayoutEffect(() => {\n effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED\n invalidate()\n }, [active, effect, invalidate, props.mode])\n useEffect(() => {\n return () => {\n effect.dispose()\n }\n }, [effect])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["forwardRef","Glitch","useThree","useVector2","useMemo","GlitchEffect","useLayoutEffect","GlitchMode","useEffect"],"mappings":";;;;;;;AAgBa,MAAA,SAASA,MAAAA,WAAsC,SAASC,QACnE,EAAE,SAAS,MAAM,GAAG,MAAM,GAC1B,KACA;AACA,QAAM,aAAaC,MAAAA,SAAS,CAAC,UAAU,MAAM,UAAU;AACjD,QAAA,QAAQC,KAAAA,WAAW,OAAO,OAAO;AACjC,QAAA,WAAWA,KAAAA,WAAW,OAAO,UAAU;AACvC,QAAA,WAAWA,KAAAA,WAAW,OAAO,UAAU;AACvC,QAAA,4BAA4BA,KAAAA,WAAW,OAAO,2BAA2B;AAC/E,QAAM,SAASC,MAAA;AAAA,IACb,MAAM,IAAIC,eAAAA,aAAa,EAAE,GAAG,OAAO,OAAO,UAAU,UAAU,2BAA2B;AAAA,IACzF,CAAC,OAAO,UAAU,OAAO,UAAU,yBAAyB;AAAA,EAAA;AAE9DC,QAAAA,gBAAgB,MAAM;AACpB,WAAO,OAAO,SAAS,MAAM,QAAQC,0BAAW,WAAWA,eAAW,WAAA;AAC3D;EAAA,GACV,CAAC,QAAQ,QAAQ,YAAY,MAAM,IAAI,CAAC;AAC3CC,QAAAA,UAAU,MAAM;AACd,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IAAA;AAAA,EACjB,GACC,CAAC,MAAM,CAAC;AACX,wCAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;;"}
1
+ {"version":3,"file":"Glitch.cjs","sources":["../../src/effects/Glitch.tsx"],"sourcesContent":["import { Vector2 } from 'three'\nimport { GlitchEffect, GlitchMode } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useLayoutEffect, useEffect } from 'react'\nimport { ReactThreeFiber, useThree } from '@react-three/fiber'\nimport { useVector2 } from '../util'\n\nexport type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] &\n Partial<{\n mode: GlitchMode\n active: boolean\n delay: ReactThreeFiber.Vector2\n duration: ReactThreeFiber.Vector2\n chromaticAberrationOffset: ReactThreeFiber.Vector2\n strength: ReactThreeFiber.Vector2\n }>\n\nexport const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(\n { active = true, ...props }: GlitchProps,\n ref: Ref<GlitchEffect>\n) {\n const invalidate = useThree((state) => state.invalidate)\n const delay = useVector2(props, 'delay')\n const duration = useVector2(props, 'duration')\n const strength = useVector2(props, 'strength')\n const chromaticAberrationOffset = useVector2(props, 'chromaticAberrationOffset')\n const effect = useMemo(\n () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),\n [delay, duration, props, strength, chromaticAberrationOffset]\n )\n useLayoutEffect(() => {\n effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED\n invalidate()\n }, [active, effect, invalidate, props.mode])\n useEffect(() => {\n return () => {\n effect.dispose?.()\n }\n }, [effect])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["forwardRef","Glitch","useThree","useVector2","useMemo","GlitchEffect","useLayoutEffect","GlitchMode","useEffect"],"mappings":";;;;;;;AAgBa,MAAA,SAASA,MAAAA,WAAsC,SAASC,QACnE,EAAE,SAAS,MAAM,GAAG,MAAM,GAC1B,KACA;AACA,QAAM,aAAaC,MAAAA,SAAS,CAAC,UAAU,MAAM,UAAU;AACjD,QAAA,QAAQC,KAAAA,WAAW,OAAO,OAAO;AACjC,QAAA,WAAWA,KAAAA,WAAW,OAAO,UAAU;AACvC,QAAA,WAAWA,KAAAA,WAAW,OAAO,UAAU;AACvC,QAAA,4BAA4BA,KAAAA,WAAW,OAAO,2BAA2B;AAC/E,QAAM,SAASC,MAAA;AAAA,IACb,MAAM,IAAIC,eAAAA,aAAa,EAAE,GAAG,OAAO,OAAO,UAAU,UAAU,2BAA2B;AAAA,IACzF,CAAC,OAAO,UAAU,OAAO,UAAU,yBAAyB;AAAA,EAAA;AAE9DC,QAAAA,gBAAgB,MAAM;AACpB,WAAO,OAAO,SAAS,MAAM,QAAQC,0BAAW,WAAWA,eAAW,WAAA;AAC3D;EAAA,GACV,CAAC,QAAQ,QAAQ,YAAY,MAAM,IAAI,CAAC;AAC3CC,QAAAA,UAAU,MAAM;AACd,WAAO,MAAM;;AACX,mBAAO,YAAP;AAAA,IAAiB;AAAA,EACnB,GACC,CAAC,MAAM,CAAC;AACX,wCAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;;"}
@@ -19,7 +19,8 @@ const Glitch = forwardRef(function Glitch2({ active = true, ...props }, ref) {
19
19
  }, [active, effect, invalidate, props.mode]);
20
20
  useEffect(() => {
21
21
  return () => {
22
- effect.dispose();
22
+ var _a;
23
+ (_a = effect.dispose) == null ? void 0 : _a.call(effect);
23
24
  };
24
25
  }, [effect]);
25
26
  return /* @__PURE__ */ jsx("primitive", { ref, object: effect, dispose: null });
@@ -1 +1 @@
1
- {"version":3,"file":"Glitch.js","sources":["../../src/effects/Glitch.tsx"],"sourcesContent":["import { Vector2 } from 'three'\nimport { GlitchEffect, GlitchMode } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useLayoutEffect, useEffect } from 'react'\nimport { ReactThreeFiber, useThree } from '@react-three/fiber'\nimport { useVector2 } from '../util'\n\nexport type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] &\n Partial<{\n mode: GlitchMode\n active: boolean\n delay: ReactThreeFiber.Vector2\n duration: ReactThreeFiber.Vector2\n chromaticAberrationOffset: ReactThreeFiber.Vector2\n strength: ReactThreeFiber.Vector2\n }>\n\nexport const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(\n { active = true, ...props }: GlitchProps,\n ref: Ref<GlitchEffect>\n) {\n const invalidate = useThree((state) => state.invalidate)\n const delay = useVector2(props, 'delay')\n const duration = useVector2(props, 'duration')\n const strength = useVector2(props, 'strength')\n const chromaticAberrationOffset = useVector2(props, 'chromaticAberrationOffset')\n const effect = useMemo(\n () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),\n [delay, duration, props, strength, chromaticAberrationOffset]\n )\n useLayoutEffect(() => {\n effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED\n invalidate()\n }, [active, effect, invalidate, props.mode])\n useEffect(() => {\n return () => {\n effect.dispose()\n }\n }, [effect])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["Glitch"],"mappings":";;;;;AAgBa,MAAA,SAAS,WAAsC,SAASA,QACnE,EAAE,SAAS,MAAM,GAAG,MAAM,GAC1B,KACA;AACA,QAAM,aAAa,SAAS,CAAC,UAAU,MAAM,UAAU;AACjD,QAAA,QAAQ,WAAW,OAAO,OAAO;AACjC,QAAA,WAAW,WAAW,OAAO,UAAU;AACvC,QAAA,WAAW,WAAW,OAAO,UAAU;AACvC,QAAA,4BAA4B,WAAW,OAAO,2BAA2B;AAC/E,QAAM,SAAS;AAAA,IACb,MAAM,IAAI,aAAa,EAAE,GAAG,OAAO,OAAO,UAAU,UAAU,2BAA2B;AAAA,IACzF,CAAC,OAAO,UAAU,OAAO,UAAU,yBAAyB;AAAA,EAAA;AAE9D,kBAAgB,MAAM;AACpB,WAAO,OAAO,SAAS,MAAM,QAAQ,WAAW,WAAW,WAAW;AAC3D;EAAA,GACV,CAAC,QAAQ,QAAQ,YAAY,MAAM,IAAI,CAAC;AAC3C,YAAU,MAAM;AACd,WAAO,MAAM;AACX,aAAO,QAAQ;AAAA,IAAA;AAAA,EACjB,GACC,CAAC,MAAM,CAAC;AACX,6BAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;"}
1
+ {"version":3,"file":"Glitch.js","sources":["../../src/effects/Glitch.tsx"],"sourcesContent":["import { Vector2 } from 'three'\nimport { GlitchEffect, GlitchMode } from 'postprocessing'\nimport { Ref, forwardRef, useMemo, useLayoutEffect, useEffect } from 'react'\nimport { ReactThreeFiber, useThree } from '@react-three/fiber'\nimport { useVector2 } from '../util'\n\nexport type GlitchProps = ConstructorParameters<typeof GlitchEffect>[0] &\n Partial<{\n mode: GlitchMode\n active: boolean\n delay: ReactThreeFiber.Vector2\n duration: ReactThreeFiber.Vector2\n chromaticAberrationOffset: ReactThreeFiber.Vector2\n strength: ReactThreeFiber.Vector2\n }>\n\nexport const Glitch = forwardRef<GlitchEffect, GlitchProps>(function Glitch(\n { active = true, ...props }: GlitchProps,\n ref: Ref<GlitchEffect>\n) {\n const invalidate = useThree((state) => state.invalidate)\n const delay = useVector2(props, 'delay')\n const duration = useVector2(props, 'duration')\n const strength = useVector2(props, 'strength')\n const chromaticAberrationOffset = useVector2(props, 'chromaticAberrationOffset')\n const effect = useMemo(\n () => new GlitchEffect({ ...props, delay, duration, strength, chromaticAberrationOffset }),\n [delay, duration, props, strength, chromaticAberrationOffset]\n )\n useLayoutEffect(() => {\n effect.mode = active ? props.mode || GlitchMode.SPORADIC : GlitchMode.DISABLED\n invalidate()\n }, [active, effect, invalidate, props.mode])\n useEffect(() => {\n return () => {\n effect.dispose?.()\n }\n }, [effect])\n return <primitive ref={ref} object={effect} dispose={null} />\n})\n"],"names":["Glitch"],"mappings":";;;;;AAgBa,MAAA,SAAS,WAAsC,SAASA,QACnE,EAAE,SAAS,MAAM,GAAG,MAAM,GAC1B,KACA;AACA,QAAM,aAAa,SAAS,CAAC,UAAU,MAAM,UAAU;AACjD,QAAA,QAAQ,WAAW,OAAO,OAAO;AACjC,QAAA,WAAW,WAAW,OAAO,UAAU;AACvC,QAAA,WAAW,WAAW,OAAO,UAAU;AACvC,QAAA,4BAA4B,WAAW,OAAO,2BAA2B;AAC/E,QAAM,SAAS;AAAA,IACb,MAAM,IAAI,aAAa,EAAE,GAAG,OAAO,OAAO,UAAU,UAAU,2BAA2B;AAAA,IACzF,CAAC,OAAO,UAAU,OAAO,UAAU,yBAAyB;AAAA,EAAA;AAE9D,kBAAgB,MAAM;AACpB,WAAO,OAAO,SAAS,MAAM,QAAQ,WAAW,WAAW,WAAW;AAC3D;EAAA,GACV,CAAC,QAAQ,QAAQ,YAAY,MAAM,IAAI,CAAC;AAC3C,YAAU,MAAM;AACd,WAAO,MAAM;;AACX,mBAAO,YAAP;AAAA,IAAiB;AAAA,EACnB,GACC,CAAC,MAAM,CAAC;AACX,6BAAQ,aAAU,EAAA,KAAU,QAAQ,QAAQ,SAAS,KAAM,CAAA;AAC7D,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-three/postprocessing",
3
- "version": "2.15.11",
3
+ "version": "2.15.12",
4
4
  "description": "postprocessing wrapper for React and @react-three/fiber",
5
5
  "keywords": [
6
6
  "postprocessing",