@react-three/postprocessing 2.10.0 → 2.11.0
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.
- package/dist/effects/GodRays.d.ts +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -17,5 +17,5 @@ export declare const GodRays: React.ForwardRefExoticComponent<{
|
|
|
17
17
|
kernelSize?: import("postprocessing").KernelSize | undefined;
|
|
18
18
|
blur?: boolean | undefined;
|
|
19
19
|
} & {
|
|
20
|
-
sun: Mesh | Points
|
|
20
|
+
sun: Mesh | Points | React.MutableRefObject<Mesh | Points>;
|
|
21
21
|
} & React.RefAttributes<GodRaysEffect>>;
|
package/dist/index.cjs
CHANGED
|
@@ -197,7 +197,9 @@ const Glitch = React.forwardRef(function Glitch({ active = true, ...props }, ref
|
|
|
197
197
|
|
|
198
198
|
const GodRays = React.forwardRef(function GodRays(props, ref) {
|
|
199
199
|
const { camera } = React.useContext(EffectComposerContext);
|
|
200
|
-
const effect = React.useMemo(() => new postprocessing.GodRaysEffect(camera, props.sun, props), [camera, props]);
|
|
200
|
+
const effect = React.useMemo(() => new postprocessing.GodRaysEffect(camera, resolveRef(props.sun), props), [camera, props]);
|
|
201
|
+
// @ts-ignore v6.30.2 https://github.com/pmndrs/postprocessing/pull/470/commits/091ef6f9516ca02efa7576305afbecf1ce8323ae
|
|
202
|
+
React.useLayoutEffect(() => void (effect.lightSource = resolveRef(props.sun)), [effect, props.sun]);
|
|
201
203
|
return jsxRuntime.jsx("primitive", { ref: ref, object: effect, dispose: null });
|
|
202
204
|
});
|
|
203
205
|
|
package/dist/index.js
CHANGED
|
@@ -177,7 +177,9 @@ const Glitch = forwardRef(function Glitch({ active = true, ...props }, ref) {
|
|
|
177
177
|
|
|
178
178
|
const GodRays = forwardRef(function GodRays(props, ref) {
|
|
179
179
|
const { camera } = useContext(EffectComposerContext);
|
|
180
|
-
const effect = useMemo(() => new GodRaysEffect(camera, props.sun, props), [camera, props]);
|
|
180
|
+
const effect = useMemo(() => new GodRaysEffect(camera, resolveRef(props.sun), props), [camera, props]);
|
|
181
|
+
// @ts-ignore v6.30.2 https://github.com/pmndrs/postprocessing/pull/470/commits/091ef6f9516ca02efa7576305afbecf1ce8323ae
|
|
182
|
+
useLayoutEffect(() => void (effect.lightSource = resolveRef(props.sun)), [effect, props.sun]);
|
|
181
183
|
return jsx("primitive", { ref: ref, object: effect, dispose: null });
|
|
182
184
|
});
|
|
183
185
|
|