angular-three-postprocessing 4.1.0 → 4.2.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/package.json CHANGED
@@ -1,61 +1,61 @@
1
1
  {
2
- "name": "angular-three-postprocessing",
3
- "version": "4.1.0",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/angular-threejs/angular-three/tree/main/libs/postprocessing"
10
- },
11
- "author": {
12
- "name": "Chau Tran",
13
- "email": "nartc7789@gmail.com",
14
- "url": "https://nartc.me"
15
- },
16
- "description": "Postprocessing for Angular Three",
17
- "keywords": [
18
- "angular",
19
- "threejs",
20
- "renderer",
21
- "postprocessing"
22
- ],
23
- "license": "MIT",
24
- "peerDependencies": {
25
- "@angular/common": ">=20.0.0 <22.0.0",
26
- "@angular/core": ">=20.0.0 <22.0.0",
27
- "maath": ">=0.10.0 <0.11.0",
28
- "n8ao": ">=1.9.4 <2.0.0",
29
- "postprocessing": "^6.0.0",
30
- "three": ">=0.157.0 <0.184.0",
31
- "three-stdlib": "^2.0.0"
32
- },
33
- "peerDependenciesMeta": {
34
- "n8ao": {
35
- "optional": true
36
- }
37
- },
38
- "dependencies": {
39
- "tslib": "^2.7.0"
40
- },
41
- "sideEffects": false,
42
- "web-types": [
43
- "../../node_modules/angular-three/web-types.json",
44
- "node_modules/angular-three/web-types.json"
45
- ],
46
- "module": "fesm2022/angular-three-postprocessing.mjs",
47
- "typings": "types/angular-three-postprocessing.d.ts",
48
- "exports": {
49
- "./package.json": {
50
- "default": "./package.json"
51
- },
52
- ".": {
53
- "types": "./types/angular-three-postprocessing.d.ts",
54
- "default": "./fesm2022/angular-three-postprocessing.mjs"
55
- },
56
- "./n8ao": {
57
- "types": "./types/angular-three-postprocessing-n8ao.d.ts",
58
- "default": "./fesm2022/angular-three-postprocessing-n8ao.mjs"
59
- }
60
- }
2
+ "name": "angular-three-postprocessing",
3
+ "version": "4.2.0",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/angular-threejs/angular-three/tree/main/libs/postprocessing"
10
+ },
11
+ "author": {
12
+ "name": "Chau Tran",
13
+ "email": "nartc7789@gmail.com",
14
+ "url": "https://nartc.me"
15
+ },
16
+ "description": "Postprocessing for Angular Three",
17
+ "keywords": [
18
+ "angular",
19
+ "threejs",
20
+ "renderer",
21
+ "postprocessing"
22
+ ],
23
+ "license": "MIT",
24
+ "peerDependencies": {
25
+ "@angular/common": ">=20.0.0 <22.0.0",
26
+ "@angular/core": ">=20.0.0 <22.0.0",
27
+ "maath": ">=0.10.0 <0.11.0",
28
+ "n8ao": ">=1.9.4 <2.0.0",
29
+ "postprocessing": "^6.0.0",
30
+ "three": ">=0.157.0 <0.183.0",
31
+ "three-stdlib": "^2.0.0"
32
+ },
33
+ "peerDependenciesMeta": {
34
+ "n8ao": {
35
+ "optional": true
36
+ }
37
+ },
38
+ "dependencies": {
39
+ "tslib": "^2.7.0"
40
+ },
41
+ "sideEffects": false,
42
+ "web-types": [
43
+ "../../node_modules/angular-three/web-types.json",
44
+ "node_modules/angular-three/web-types.json"
45
+ ],
46
+ "module": "fesm2022/angular-three-postprocessing.mjs",
47
+ "typings": "types/angular-three-postprocessing.d.ts",
48
+ "exports": {
49
+ "./package.json": {
50
+ "default": "./package.json"
51
+ },
52
+ ".": {
53
+ "types": "./types/angular-three-postprocessing.d.ts",
54
+ "default": "./fesm2022/angular-three-postprocessing.mjs"
55
+ },
56
+ "./n8ao": {
57
+ "types": "./types/angular-three-postprocessing-n8ao.d.ts",
58
+ "default": "./fesm2022/angular-three-postprocessing-n8ao.mjs"
59
+ }
60
+ }
61
61
  }
