angular-three-postprocessing 1.6.0 → 2.0.0-beta.3

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.
Files changed (87) hide show
  1. package/README.md +4 -12
  2. package/effect-composer.d.ts +53 -0
  3. package/effect.d.ts +24 -0
  4. package/effects/bloom/bloom.d.ts +8 -0
  5. package/effects/{lib/brightness-contrast → brightness-contrast}/brightness-contrast.d.ts +1 -2
  6. package/effects/{lib/color-depth → color-depth}/color-depth.d.ts +1 -2
  7. package/effects/{lib/depth → depth}/depth.d.ts +1 -2
  8. package/effects/{lib/dot-screen → dot-screen}/dot-screen.d.ts +1 -2
  9. package/effects/{lib/hue-saturation → hue-saturation}/hue-saturation.d.ts +1 -2
  10. package/effects/index.d.ts +16 -14
  11. package/effects/lut/lut.d.ts +19 -0
  12. package/effects/{lib/noise → noise}/noise.d.ts +2 -3
  13. package/effects/{lib/scanline → scanline}/scanline.d.ts +2 -3
  14. package/effects/{lib/sepia → sepia}/sepia.d.ts +1 -2
  15. package/effects/shock-wave/shock-wave.d.ts +7 -0
  16. package/effects/smaa/smaa.d.ts +7 -0
  17. package/effects/ssao/ssao.d.ts +38 -0
  18. package/effects/tilt-shift/tilt-shift.d.ts +8 -0
  19. package/effects/tone-mapping/tone-mapping.d.ts +7 -0
  20. package/effects/{lib/vignette → vignette}/vignette.d.ts +1 -2
  21. package/esm2022/angular-three-postprocessing.mjs +1 -1
  22. package/esm2022/effect-composer.mjs +242 -0
  23. package/esm2022/effect.mjs +79 -0
  24. package/esm2022/effects/angular-three-postprocessing-effects.mjs +1 -1
  25. package/esm2022/effects/bloom/bloom.mjs +34 -0
  26. package/esm2022/effects/brightness-contrast/brightness-contrast.mjs +30 -0
  27. package/esm2022/effects/color-depth/color-depth.mjs +30 -0
  28. package/esm2022/effects/depth/depth.mjs +30 -0
  29. package/esm2022/effects/dot-screen/dot-screen.mjs +30 -0
  30. package/esm2022/effects/hue-saturation/hue-saturation.mjs +30 -0
  31. package/esm2022/effects/index.mjs +17 -15
  32. package/esm2022/effects/lut/lut.mjs +77 -0
  33. package/esm2022/effects/noise/noise.mjs +34 -0
  34. package/esm2022/effects/scanline/scanline.mjs +34 -0
  35. package/esm2022/effects/sepia/sepia.mjs +30 -0
  36. package/esm2022/effects/shock-wave/shock-wave.mjs +30 -0
  37. package/esm2022/effects/smaa/smaa.mjs +30 -0
  38. package/esm2022/effects/ssao/ssao.mjs +189 -0
  39. package/esm2022/effects/tilt-shift/tilt-shift.mjs +34 -0
  40. package/esm2022/effects/tone-mapping/tone-mapping.mjs +30 -0
  41. package/esm2022/effects/vignette/vignette.mjs +30 -0
  42. package/esm2022/index.mjs +3 -3
  43. package/fesm2022/angular-three-postprocessing-effects.mjs +359 -224
  44. package/fesm2022/angular-three-postprocessing-effects.mjs.map +1 -1
  45. package/fesm2022/angular-three-postprocessing.mjs +163 -162
  46. package/fesm2022/angular-three-postprocessing.mjs.map +1 -1
  47. package/index.d.ts +2 -2
  48. package/package.json +6 -14
  49. package/plugin/package.json +1 -1
  50. package/plugin/src/generators/init/compat.js.map +1 -1
  51. package/plugin/src/generators/init/init.d.ts +1 -1
  52. package/plugin/src/generators/init/init.js +14 -18
  53. package/plugin/src/generators/init/init.js.map +1 -1
  54. package/plugin/src/index.js.map +1 -1
  55. package/effects/lib/bloom/bloom.d.ts +0 -9
  56. package/effects/lib/lut/lut.d.ts +0 -13
  57. package/effects/lib/ssao/ssao.d.ts +0 -13
  58. package/effects/lib/tilt-shift/tilt-shift.d.ts +0 -9
  59. package/effects/lib/tone-mapping/tone-mapping.d.ts +0 -8
  60. package/esm2022/effects/lib/bloom/bloom.mjs +0 -44
  61. package/esm2022/effects/lib/brightness-contrast/brightness-contrast.mjs +0 -29
  62. package/esm2022/effects/lib/color-depth/color-depth.mjs +0 -29
  63. package/esm2022/effects/lib/depth/depth.mjs +0 -29
  64. package/esm2022/effects/lib/dot-screen/dot-screen.mjs +0 -29
  65. package/esm2022/effects/lib/hue-saturation/hue-saturation.mjs +0 -29
  66. package/esm2022/effects/lib/lut/lut.mjs +0 -60
  67. package/esm2022/effects/lib/noise/noise.mjs +0 -33
  68. package/esm2022/effects/lib/scanline/scanline.mjs +0 -33
  69. package/esm2022/effects/lib/sepia/sepia.mjs +0 -29
  70. package/esm2022/effects/lib/ssao/ssao.mjs +0 -102
  71. package/esm2022/effects/lib/tilt-shift/tilt-shift.mjs +0 -43
  72. package/esm2022/effects/lib/tone-mapping/tone-mapping.mjs +0 -39
  73. package/esm2022/effects/lib/vignette/vignette.mjs +0 -29
  74. package/esm2022/lib/effect-composer.mjs +0 -241
  75. package/esm2022/lib/effect.mjs +0 -80
  76. package/esm2022/selection/angular-three-postprocessing-selection.mjs +0 -5
  77. package/esm2022/selection/index.mjs +0 -3
  78. package/esm2022/selection/lib/select.mjs +0 -69
  79. package/esm2022/selection/lib/selection.mjs +0 -44
  80. package/fesm2022/angular-three-postprocessing-selection.mjs +0 -114
  81. package/fesm2022/angular-three-postprocessing-selection.mjs.map +0 -1
  82. package/lib/effect-composer.d.ts +0 -39
  83. package/lib/effect.d.ts +0 -22
  84. package/selection/README.md +0 -3
  85. package/selection/index.d.ts +0 -2
  86. package/selection/lib/select.d.ts +0 -14
  87. package/selection/lib/selection.d.ts +0 -18
