@react-three/postprocessing 2.15.3 → 2.15.4
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.
|
@@ -1,7 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
4
|
const postprocessing = require("postprocessing");
|
|
4
|
-
const
|
|
5
|
-
const ToneMapping =
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const ToneMapping = React.forwardRef(function ToneMapping2({
|
|
7
|
+
blendFunction,
|
|
8
|
+
adaptive,
|
|
9
|
+
mode,
|
|
10
|
+
resolution,
|
|
11
|
+
maxLuminance,
|
|
12
|
+
whitePoint,
|
|
13
|
+
middleGrey,
|
|
14
|
+
minLuminance,
|
|
15
|
+
averageLuminance,
|
|
16
|
+
adaptationRate,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) {
|
|
19
|
+
const effect = React.useMemo(
|
|
20
|
+
() => new postprocessing.ToneMappingEffect({
|
|
21
|
+
blendFunction,
|
|
22
|
+
adaptive,
|
|
23
|
+
mode,
|
|
24
|
+
resolution,
|
|
25
|
+
maxLuminance,
|
|
26
|
+
whitePoint,
|
|
27
|
+
middleGrey,
|
|
28
|
+
minLuminance,
|
|
29
|
+
averageLuminance,
|
|
30
|
+
adaptationRate
|
|
31
|
+
}),
|
|
32
|
+
[
|
|
33
|
+
blendFunction,
|
|
34
|
+
adaptive,
|
|
35
|
+
mode,
|
|
36
|
+
resolution,
|
|
37
|
+
maxLuminance,
|
|
38
|
+
whitePoint,
|
|
39
|
+
middleGrey,
|
|
40
|
+
minLuminance,
|
|
41
|
+
averageLuminance,
|
|
42
|
+
adaptationRate
|
|
43
|
+
]
|
|
44
|
+
);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
effect.dispose();
|
|
47
|
+
}, [effect]);
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx("primitive", { ...props, ref, object: effect, attributes: postprocessing.EffectAttribute.CONVOLUTION });
|
|
49
|
+
});
|
|
6
50
|
exports.ToneMapping = ToneMapping;
|
|
7
51
|
//# sourceMappingURL=ToneMapping.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToneMapping.cjs","sources":["../../src/effects/ToneMapping.tsx"],"sourcesContent":["import { ToneMappingEffect } from 'postprocessing'\nimport {
|
|
1
|
+
{"version":3,"file":"ToneMapping.cjs","sources":["../../src/effects/ToneMapping.tsx"],"sourcesContent":["import { ToneMappingEffect, EffectAttribute } from 'postprocessing'\nimport { EffectProps } from '../util'\nimport { forwardRef, useEffect, useMemo } from 'react'\n\nexport type ToneMappingProps = EffectProps<typeof ToneMappingEffect>\n\nexport const ToneMapping = forwardRef<ToneMappingEffect, ToneMappingProps>(function ToneMapping(\n {\n blendFunction,\n adaptive,\n mode,\n resolution,\n maxLuminance,\n whitePoint,\n middleGrey,\n minLuminance,\n averageLuminance,\n adaptationRate,\n ...props\n },\n ref\n) {\n const effect = useMemo(\n () =>\n new ToneMappingEffect({\n blendFunction,\n adaptive,\n mode,\n resolution,\n maxLuminance,\n whitePoint,\n middleGrey,\n minLuminance,\n averageLuminance,\n adaptationRate,\n }),\n [\n blendFunction,\n adaptive,\n mode,\n resolution,\n maxLuminance,\n whitePoint,\n middleGrey,\n minLuminance,\n averageLuminance,\n adaptationRate,\n ]\n )\n\n useEffect(() => {\n effect.dispose()\n }, [effect])\n\n return <primitive {...props} ref={ref} object={effect} attributes={EffectAttribute.CONVOLUTION} />\n})\n"],"names":["forwardRef","ToneMapping","useMemo","ToneMappingEffect","useEffect","jsx","EffectAttribute"],"mappings":";;;;;AAMa,MAAA,cAAcA,MAAAA,WAAgD,SAASC,aAClF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,SAASC,MAAA;AAAA,IACb,MACE,IAAIC,eAAAA,kBAAkB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CACD;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGFC,QAAAA,UAAU,MAAM;AACd,WAAO,QAAQ;AAAA,EAAA,GACd,CAAC,MAAM,CAAC;AAEJ,SAAAC,+BAAC,eAAW,GAAG,OAAO,KAAU,QAAQ,QAAQ,YAAYC,+BAAgB,YAAa,CAAA;AAClG,CAAC;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ToneMappingEffect } from 'postprocessing';
|
|
3
|
+
import { EffectProps } from '../util';
|
|
4
|
+
export type ToneMappingProps = EffectProps<typeof ToneMappingEffect>;
|
|
3
5
|
export declare const ToneMapping: import("react").ForwardRefExoticComponent<Omit<import("@react-three/fiber").ExtendedColors<import("@react-three/fiber").Overwrite<Partial<ToneMappingEffect>, import("@react-three/fiber").NodeProps<ToneMappingEffect, typeof ToneMappingEffect>>> & {
|
|
4
6
|
blendFunction?: import("postprocessing").BlendFunction | undefined;
|
|
5
7
|
adaptive?: boolean | undefined;
|
|
@@ -14,4 +16,4 @@ export declare const ToneMapping: import("react").ForwardRefExoticComponent<Omit
|
|
|
14
16
|
} & {
|
|
15
17
|
blendFunction?: import("postprocessing").BlendFunction | undefined;
|
|
16
18
|
opacity?: number | undefined;
|
|
17
|
-
}, "ref"> & import("react").RefAttributes<
|
|
19
|
+
}, "ref"> & import("react").RefAttributes<ToneMappingEffect>>;
|
|
@@ -1,6 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ToneMappingEffect, EffectAttribute } from "postprocessing";
|
|
3
|
+
import { forwardRef, useMemo, useEffect } from "react";
|
|
4
|
+
const ToneMapping = forwardRef(function ToneMapping2({
|
|
5
|
+
blendFunction,
|
|
6
|
+
adaptive,
|
|
7
|
+
mode,
|
|
8
|
+
resolution,
|
|
9
|
+
maxLuminance,
|
|
10
|
+
whitePoint,
|
|
11
|
+
middleGrey,
|
|
12
|
+
minLuminance,
|
|
13
|
+
averageLuminance,
|
|
14
|
+
adaptationRate,
|
|
15
|
+
...props
|
|
16
|
+
}, ref) {
|
|
17
|
+
const effect = useMemo(
|
|
18
|
+
() => new ToneMappingEffect({
|
|
19
|
+
blendFunction,
|
|
20
|
+
adaptive,
|
|
21
|
+
mode,
|
|
22
|
+
resolution,
|
|
23
|
+
maxLuminance,
|
|
24
|
+
whitePoint,
|
|
25
|
+
middleGrey,
|
|
26
|
+
minLuminance,
|
|
27
|
+
averageLuminance,
|
|
28
|
+
adaptationRate
|
|
29
|
+
}),
|
|
30
|
+
[
|
|
31
|
+
blendFunction,
|
|
32
|
+
adaptive,
|
|
33
|
+
mode,
|
|
34
|
+
resolution,
|
|
35
|
+
maxLuminance,
|
|
36
|
+
whitePoint,
|
|
37
|
+
middleGrey,
|
|
38
|
+
minLuminance,
|
|
39
|
+
averageLuminance,
|
|
40
|
+
adaptationRate
|
|
41
|
+
]
|
|
42
|
+
);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
effect.dispose();
|
|
45
|
+
}, [effect]);
|
|
46
|
+
return /* @__PURE__ */ jsx("primitive", { ...props, ref, object: effect, attributes: EffectAttribute.CONVOLUTION });
|
|
47
|
+
});
|
|
4
48
|
export {
|
|
5
49
|
ToneMapping
|
|
6
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToneMapping.js","sources":["../../src/effects/ToneMapping.tsx"],"sourcesContent":["import { ToneMappingEffect } from 'postprocessing'\nimport {
|
|
1
|
+
{"version":3,"file":"ToneMapping.js","sources":["../../src/effects/ToneMapping.tsx"],"sourcesContent":["import { ToneMappingEffect, EffectAttribute } from 'postprocessing'\nimport { EffectProps } from '../util'\nimport { forwardRef, useEffect, useMemo } from 'react'\n\nexport type ToneMappingProps = EffectProps<typeof ToneMappingEffect>\n\nexport const ToneMapping = forwardRef<ToneMappingEffect, ToneMappingProps>(function ToneMapping(\n {\n blendFunction,\n adaptive,\n mode,\n resolution,\n maxLuminance,\n whitePoint,\n middleGrey,\n minLuminance,\n averageLuminance,\n adaptationRate,\n ...props\n },\n ref\n) {\n const effect = useMemo(\n () =>\n new ToneMappingEffect({\n blendFunction,\n adaptive,\n mode,\n resolution,\n maxLuminance,\n whitePoint,\n middleGrey,\n minLuminance,\n averageLuminance,\n adaptationRate,\n }),\n [\n blendFunction,\n adaptive,\n mode,\n resolution,\n maxLuminance,\n whitePoint,\n middleGrey,\n minLuminance,\n averageLuminance,\n adaptationRate,\n ]\n )\n\n useEffect(() => {\n effect.dispose()\n }, [effect])\n\n return <primitive {...props} ref={ref} object={effect} attributes={EffectAttribute.CONVOLUTION} />\n})\n"],"names":["ToneMapping"],"mappings":";;;AAMa,MAAA,cAAc,WAAgD,SAASA,aAClF;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,SAAS;AAAA,IACb,MACE,IAAI,kBAAkB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA,CACD;AAAA,IACH;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGF,YAAU,MAAM;AACd,WAAO,QAAQ;AAAA,EAAA,GACd,CAAC,MAAM,CAAC;AAEJ,SAAA,oBAAC,eAAW,GAAG,OAAO,KAAU,QAAQ,QAAQ,YAAY,gBAAgB,YAAa,CAAA;AAClG,CAAC;"}
|