@@ -3,7 +3,7 @@ import { NgtVector3, NgtVector2 } from 'angular-three';
3
3
  import * as _angular_core from '@angular/core';
4
4
  import { ElementRef } from '@angular/core';
5
5
  import * as postprocessing from 'postprocessing';
6
- import { BlendFunction, EffectComposer, Effect, BloomEffectOptions, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, DepthOfFieldEffect, DotScreenEffect, FXAAEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, LUT3DEffect, NoiseEffect, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, ShockWaveEffect, SMAAEffect, TiltShiftEffect, ToneMappingEffect, VignetteEffect } from 'postprocessing';
6
+ import { BlendFunction, EffectComposer, NormalPass, DepthDownsamplingPass, Effect, DepthOfFieldEffect, BloomEffectOptions, BloomEffect, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, DotScreenEffect, FXAAEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, LUT3DEffect, NoiseEffect, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, SSAOEffect, ShockWaveEffect, SMAAEffect, TextureEffect, TiltShiftEffect, ToneMappingEffect, VignetteEffect } from 'postprocessing';
7
7
  import * as THREE from 'three';
8
8
 
9
9
  /**
@@ -221,7 +221,7 @@ declare class NgtpEffectComposer {
221
221
  * The scene used for rendering effects.
222
222
  * Uses custom scene from options if provided, otherwise uses the store's scene.
223
223
  */
224
- scene: _angular_core.Signal<THREE.Scene>;
224
+ scene: _angular_core.Signal<THREE.Scene<THREE.Object3DEventMap>>;
225
225
  /**
226
226
  * The camera used for rendering effects.
227
227
  * Uses custom camera from options if provided, otherwise uses the store's camera.
@@ -243,6 +243,8 @@ declare class NgtpEffectComposer {
243
243
  * Can be used to access the composer directly for advanced use cases.
244
244
  */
245
245
  effectComposer: _angular_core.Signal<EffectComposer>;
246
+ normalPass: _angular_core.Signal<NormalPass | null>;
247
+ downSamplingPass: _angular_core.Signal<DepthDownsamplingPass | null>;
246
248
  constructor();
247
249
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpEffectComposer, never>;
248
250
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpEffectComposer, "ngtp-effect-composer", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
@@ -339,6 +341,32 @@ declare class NgtpASCII {
339
341
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpASCII, "ngtp-ascii", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
340
342
  }
341
343
 
344
+ type DOFOptions$1 = NonNullable<ConstructorParameters<typeof DepthOfFieldEffect>[1]>;
345
+ type AutofocusOptions = DOFOptions$1 & {
346
+ target?: NgtVector3;
347
+ mouse?: boolean;
348
+ debug?: number;
349
+ manual?: boolean;
350
+ smoothTime?: number;
351
+ };
352
+ declare class NgtpAutofocus {
353
+ options: _angular_core.InputSignalWithTransform<AutofocusOptions, "" | Partial<AutofocusOptions>>;
354
+ private effectComposer;
355
+ private store;
356
+ private hitpoint;
357
+ private ndc;
358
+ private depthPickingPass;
359
+ private copyPass;
360
+ debugSize: _angular_core.Signal<number | undefined>;
361
+ private hitpointMeshRef;
362
+ private targetMeshRef;
363
+ private target;
364
+ dofEffect: _angular_core.Signal<DepthOfFieldEffect>;
365
+ constructor();
366
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpAutofocus, never>;
367
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpAutofocus, "ngtp-autofocus", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
368
+ }
369
+
342
370
  /**
343
371
  * Angular component that applies a bloom postprocessing effect to the scene.
344
372
  *
@@ -914,7 +942,7 @@ declare class LensFlareEffect extends Effect {
914
942
  * @param options.enabled - Whether the effect is enabled
915
943
  * @param options.glareSize - Size of the glare
916
944
  * @param options.lensPosition - Position of the lens on screen
917
- * @param options.iResolution - Resolution of the effect
945
+ * @param options.screenRes - Resolution of the effect
918
946
  * @param options.starPoints - Number of points in the star pattern
919
947
  * @param options.flareSize - Size of individual flares
920
948
  * @param options.flareSpeed - Animation speed of flares
@@ -930,12 +958,12 @@ declare class LensFlareEffect extends Effect {
930
958
  * @param options.opacity - Opacity of the effect
931
959
  * @param options.starBurst - Enable star burst effect
932
960
  */