@@ -1,21 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, Input } from '@angular/core';
3
- import { NgtArgs, NgtRxStore, NgtStore, injectNgtRef, startWithUndefined } from 'angular-three';
4
- import { NgtpEffect, simpleChangesToStateObject, componentInputsToCombinedStream, NGTP_EFFECT_COMPOSER_API } from 'angular-three-postprocessing';
5
- import { BlendFunction, BloomEffect, BrightnessContrastEffect, ColorDepthEffect, DepthEffect, DotScreenEffect, HueSaturationEffect, LUT3DEffect, NoiseEffect, ScanlineEffect, SepiaEffect, SSAOEffect, TiltShiftEffect, ToneMappingEffect, VignetteEffect } from 'postprocessing';
6
- import { combineLatest, map } from 'rxjs';
2
+ import { Component, CUSTOM_ELEMENTS_SCHEMA, inject, computed, effect, Input } from '@angular/core';
3
+ import { extend, NgtArgs, NgtSignalStore, injectNgtRef, NgtStore, requestAnimationInInjectionContext } from 'angular-three';
4
+ import { NgtpEffect, NGTP_EFFECT_COMPOSER_API } from 'angular-three-postprocessing';
5
+ import { BloomEffect, BlendFunction, BrightnessContrastEffect, ColorDepthEffect, DepthEffect, DotScreenEffect, HueSaturationEffect, LUT3DEffect, NoiseEffect, ScanlineEffect, SepiaEffect, ShockWaveEffect, SMAAEffect, SSAOEffect, TiltShiftEffect, ToneMappingEffect, VignetteEffect } from 'postprocessing';
7
6
 
7
+ extend({ BloomEffect });
8
8
  class NgtpBloom extends NgtpEffect {
9
9
  constructor() {
10
10
  super(...arguments);
11
- this.defaultBlendMode = BlendFunction.ADD;
12
- }
13
- get effectConstructor() {
14
- return BloomEffect;
11
+ this.defaultBlendFunction = BlendFunction.ADD;
15
12
  }
16
13
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpBloom, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
17
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpBloom, isStandalone: true, selector: "ngtp-bloom", inputs: { mipmapBlur: "mipmapBlur", luminanceThreshold: "luminanceThreshold", luminanceSmoothing: "luminanceSmoothing", intensity: "intensity", resolutionScale: "resolutionScale", resolutionX: "resolutionX", resolutionY: "resolutionY", width: "width", height: "height", kernelSize: "kernelSize" }, usesInheritance: true, ngImport: i0, template: `
18
- <ngt-primitive *args="[get('effect')]" ngtCompound />
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpBloom, isStandalone: true, selector: "ngtp-bloom", usesInheritance: true, ngImport: i0, template: `
15
+ <ngt-bloom-effect ngtCompound *args="args()" [ref]="effectRef" [camera]="camera()">
16
+ <ng-content />
17
+ </ngt-bloom-effect>
19
18
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
20
19
  }
21
20
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpBloom, decorators: [{
@@ -24,32 +23,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
24
23
  selector: 'ngtp-bloom',
25
24
  standalone: true,
26
25
  template: `
27
- <ngt-primitive *args="[get('effect')]" ngtCompound />
26
+ <ngt-bloom-effect ngtCompound *args="args()" [ref]="effectRef" [camera]="camera()">
27
+ <ng-content />
28
+ </ngt-bloom-effect>
28
29
  `,
29
30
  imports: [NgtArgs],
30
31
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
31
- inputs: [
32
- 'mipmapBlur',
33
- 'luminanceThreshold',
34
- 'luminanceSmoothing',
35
- 'intensity',
36
- 'resolutionScale',
37
- 'resolutionX',
38
- 'resolutionY',
39
- 'width',
40
- 'height',
41
- 'kernelSize',
42
- ],
43
32
  }]
44
33
  }] });
45
34
 
35
+ extend({ BrightnessContrastEffect });
46
36
  class NgtpBrightnessContrast extends NgtpEffect {
47
- get effectConstructor() {
48
- return BrightnessContrastEffect;
49
- }
50
37
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpBrightnessContrast, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
51
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpBrightnessContrast, isStandalone: true, selector: "ngtp-brightness-contrast", inputs: { brightness: "brightness", contrast: "contrast" }, usesInheritance: true, ngImport: i0, template: `
52
- <ngt-primitive *args="[get('effect')]" ngtCompound />
38
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpBrightnessContrast, isStandalone: true, selector: "ngtp-brightness-contrast", usesInheritance: true, ngImport: i0, template: `
39
+ <ngt-brightness-contrast-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
40
+ <ng-content />
41
+ </ngt-brightness-contrast-effect>
53
42
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
54
43
  }
