@react-three/postprocessing 2.2.0 → 2.2.1
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/README.md +2 -2
- package/dist/index.cjs.js +17 -9
- package/dist/index.js +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,8 +98,8 @@ You wrap everything into a selection, and then select object or groups. Effects
|
|
|
98
98
|
|
|
99
99
|
```jsx
|
|
100
100
|
<Selection>
|
|
101
|
-
<EffectComposer>
|
|
102
|
-
<Outline
|
|
101
|
+
<EffectComposer autoclear={false}>
|
|
102
|
+
<Outline blur edgeStrength={100} />
|
|
103
103
|
</EffectComposer>
|
|
104
104
|
<Select enabled>
|
|
105
105
|
<mesh />
|
package/dist/index.cjs.js
CHANGED
|
@@ -376,19 +376,27 @@ var Outline = /*#__PURE__*/React.forwardRef(function Outline(_ref, forwardRef) {
|
|
|
376
376
|
_ref$selectionLayer = _ref.selectionLayer,
|
|
377
377
|
selectionLayer = _ref$selectionLayer === void 0 ? 10 : _ref$selectionLayer,
|
|
378
378
|
_ref$blendFunction = _ref.blendFunction,
|
|
379
|
-
blendFunction = _ref$blendFunction === void 0 ? postprocessing.BlendFunction.
|
|
380
|
-
patternTexture = _ref.patternTexture,
|
|
381
|
-
|
|
382
|
-
|
|
379
|
+
blendFunction = _ref$blendFunction === void 0 ? postprocessing.BlendFunction.SCREEN : _ref$blendFunction,
|
|
380
|
+
_ref$patternTexture = _ref.patternTexture,
|
|
381
|
+
patternTexture = _ref$patternTexture === void 0 ? null : _ref$patternTexture,
|
|
382
|
+
_ref$edgeStrength = _ref.edgeStrength,
|
|
383
|
+
edgeStrength = _ref$edgeStrength === void 0 ? 1 : _ref$edgeStrength,
|
|
384
|
+
_ref$pulseSpeed = _ref.pulseSpeed,
|
|
385
|
+
pulseSpeed = _ref$pulseSpeed === void 0 ? 0 : _ref$pulseSpeed,
|
|
383
386
|
_ref$visibleEdgeColor = _ref.visibleEdgeColor,
|
|
384
387
|
visibleEdgeColor = _ref$visibleEdgeColor === void 0 ? 0xffffff : _ref$visibleEdgeColor,
|
|
385
388
|
_ref$hiddenEdgeColor = _ref.hiddenEdgeColor,
|
|
386
389
|
hiddenEdgeColor = _ref$hiddenEdgeColor === void 0 ? 0xffffff : _ref$hiddenEdgeColor,
|
|
387
|
-
width = _ref.width,
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
_ref$width = _ref.width,
|
|
391
|
+
width = _ref$width === void 0 ? postprocessing.Resizer.AUTO_SIZE : _ref$width,
|
|
392
|
+
_ref$height = _ref.height,
|
|
393
|
+
height = _ref$height === void 0 ? postprocessing.Resizer.AUTO_SIZE : _ref$height,
|
|
394
|
+
_ref$kernelSize = _ref.kernelSize,
|
|
395
|
+
kernelSize = _ref$kernelSize === void 0 ? postprocessing.KernelSize.VERY_SMALL : _ref$kernelSize,
|
|
396
|
+
_ref$blur = _ref.blur,
|
|
397
|
+
blur = _ref$blur === void 0 ? false : _ref$blur,
|
|
398
|
+
_ref$xRay = _ref.xRay,
|
|
399
|
+
xRay = _ref$xRay === void 0 ? true : _ref$xRay;
|
|
392
400
|
_objectWithoutPropertiesLoose__default["default"](_ref, _excluded$2);
|
|
393
401
|
|
|
394
402
|
var _useContext = React.useContext(EffectComposerContext),
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlendFunction, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, EffectComposer as EffectComposer$1, RenderPass, NormalPass, EffectPass, DepthOfFieldEffect, DotScreenEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, NoiseEffect, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, SSAOEffect, SMAAPreset, EdgeDetectionMode, SMAAImageLoader, SMAAEffect, TextureEffect, ToneMappingEffect, VignetteEffect, ShockWaveEffect, LUTEffect } from 'postprocessing';
|
|
1
|
+
import { BlendFunction, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, EffectComposer as EffectComposer$1, RenderPass, NormalPass, EffectPass, DepthOfFieldEffect, DotScreenEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, NoiseEffect, Resizer, KernelSize, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, SSAOEffect, SMAAPreset, EdgeDetectionMode, SMAAImageLoader, SMAAEffect, TextureEffect, ToneMappingEffect, VignetteEffect, ShockWaveEffect, LUTEffect } from 'postprocessing';
|
|
2
2
|
import React, { forwardRef, useMemo, useLayoutEffect, createContext, useRef, useImperativeHandle, useContext, useState, useEffect } from 'react';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
import { Vector2, Vector3, TextureLoader, sRGBEncoding, RepeatWrapping } from 'three';
|
|
@@ -294,17 +294,17 @@ const Outline = /*#__PURE__*/forwardRef(function Outline(_ref, forwardRef) {
|
|
|
294
294
|
let {
|
|
295
295
|
selection = [],
|
|
296
296
|
selectionLayer = 10,
|
|
297
|
-
blendFunction = BlendFunction.
|
|
298
|
-
patternTexture,
|
|
299
|
-
edgeStrength,
|
|
300
|
-
pulseSpeed,
|
|
297
|
+
blendFunction = BlendFunction.SCREEN,
|
|
298
|
+
patternTexture = null,
|
|
299
|
+
edgeStrength = 1,
|
|
300
|
+
pulseSpeed = 0,
|
|
301
301
|
visibleEdgeColor = 0xffffff,
|
|
302
302
|
hiddenEdgeColor = 0xffffff,
|
|
303
|
-
width,
|
|
304
|
-
height,
|
|
305
|
-
kernelSize,
|
|
306
|
-
blur,
|
|
307
|
-
xRay,
|
|
303
|
+
width = Resizer.AUTO_SIZE,
|
|
304
|
+
height = Resizer.AUTO_SIZE,
|
|
305
|
+
kernelSize = KernelSize.VERY_SMALL,
|
|
306
|
+
blur = false,
|
|
307
|
+
xRay = true,
|
|
308
308
|
...props
|
|
309
309
|
} = _ref;
|
|
310
310
|
const {
|