933
- constructor({ blendFunction, enabled, glareSize, lensPosition, iResolution, starPoints, flareSize, flareSpeed, flareShape, animated, anamorphic, colorGain, lensDirtTexture, haloScale, secondaryGhosts, aditionalStreaks, ghostScale, opacity, starBurst, }?: {
961
+ constructor({ blendFunction, enabled, glareSize, lensPosition, screenRes, starPoints, flareSize, flareSpeed, flareShape, animated, anamorphic, colorGain, lensDirtTexture, haloScale, secondaryGhosts, aditionalStreaks, ghostScale, opacity, starBurst, }?: {
934
962
  blendFunction?: BlendFunction | undefined;
935
963
  enabled?: boolean | undefined;
936
964
  glareSize?: number | undefined;
937
965
  lensPosition?: number[] | undefined;
938
- iResolution?: number[] | undefined;
966
+ screenRes?: number[] | undefined;
939
967
  starPoints?: number | undefined;
940
968
  flareSize?: number | undefined;
941
969
  flareSpeed?: number | undefined;
@@ -1004,7 +1032,7 @@ declare class NgtpLensFlare {
1004
1032
  enabled?: boolean | undefined;
1005
1033
  glareSize?: number | undefined;
1006
1034
  lensPosition?: number[] | undefined;
1007
- iResolution?: number[] | undefined;
1035
+ screenRes?: number[] | undefined;
1008
1036
  starPoints?: number | undefined;
1009
1037
  flareSize?: number | undefined;
1010
1038
  flareSpeed?: number | undefined;
@@ -1031,7 +1059,7 @@ declare class NgtpLensFlare {
1031
1059
  enabled?: boolean | undefined;
1032
1060
  glareSize?: number | undefined;
1033
1061
  lensPosition?: number[] | undefined;
1034
- iResolution?: number[] | undefined;
1062
+ screenRes?: number[] | undefined;
1035
1063
  starPoints?: number | undefined;
1036
1064
  flareSize?: number | undefined;
1037
1065
  flareSpeed?: number | undefined;
@@ -1345,6 +1373,43 @@ declare class NgtpPixelation {
1345
1373
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpPixelation, "ngtp-pixelation", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1346
1374
  }
1347
1375
 
1376
+ declare enum RampType {
1377
+ Linear = 0,
1378
+ Radial = 1,
1379
+ MirroredLinear = 2
1380
+ }
1381
+ declare class RampEffect extends Effect {
1382
+ constructor({ rampType, rampStart, rampEnd, startColor, endColor, rampBias, rampGain, rampMask, rampInvert, ...params }?: {
1383
+ rampType?: RampType | undefined;
1384
+ rampStart?: number[] | undefined;
1385
+ rampEnd?: number[] | undefined;
1386
+ startColor?: number[] | undefined;
1387
+ endColor?: number[] | undefined;
1388
+ rampBias?: number | undefined;
1389
+ rampGain?: number | undefined;
1390
+ rampMask?: boolean | undefined;
1391
+ rampInvert?: boolean | undefined;
1392
+ });
1393
+ }
1394
+ type RampEffectOptions = Partial<NonNullable<ConstructorParameters<typeof RampEffect>[0]>>;
1395
+ declare class NgtpRamp {
1396
+ options: _angular_core.InputSignal<Omit<Partial<{
1397
+ rampType?: RampType | undefined;
1398
+ rampStart?: number[] | undefined;
1399
+ rampEnd?: number[] | undefined;
1400
+ startColor?: number[] | undefined;
1401
+ endColor?: number[] | undefined;
1402
+ rampBias?: number | undefined;
1403
+ rampGain?: number | undefined;
1404
+ rampMask?: boolean | undefined;
1405
+ rampInvert?: boolean | undefined;
1406
+ }>, "blendFunction">>;
1407
+ protected hostEffect: NgtpEffect;
1408
+ effectRef: _angular_core.Signal<ElementRef<RampEffect> | undefined>;
1409
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpRamp, never>;
1410
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpRamp, "ngtp-ramp", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
1411
+ }
1412
+
1348
1413
  /**
1349
1414
  * Configuration options for the scanline effect.
1350
1415
  * Derived from ScanlineEffect constructor parameters.
@@ -1438,7 +1503,7 @@ declare class NgtpSelectiveBloom {
1438
1503
  * Not needed if using NgtSelectionApi.
1439
1504
  * @default []
1440
1505
  */
1441
- selection: _angular_core.InputSignal<THREE.Object3D<THREE.Object3DEventMap> | THREE.Object3D<THREE.Object3DEventMap>[] | ElementRef<THREE.Object3D<THREE.Object3DEventMap> | undefined> | ElementRef<THREE.Object3D<THREE.Object3DEventMap> | undefined>[]>;
1506
+ selection: _angular_core.InputSignal<THREE.Object3D<THREE.Object3DEventMap> | ElementRef<THREE.Object3D<THREE.Object3DEventMap> | undefined> | THREE.Object3D<THREE.Object3DEventMap>[] | ElementRef<THREE.Object3D<THREE.Object3DEventMap> | undefined>[]>;
1442
1507
  /**
1443
1508
  * Configuration options for the selective bloom effect.
1444
1509
  * @see SelectiveBloomOptions
@@ -1525,6 +1590,42 @@ declare class NgtpSepia {
1525
1590
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpSepia, "ngtp-sepia", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
1526
1591
  }
1527
1592
 
1593
+ declare class NgtpSSAO {
1594
+ options: _angular_core.InputSignal<{
1595
+ blendFunction?: BlendFunction;
1596
+ distanceScaling?: boolean;
1597
+ depthAwareUpsampling?: boolean;
1598
+ normalDepthBuffer?: THREE.Texture;
1599
+ samples?: number;
1600
+ rings?: number;
1601
+ worldDistanceThreshold?: number;
1602
+ worldDistanceFalloff?: number;
1603
+ worldProximityThreshold?: number;
1604
+ worldProximityFalloff?: number;
1605
+ distanceThreshold?: number;
1606
+ distanceFalloff?: number;
1607
+ rangeThreshold?: number;
1608
+ rangeFalloff?: number;
1609
+ minRadiusScale?: number;
1610
+ luminanceInfluence?: number;
1611
+ radius?: number;
1612
+ intensity?: number;
1613
+ bias?: number;
1614
+ fade?: number;
1615
+ color?: THREE.Color;
1616
+ resolutionScale?: number;
1617
+ resolutionX?: number;
1618
+ resolutionY?: number;
1619
+ width?: number;
1620
+ height?: number;
1621
+ }>;
1622
+ private effectComposer;
1623
+ effect: _angular_core.Signal<SSAOEffect | null>;
1624
+ constructor();
1625
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpSSAO, never>;
1626
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpSSAO, "ngtp-ssao", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1627
+ }
1628
+
1528
1629
  /**
1529
1630
  * Configuration options for the shock wave effect.
1530
1631
  * Derived from ShockWaveEffect constructor parameters.
@@ -1604,6 +1705,24 @@ declare class NgtpSMAA {
1604
1705
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpSMAA, "ngtp-smaa", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
1605
1706
  }
1606
1707
 
1708
+ type TextureOptions = Omit<ConstructorParameters<typeof TextureEffect>[0], 'texture'> & {
1709
+ texture?: THREE.Texture;
1710
+ textureSrc?: string;
1711
+ opacity?: number;
1712
+ };
1713
+ declare class NgtpTexture {
1714
+ options: _angular_core.InputSignal<TextureOptions>;
1715
+ private textureSrc;
1716
+ private texture;
1717
+ private opacity;
1718
+ private store;
1719
+ private loadedTexture;
1720
+ effect: _angular_core.Signal<TextureEffect | null>;
1721
+ constructor();
1722
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpTexture, never>;
1723
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpTexture, "ngtp-texture", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1724
+ }
1725
+
1607
1726
  /**
1608
1727
  * Configuration options for the tilt-shift effect.
1609
1728
  * Derived from TiltShiftEffect constructor parameters.
@@ -1883,5 +2002,5 @@ declare class NgtpWater {
1883
2002
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpWater, "ngtp-water", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
1884
2003
  }
1885
2004
 
1886
- export { ASCIIEffect, LensFlareEffect, NgtpASCII, NgtpBloom, NgtpBrightnessContrast, NgtpChromaticAberration, NgtpColorAverage, NgtpColorDepth, NgtpDepth, NgtpDepthOfField, NgtpDotScreen, NgtpEffect, NgtpEffectBlendMode, NgtpEffectComposer, NgtpFXAA, NgtpGlitch, NgtpGodRays, NgtpGrid, NgtpHueSaturation, NgtpLUT, NgtpLensFlare, NgtpNoise, NgtpOutline, NgtpPixelation, NgtpSMAA, NgtpScanline, NgtpSelectiveBloom, NgtpSepia, NgtpShockWave, NgtpTiltShift, NgtpTiltShift2, NgtpToneMapping, NgtpVignette, NgtpWater, TiltShift2Effect, WaterEffect, injectDefaultEffectOptions, provideDefaultEffectOptions };
1887
- export type { BrightnessEffectOptions, ChromaticAberrationEffectOptions, ColorDepthEffectOptions, DepthEffectOptions, DotScreenEffectOptions, FXAAEffectOptions, GlitchOptions, HueSaturationEffectOptions, LUTOptions, LensFlareOptions, NgtpEffectComposerOptions, NgtpOutlineOptions, NoiseEffectOptions, PixelationOptions, SMAAEffectOptions, ScanlineEffectOptions, SelectiveBloomOptions, SepiaEffectOptions, ShockWaveEffectOptions, TiltShift2EffectOptions, TiltShiftEffectOptions, ToneMappingEffectOptions, VignetteEffectOptions, WaterEffectOptions };
2005
+ export { ASCIIEffect, LensFlareEffect, NgtpASCII, NgtpAutofocus, NgtpBloom, NgtpBrightnessContrast, NgtpChromaticAberration, NgtpColorAverage, NgtpColorDepth, NgtpDepth, NgtpDepthOfField, NgtpDotScreen, NgtpEffect, NgtpEffectBlendMode, NgtpEffectComposer, NgtpFXAA, NgtpGlitch, NgtpGodRays, NgtpGrid, NgtpHueSaturation, NgtpLUT, NgtpLensFlare, NgtpNoise, NgtpOutline, NgtpPixelation, NgtpRamp, NgtpSMAA, NgtpSSAO, NgtpScanline, NgtpSelectiveBloom, NgtpSepia, NgtpShockWave, NgtpTexture, NgtpTiltShift, NgtpTiltShift2, NgtpToneMapping, NgtpVignette, NgtpWater, RampEffect, RampType, TiltShift2Effect, WaterEffect, injectDefaultEffectOptions, provideDefaultEffectOptions };
2006
+ export type { AutofocusOptions, BrightnessEffectOptions, ChromaticAberrationEffectOptions, ColorDepthEffectOptions, DepthEffectOptions, DotScreenEffectOptions, FXAAEffectOptions, GlitchOptions, HueSaturationEffectOptions, LUTOptions, LensFlareOptions, NgtpEffectComposerOptions, NgtpOutlineOptions, NoiseEffectOptions, PixelationOptions, RampEffectOptions, SMAAEffectOptions, ScanlineEffectOptions, SelectiveBloomOptions, SepiaEffectOptions, ShockWaveEffectOptions, TextureOptions, TiltShift2EffectOptions, TiltShiftEffectOptions, ToneMappingEffectOptions, VignetteEffectOptions, WaterEffectOptions };