55
44
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpBrightnessContrast, decorators: [{
@@ -58,21 +47,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
58
47
  selector: 'ngtp-brightness-contrast',
59
48
  standalone: true,
60
49
  template: `
61
- <ngt-primitive *args="[get('effect')]" ngtCompound />
50
+ <ngt-brightness-contrast-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
51
+ <ng-content />
52
+ </ngt-brightness-contrast-effect>
62
53
  `,
63
54
  imports: [NgtArgs],
64
55
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
65
- inputs: ['brightness', 'contrast'],
66
56
  }]
67
57
  }] });
68
58
 
59
+ extend({ ColorDepthEffect });
69
60
  class NgtpColorDepth extends NgtpEffect {
70
- get effectConstructor() {
71
- return ColorDepthEffect;
72
- }
73
61
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpColorDepth, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
74
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpColorDepth, isStandalone: true, selector: "ngtp-color-depth", inputs: { bits: "bits" }, usesInheritance: true, ngImport: i0, template: `
75
- <ngt-primitive *args="[get('effect')]" ngtCompound />
62
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpColorDepth, isStandalone: true, selector: "ngtp-color-depth", usesInheritance: true, ngImport: i0, template: `
63
+ <ngt-color-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
64
+ <ng-content />
65
+ </ngt-color-depth-effect>
76
66
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
77
67
  }
78
68
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpColorDepth, decorators: [{
@@ -81,21 +71,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
81
71
  selector: 'ngtp-color-depth',
82
72
  standalone: true,
83
73
  template: `
84
- <ngt-primitive *args="[get('effect')]" ngtCompound />
74
+ <ngt-color-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
75
+ <ng-content />
76
+ </ngt-color-depth-effect>
85
77
  `,
86
78
  imports: [NgtArgs],
87
79
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
88
- inputs: ['bits'],
89
80
  }]
90
81
  }] });
91
82
 
83
+ extend({ DepthEffect });
92
84
  class NgtpDepth extends NgtpEffect {
93
- get effectConstructor() {
94
- return DepthEffect;
95
- }
96
85
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpDepth, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
97
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpDepth, isStandalone: true, selector: "ngtp-depth", inputs: { inverted: "inverted" }, usesInheritance: true, ngImport: i0, template: `
98
- <ngt-primitive *args="[get('effect')]" ngtCompound />
86
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpDepth, isStandalone: true, selector: "ngtp-depth", usesInheritance: true, ngImport: i0, template: `
87
+ <ngt-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
88
+ <ng-content />
89
+ </ngt-depth-effect>
99
90
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
100
91
  }
101
92
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpDepth, decorators: [{
@@ -104,21 +95,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
104
95
  selector: 'ngtp-depth',
105
96
  standalone: true,
106
97
  template: `
107
- <ngt-primitive *args="[get('effect')]" ngtCompound />
98
+ <ngt-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
99
+ <ng-content />
100
+ </ngt-depth-effect>
108
101
  `,
109
102
  imports: [NgtArgs],
110
103
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
111
- inputs: ['inverted'],
112
104
  }]
113
105
  }] });
114
106
 
107
+ extend({ DotScreenEffect });
115
108
  class NgtpDotScreen extends NgtpEffect {
116
- get effectConstructor() {
117
- return DotScreenEffect;
118
- }
119
109
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpDotScreen, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
120
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpDotScreen, isStandalone: true, selector: "ngtp-dot-screen", inputs: { angle: "angle", scale: "scale" }, usesInheritance: true, ngImport: i0, template: `
121
- <ngt-primitive *args="[get('effect')]" ngtCompound />
110
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpDotScreen, isStandalone: true, selector: "ngtp-dot-screen", usesInheritance: true, ngImport: i0, template: `
111
+ <ngt-dot-screen-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
112
+ <ng-content />
113
+ </ngt-dot-screen-effect>
122
114
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
123
115
  }
124
116
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpDotScreen, decorators: [{
@@ -127,21 +119,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
127
119
  selector: 'ngtp-dot-screen',
128
120
  standalone: true,
129
121
  template: `
130
- <ngt-primitive *args="[get('effect')]" ngtCompound />
122
+ <ngt-dot-screen-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
123
+ <ng-content />
124
+ </ngt-dot-screen-effect>
131
125
  `,
132
126
  imports: [NgtArgs],
133
127
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
134
- inputs: ['angle', 'scale'],
135
128
  }]
136
129
  }] });
137
130
 
131
+ extend({ HueSaturationEffect });
138
132
  class NgtpHueSaturation extends NgtpEffect {
139
- get effectConstructor() {
140
- return HueSaturationEffect;
141
- }
142
133
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpHueSaturation, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
143
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpHueSaturation, isStandalone: true, selector: "ngtp-hue-saturation", inputs: { hue: "hue", saturation: "saturation" }, usesInheritance: true, ngImport: i0, template: `
144
- <ngt-primitive *args="[get('effect')]" ngtCompound />
134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpHueSaturation, isStandalone: true, selector: "ngtp-hue-saturation", usesInheritance: true, ngImport: i0, template: `
135
+ <ngt-hue-saturation-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
136
+ <ng-content />
137
+ </ngt-hue-saturation-effect>
145
138
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
146
139
  }
147
140
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpHueSaturation, decorators: [{
@@ -150,78 +143,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
150
143
  selector: 'ngtp-hue-saturation',
151
144
  standalone: true,
152
145
  template: `
153
- <ngt-primitive *args="[get('effect')]" ngtCompound />
146
+ <ngt-hue-saturation-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
147
+ <ng-content />
148
+ </ngt-hue-saturation-effect>
154
149
  `,
155
150
  imports: [NgtArgs],
156
151
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
157
- inputs: ['hue', 'saturation'],
158
152
  }]
159
153
  }] });
160
154
 
161
- class NgtpLUT extends NgtRxStore {
162
- constructor() {
163
- super(...arguments);
164
- this.store = inject(NgtStore);
165
- this.lutRef = injectNgtRef();
166
- }
155
+ class NgtpLUT extends NgtSignalStore {
167
156
  set lut(lut) {
168
157
  this.set({ lut });
169
158
  }
170
- ngOnChanges(changes) {
171
- this.set((s) => ({ ...s, ...simpleChangesToStateObject(changes, ['lutRef', 'lut']) }));
172
- }
173
- ngOnInit() {
174
- this.connect('effect', combineLatest([
175
- this.select('lut'),
176
- componentInputsToCombinedStream(this, (input) => input.propName !== 'lutRef' && input.propName !== 'lut'),
177
- ]).pipe(map(([lut, props]) => new LUT3DEffect(lut, props))));
178
- this.hold(combineLatest([
179
- this.select('lut'),
180
- this.select('effect'),
181
- this.select('tetrahedralInterpolation').pipe(startWithUndefined()),
182
- ]), ([lut, effect, tetrahedralInterpolation]) => {
183
- const invalidate = this.store.get('invalidate');
184
- if (lut)
185
- effect.lut = lut;
159
+ set blendFunction(blendFunction) {
160
+ this.set({ blendFunction });
161
+ }
162
+ set tetrahedralInterpolation(tetrahedralInterpolation) {
163
+ this.set({ tetrahedralInterpolation });
164
+ }
165
+ #lut;
166
+ #tetrahedralInterpolation;
167
+ #blendFunction;
168
+ #store;
169
+ #invalidate;
170
+ constructor() {
171
+ super();
172
+ this.effectRef = injectNgtRef();
173
+ this.#lut = this.select('lut');
174
+ this.#tetrahedralInterpolation = this.select('tetrahedralInterpolation');
175
+ this.#blendFunction = this.select('blendFunction');
176
+ this.#store = inject(NgtStore);
177
+ this.#invalidate = this.#store.select('invalidate');
178
+ this.effect = computed(() => new LUT3DEffect(this.#lut(), {
179
+ blendFunction: this.#blendFunction(),
180
+ tetrahedralInterpolation: this.#tetrahedralInterpolation(),
181
+ }));
182
+ requestAnimationInInjectionContext(() => {
183
+ this.#setProps();
184
+ });
185
+ }
186
+ #setProps() {
187
+ const trigger = computed(() => ({
188
+ effect: this.effect(),
189
+ invalidate: this.#invalidate(),
190
+ lut: this.#lut(),
191
+ tetrahedralInterpolation: this.#tetrahedralInterpolation(),
192
+ }));
193
+ effect(() => {
194
+ const { effect, lut, invalidate, tetrahedralInterpolation } = trigger();
195
+ if (!effect)
196
+ return;
186
197
  if (tetrahedralInterpolation)
187
198
  effect.tetrahedralInterpolation = tetrahedralInterpolation;
199
+ if (lut)
200
+ effect.lut = lut;
188
201
  invalidate();
189
202
  });
190
203
  }
191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpLUT, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
192
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpLUT, isStandalone: true, selector: "ngtp-lut", inputs: { blendFunction: "blendFunction", tetrahedralInterpolation: "tetrahedralInterpolation", lutRef: "lutRef", lut: "lut" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
193
- <ngt-primitive *args="[get('effect')]" [ref]="lutRef" />
194
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpLUT, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
205
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpLUT, isStandalone: true, selector: "ngtp-lut", inputs: { effectRef: "effectRef", lut: "lut", blendFunction: "blendFunction", tetrahedralInterpolation: "tetrahedralInterpolation" }, usesInheritance: true, ngImport: i0, template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
195
206
  }
196
207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpLUT, decorators: [{
197
208
  type: Component,
198
209
  args: [{
199
210
  selector: 'ngtp-lut',
200
211
  standalone: true,
201
- template: `
202
- <ngt-primitive *args="[get('effect')]" [ref]="lutRef" />
203
- `,
212
+ template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `,
204
213
  imports: [NgtArgs],
205
214
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
206
- inputs: ['blendFunction', 'tetrahedralInterpolation'],
207
215
  }]
208
- }], propDecorators: { lutRef: [{
216
+ }], ctorParameters: function () { return []; }, propDecorators: { effectRef: [{
209
217
  type: Input
210
218
  }], lut: [{
219
+ type: Input,
220
+ args: [{ required: true }]
221
+ }], blendFunction: [{
222
+ type: Input
223
+ }], tetrahedralInterpolation: [{
211
224
  type: Input
212
225
  }] } });
213
226
 
227
+ extend({ NoiseEffect });
214
228
  class NgtpNoise extends NgtpEffect {
215
229
  constructor() {
216
230
  super(...arguments);
217
- this.defaultBlendMode = BlendFunction.COLOR_DODGE;
218
- }
219
- get effectConstructor() {
220
- return NoiseEffect;
231
+ this.defaultBlendFunction = BlendFunction.COLOR_DODGE;
221
232
  }
222
233
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpNoise, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
223
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpNoise, isStandalone: true, selector: "ngtp-noise", inputs: { premultiply: "premultiply" }, usesInheritance: true, ngImport: i0, template: `
224
- <ngt-primitive *args="[get('effect')]" ngtCompound />
234
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpNoise, isStandalone: true, selector: "ngtp-noise", usesInheritance: true, ngImport: i0, template: `
235
+ <ngt-noise-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
236
+ <ng-content />
237
+ </ngt-noise-effect>
225
238
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
226
239
  }
227
240
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpNoise, decorators: [{
@@ -230,25 +243,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
230
243
  selector: 'ngtp-noise',
231
244
  standalone: true,
232
245
  template: `
233
- <ngt-primitive *args="[get('effect')]" ngtCompound />
246
+ <ngt-noise-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
247
+ <ng-content />
248
+ </ngt-noise-effect>
234
249
  `,
235
250
  imports: [NgtArgs],
236
251
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
237
- inputs: ['premultiply'],
238
252
  }]
239
253
  }] });
240
254
 
255
+ extend({ ScanlineEffect });
241
256
  class NgtpScanline extends NgtpEffect {
242
257
  constructor() {
243
258
  super(...arguments);
244
- this.defaultBlendMode = BlendFunction.OVERLAY;
245
- }
246
- get effectConstructor() {
247
- return ScanlineEffect;
259
+ this.defaultBlendFunction = BlendFunction.OVERLAY;
248
260
  }
249
261
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpScanline, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
250
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpScanline, isStandalone: true, selector: "ngtp-scanline", inputs: { density: "density" }, usesInheritance: true, ngImport: i0, template: `
251
- <ngt-primitive *args="[get('effect')]" ngtCompound />
262
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpScanline, isStandalone: true, selector: "ngtp-scanline", usesInheritance: true, ngImport: i0, template: `
263
+ <ngt-scanline-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
264
+ <ng-content />
265
+ </ngt-scanline-effect>
252
266
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
253
267
  }
254
268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpScanline, decorators: [{
@@ -257,21 +271,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
257
271
  selector: 'ngtp-scanline',
258
272
  standalone: true,
259
273
  template: `
260
- <ngt-primitive *args="[get('effect')]" ngtCompound />
274
+ <ngt-scanline-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
275
+ <ng-content />
276
+ </ngt-scanline-effect>
261
277
  `,
262
278
  imports: [NgtArgs],
263
279
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
264
- inputs: ['density'],
265
280
  }]
266
281
  }] });
267
282
 
283
+ extend({ SepiaEffect });
268
284
  class NgtpSepia extends NgtpEffect {
269
- get effectConstructor() {
270
- return SepiaEffect;
271
- }
272
285
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSepia, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
273
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpSepia, isStandalone: true, selector: "ngtp-sepia", inputs: { intensity: "intensity" }, usesInheritance: true, ngImport: i0, template: `
274
- <ngt-primitive *args="[get('effect')]" ngtCompound />
286
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpSepia, isStandalone: true, selector: "ngtp-sepia", usesInheritance: true, ngImport: i0, template: `
287
+ <ngt-sepia-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
288
+ <ng-content />
289
+ </ngt-sepia-effect>
275
290
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
276
291
  }
277
292
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSepia, decorators: [{
@@ -280,23 +295,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
280
295
  selector: 'ngtp-sepia',
281
296
  standalone: true,
282
297
  template: `
283
- <ngt-primitive *args="[get('effect')]" ngtCompound />
298
+ <ngt-sepia-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
299
+ <ng-content />
300
+ </ngt-sepia-effect>
284
301
  `,
285
302
  imports: [NgtArgs],
286
303
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
287
- inputs: ['intensity'],
288
304
  }]
289
305
  }] });
290
306
 
291
- class NgtpSSAO extends NgtRxStore {
292
- constructor() {
293
- super(...arguments);
294
- this.effectComposerApi = inject(NGTP_EFFECT_COMPOSER_API);
295
- this.ssaoRef = injectNgtRef();
307
+ extend({ ShockWaveEffect });
308
+ class NgtpShockWave extends NgtpEffect {
309
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpShockWave, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
310
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpShockWave, isStandalone: true, selector: "ngtp-noise", usesInheritance: true, ngImport: i0, template: `
311
+ <ngt-shock-wave-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
312
+ <ng-content />
313
+ </ngt-shock-wave-effect>
314
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
315
+ }
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpShockWave, decorators: [{
317
+ type: Component,
318
+ args: [{
319
+ selector: 'ngtp-noise',
320
+ standalone: true,
321
+ template: `
322
+ <ngt-shock-wave-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
323
+ <ng-content />
324
+ </ngt-shock-wave-effect>
325
+ `,
326
+ imports: [NgtArgs],
327
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
328
+ }]
329
+ }] });
330
+
331
+ extend({ SMAAEffect });
332
+ class NgtpSMAA extends NgtpEffect {
333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSMAA, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
334
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpSMAA, isStandalone: true, selector: "ngtp-SMAA", usesInheritance: true, ngImport: i0, template: `
335
+ <ngt-SMAA-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
336
+ <ng-content />
337
+ </ngt-SMAA-effect>
338
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
339
+ }
340
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSMAA, decorators: [{
341
+ type: Component,
342
+ args: [{
343
+ selector: 'ngtp-SMAA',
344
+ standalone: true,
345
+ template: `
346
+ <ngt-SMAA-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
347
+ <ng-content />
348
+ </ngt-SMAA-effect>
349
+ `,
350
+ imports: [NgtArgs],
351
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
352
+ }]
353
+ }] });
354
+
355
+ class NgtpSSAO extends NgtSignalStore {
356
+ set blendFunction(blendFunction) {
357
+ this.set({ blendFunction });
358
+ }
359
+ set distanceScaling(distanceScaling) {
360
+ this.set({ distanceScaling });
361
+ }
362
+ set depthAwareUpsampling(depthAwareUpsampling) {
363
+ this.set({ depthAwareUpsampling });
364
+ }
365
+ set normalDepthBuffer(normalDepthBuffer) {
366
+ this.set({ normalDepthBuffer });
367
+ }
368
+ set samples(samples) {
369
+ this.set({ samples });
370
+ }
371
+ set rings(rings) {
372
+ this.set({ rings });
296
373
  }
297
- initialize() {
298
- super.initialize();
299
- this.set({
374
+ set worldDistanceThreshold(worldDistanceThreshold) {
375
+ this.set({ worldDistanceThreshold });
376
+ }
377
+ set worldDistanceFalloff(worldDistanceFalloff) {
378
+ this.set({ worldDistanceFalloff });
379
+ }
380
+ set worldProximityThreshold(worldProximityThreshold) {
381
+ this.set({ worldProximityThreshold });
382
+ }
383
+ set worldProximityFalloff(worldProximityFalloff) {
384
+ this.set({ worldProximityFalloff });
385
+ }
386
+ set distanceThreshold(distanceThreshold) {
387
+ this.set({ distanceThreshold });
388
+ }
389
+ set distanceFalloff(distanceFalloff) {
390
+ this.set({ distanceFalloff });
391
+ }
392
+ set rangeThreshold(rangeThreshold) {
393
+ this.set({ rangeThreshold });
394
+ }
395
+ set rangeFalloff(rangeFalloff) {
396
+ this.set({ rangeFalloff });
397
+ }
398
+ set minRadiusScale(minRadiusScale) {
399
+ this.set({ minRadiusScale });
400
+ }
401
+ set luminanceInfluence(luminanceInfluence) {
402
+ this.set({ luminanceInfluence });
403
+ }
404
+ set radius(radius) {
405
+ this.set({ radius });
406
+ }
407
+ set intensity(intensity) {
408
+ this.set({ intensity });
409
+ }
410
+ set bias(bias) {
411
+ this.set({ bias });
412
+ }
413
+ set fade(fade) {
414
+ this.set({ fade });
415
+ }
416
+ set color(color) {
417
+ this.set({ color });
418
+ }
419
+ set resolutionScale(resolutionScale) {
420
+ this.set({ resolutionScale });
421
+ }
422
+ set resolutionX(resolutionX) {
423
+ this.set({ resolutionX });
424
+ }
425
+ set resolutionY(resolutionY) {
426
+ this.set({ resolutionY });
427
+ }
428
+ set width(width) {
429
+ this.set({ width });
430
+ }
431
+ set height(height) {
432
+ this.set({ height });
433
+ }
434
+ #effectComposerApi;
435
+ #state;
436
+ constructor() {
437
+ super({
300
438
  blendFunction: BlendFunction.MULTIPLY,
301
439
  samples: 30,
302
440
  rings: 4,
@@ -306,94 +444,108 @@ class NgtpSSAO extends NgtRxStore {
306
444
  rangeFalloff: 0.1,
307
445
  luminanceInfluence: 0.9,
308
446
  radius: 20,
309
- scale: 0.5,
310
447
  bias: 0.5,
311
448
  intensity: 1.0,
312
- color: null,
313
449
  depthAwareUpsampling: true,
314
450
  });
315
- }
316
- ngOnChanges(changes) {
317
- this.set((s) => ({
318
- ...s,
319
- ...simpleChangesToStateObject(changes, ['ssaoRef']),
320
- }));
321
- }
322
- ngOnInit() {
323
- this.connect('effect', combineLatest([
324
- this.effectComposerApi.select('entities'),
325
- this.effectComposerApi.select('activeCamera'),
326
- componentInputsToCombinedStream(this, (input) => input.propName !== 'ssaoRef'),
327
- ]).pipe(map(([[, normalPass, downSamplingPass], camera, props]) => {
328
- const { resolutionScale } = this.effectComposerApi;
329
- if (props['normalDepthBuffer'] === undefined) {
330
- props['normalDepthBuffer'] = downSamplingPass ? downSamplingPass.texture : null;
451
+ this.effectRef = injectNgtRef();
452
+ this.#effectComposerApi = inject(NGTP_EFFECT_COMPOSER_API);
453
+ this.#state = this.select();
454
+ this.effect = computed(() => {
455
+ const state = this.#state();
456
+ const { camera, normalPass, downSamplingPass, resolutionScale } = this.#effectComposerApi();
457
+ if (normalPass === null && downSamplingPass === null) {
458
+ console.error('Please enable the NormalPass in the NgtpEffectComposer in order to use NgtpSSAO.');
459
+ return {};
331
460
  }
332
- if (props['resolutionScale'] === undefined) {
333
- props['resolutionScale'] = resolutionScale ?? 1;
334
- }
335
- return new SSAOEffect(camera, normalPass && !downSamplingPass ? normalPass.texture : null, props);
336
- })));
461
+ return new SSAOEffect(camera, normalPass && !downSamplingPass ? normalPass.texture : null, {
462
+ ...state,
463
+ // @ts-expect-error
464
+ normalDepthBuffer: state.normalDepthBuffer || (downSamplingPass ? downSamplingPass.texture : null),
465
+ resolutionScale: state.resolutionScale || (resolutionScale ?? 1),
466
+ depthAwareUpsampling: state.depthAwareUpsampling ?? true,
467
+ });
468
+ });
337
469
  }
338
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSSAO, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
339
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpSSAO, isStandalone: true, selector: "ngtp-ssao", inputs: { blendFunction: "blendFunction", distanceScaling: "distanceScaling", depthAwareUpsampling: "depthAwareUpsampling", normalDepthBuffer: "normalDepthBuffer", samples: "samples", rings: "rings", worldDistanceThreshold: "worldDistanceThreshold", worldDistanceFalloff: "worldDistanceFalloff", worldProximityThreshold: "worldProximityThreshold", worldProximityFalloff: "worldProximityFalloff", distanceThreshold: "distanceThreshold", distanceFalloff: "distanceFalloff", rangeThreshold: "rangeThreshold", rangeFalloff: "rangeFalloff", minRadiusScale: "minRadiusScale", luminanceInfluence: "luminanceInfluence", radius: "radius", intensity: "intensity", bias: "bias", fade: "fade", color: "color", resolutionScale: "resolutionScale", resolutionX: "resolutionX", resolutionY: "resolutionY", width: "width", height: "height", ssaoRef: "ssaoRef" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
340
- <ngt-primitive *args="[get('effect')]" [ref]="ssaoRef" />
341
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
470
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSSAO, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
471
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpSSAO, isStandalone: true, selector: "ngtp-SSAO", inputs: { effectRef: "effectRef", blendFunction: "blendFunction", distanceScaling: "distanceScaling", depthAwareUpsampling: "depthAwareUpsampling", normalDepthBuffer: "normalDepthBuffer", samples: "samples", rings: "rings", worldDistanceThreshold: "worldDistanceThreshold", worldDistanceFalloff: "worldDistanceFalloff", worldProximityThreshold: "worldProximityThreshold", worldProximityFalloff: "worldProximityFalloff", distanceThreshold: "distanceThreshold", distanceFalloff: "distanceFalloff", rangeThreshold: "rangeThreshold", rangeFalloff: "rangeFalloff", minRadiusScale: "minRadiusScale", luminanceInfluence: "luminanceInfluence", radius: "radius", intensity: "intensity", bias: "bias", fade: "fade", color: "color", resolutionScale: "resolutionScale", resolutionX: "resolutionX", resolutionY: "resolutionY", width: "width", height: "height" }, usesInheritance: true, ngImport: i0, template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
342
472
  }
343
473
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpSSAO, decorators: [{
344
474
  type: Component,
345
475
  args: [{
346
- selector: 'ngtp-ssao',
476
+ selector: 'ngtp-SSAO',
347
477
  standalone: true,
348
- template: `
349
- <ngt-primitive *args="[get('effect')]" [ref]="ssaoRef" />
350
- `,
478
+ template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `,
351
479
  imports: [NgtArgs],
352
480
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
353
- inputs: [
354
- 'blendFunction',
355
- 'distanceScaling',
356
- 'depthAwareUpsampling',
357
- 'normalDepthBuffer',
358
- 'samples',
359
- 'rings',
360
- 'worldDistanceThreshold',
361
- 'worldDistanceFalloff',
362
- 'worldProximityThreshold',
363
- 'worldProximityFalloff',
364
- 'distanceThreshold',
365
- 'distanceFalloff',
366
- 'rangeThreshold',
367
- 'rangeFalloff',
368
- 'minRadiusScale',
369
- 'luminanceInfluence',
370
- 'radius',
371
- 'intensity',
372
- 'bias',
373
- 'fade',
374
- 'color',
375
- 'resolutionScale',
376
- 'resolutionX',
377
- 'resolutionY',
378
- 'width',
379
- 'height',
380
- ],
381
481
  }]
382
- }], propDecorators: { ssaoRef: [{
482
+ }], ctorParameters: function () { return []; }, propDecorators: { effectRef: [{
483
+ type: Input
484
+ }], blendFunction: [{
485
+ type: Input
486
+ }], distanceScaling: [{
487
+ type: Input
488
+ }], depthAwareUpsampling: [{
489
+ type: Input
490
+ }], normalDepthBuffer: [{
491
+ type: Input
492
+ }], samples: [{
493
+ type: Input
494
+ }], rings: [{
495
+ type: Input
496
+ }], worldDistanceThreshold: [{
497
+ type: Input
498
+ }], worldDistanceFalloff: [{
499
+ type: Input
500
+ }], worldProximityThreshold: [{
501
+ type: Input
502
+ }], worldProximityFalloff: [{
503
+ type: Input
504
+ }], distanceThreshold: [{
505
+ type: Input
506
+ }], distanceFalloff: [{
507
+ type: Input
508
+ }], rangeThreshold: [{
509
+ type: Input
510
+ }], rangeFalloff: [{
511
+ type: Input
512
+ }], minRadiusScale: [{
513
+ type: Input
514
+ }], luminanceInfluence: [{
515
+ type: Input
516
+ }], radius: [{
517
+ type: Input
518
+ }], intensity: [{
519
+ type: Input
520
+ }], bias: [{
521
+ type: Input
522
+ }], fade: [{
523
+ type: Input
524
+ }], color: [{
525
+ type: Input
526
+ }], resolutionScale: [{
527
+ type: Input
528
+ }], resolutionX: [{
529
+ type: Input
530
+ }], resolutionY: [{
531
+ type: Input
532
+ }], width: [{
533
+ type: Input
534
+ }], height: [{
383
535
  type: Input
384
536
  }] } });
385
537
 
538
+ extend({ TiltShiftEffect });
386
539
  class NgtpTiltShift extends NgtpEffect {
387
540
  constructor() {
388
541
  super(...arguments);
389
- this.defaultBlendMode = BlendFunction.ADD;
390
- }
391
- get effectConstructor() {
392
- return TiltShiftEffect;
542
+ this.defaultBlendFunction = BlendFunction.ADD;
393
543
  }
394
544
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpTiltShift, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
395
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpTiltShift, isStandalone: true, selector: "ngtp-tilt-shift", inputs: { offset: "offset", rotation: "rotation", focusArea: "focusArea", feather: "feather", bias: "bias", kernelSize: "kernelSize", resolutionScale: "resolutionScale", resolutionX: "resolutionX", resolutionY: "resolutionY" }, usesInheritance: true, ngImport: i0, template: `
396
- <ngt-primitive *args="[get('effect')]" ngtCompound />
545
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpTiltShift, isStandalone: true, selector: "ngtp-tilt-shift", usesInheritance: true, ngImport: i0, template: `
546
+ <ngt-tilt-shift-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
547
+ <ng-content />
548
+ </ngt-tilt-shift-effect>
397
549
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
398
550
  }
399
551
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpTiltShift, decorators: [{
@@ -402,31 +554,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
402
554
  selector: 'ngtp-tilt-shift',
403
555
  standalone: true,
404
556
  template: `
405
- <ngt-primitive *args="[get('effect')]" ngtCompound />
557
+ <ngt-tilt-shift-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
558
+ <ng-content />
559
+ </ngt-tilt-shift-effect>
406
560
  `,
407
561
  imports: [NgtArgs],
408
562
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
409
- inputs: [
410
- 'offset',
411
- 'rotation',
412
- 'focusArea',
413
- 'feather',
414
- 'bias',
415
- 'kernelSize',
416
- 'resolutionScale',
417
- 'resolutionX',
418
- 'resolutionY',
419
- ],
420
563
  }]
421
564
  }] });
422
565
 
566
+ extend({ ToneMappingEffect });
423
567
  class NgtpToneMapping extends NgtpEffect {
424
- get effectConstructor() {
425
- return ToneMappingEffect;
426
- }
427
568
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpToneMapping, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
428
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpToneMapping, isStandalone: true, selector: "ngtp-tone-mapping", inputs: { adaptive: "adaptive", mode: "mode", resolution: "resolution", maxLuminance: "maxLuminance", whitePoint: "whitePoint", middleGrey: "middleGrey", minLuminance: "minLuminance", averageLuminance: "averageLuminance", adaptationRate: "adaptationRate" }, usesInheritance: true, ngImport: i0, template: `
429
- <ngt-primitive *args="[get('effect')]" ngtCompound />
569
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpToneMapping, isStandalone: true, selector: "ngtp-tone-mapping", usesInheritance: true, ngImport: i0, template: `
570
+ <ngt-tone-mapping-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
571
+ <ng-content />
572
+ </ngt-tone-mapping-effect>
430
573
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
431
574
  }
432
575
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpToneMapping, decorators: [{
@@ -435,31 +578,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
435
578
  selector: 'ngtp-tone-mapping',
436
579
  standalone: true,
437
580
  template: `
438
- <ngt-primitive *args="[get('effect')]" ngtCompound />
581
+ <ngt-tone-mapping-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
582
+ <ng-content />
583
+ </ngt-tone-mapping-effect>
439
584
  `,
440
585
  imports: [NgtArgs],
441
586
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
442
- inputs: [
443
- 'adaptive',
444
- 'mode',
445
- 'resolution',
446
- 'maxLuminance',
447
- 'whitePoint',
448
- 'middleGrey',
449
- 'minLuminance',
450
- 'averageLuminance',
451
- 'adaptationRate',
452
- ],
453
587
  }]
454
588
  }] });
455
589
 
590
+ extend({ VignetteEffect });
456
591
  class NgtpVignette extends NgtpEffect {
457
- get effectConstructor() {
458
- return VignetteEffect;
459
- }
460
592
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpVignette, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
461
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpVignette, isStandalone: true, selector: "ngtp-vignette", inputs: { technique: "technique", eskil: "eskil", offset: "offset", darkness: "darkness" }, usesInheritance: true, ngImport: i0, template: `
462
- <ngt-primitive *args="[get('effect')]" ngtCompound />
593
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: NgtpVignette, isStandalone: true, selector: "ngtp-vignette", usesInheritance: true, ngImport: i0, template: `
594
+ <ngt-vignette-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
595
+ <ng-content />
596
+ </ngt-vignette-effect>
463
597
  `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] }); }
464
598
  }
465
599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NgtpVignette, decorators: [{
@@ -468,11 +602,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
468
602
  selector: 'ngtp-vignette',
469
603
  standalone: true,
470
604
  template: `
471
- <ngt-primitive *args="[get('effect')]" ngtCompound />
605
+ <ngt-vignette-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
606
+ <ng-content />
607
+ </ngt-vignette-effect>
472
608
  `,
473
609
  imports: [NgtArgs],
474
610
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
475
- inputs: ['technique', 'eskil', 'offset', 'darkness'],
476
611
  }]
477
612
  }] });
478
613
 
@@ -480,5 +615,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
480
615
  * Generated bundle index. Do not edit.
481
616
  */
482
617
 
483
- export { NgtpBloom, NgtpBrightnessContrast, NgtpColorDepth, NgtpDepth, NgtpDotScreen, NgtpHueSaturation, NgtpLUT, NgtpNoise, NgtpSSAO, NgtpScanline, NgtpSepia, NgtpTiltShift, NgtpToneMapping, NgtpVignette };
618
+ export { NgtpBloom, NgtpBrightnessContrast, NgtpColorDepth, NgtpDepth, NgtpDotScreen, NgtpHueSaturation, NgtpLUT, NgtpNoise, NgtpSMAA, NgtpSSAO, NgtpScanline, NgtpSepia, NgtpShockWave, NgtpTiltShift, NgtpToneMapping, NgtpVignette };
484
619
  //# sourceMappingURL=angular-three-postprocessing-effects.mjs.map