angular-three-postprocessing 1.5.2 → 1.6.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.
Files changed (79) hide show
  1. package/effects/lib/bloom/bloom.d.ts +1 -1
  2. package/effects/lib/brightness-contrast/brightness-contrast.d.ts +1 -1
  3. package/effects/lib/color-depth/color-depth.d.ts +1 -1
  4. package/effects/lib/depth/depth.d.ts +1 -1
  5. package/effects/lib/dot-screen/dot-screen.d.ts +1 -1
  6. package/effects/lib/hue-saturation/hue-saturation.d.ts +1 -1
  7. package/effects/lib/lut/lut.d.ts +1 -1
  8. package/effects/lib/noise/noise.d.ts +1 -1
  9. package/effects/lib/scanline/scanline.d.ts +1 -1
  10. package/effects/lib/sepia/sepia.d.ts +1 -1
  11. package/effects/lib/ssao/ssao.d.ts +1 -1
  12. package/effects/lib/tilt-shift/tilt-shift.d.ts +1 -1
  13. package/effects/lib/tone-mapping/tone-mapping.d.ts +1 -1
  14. package/effects/lib/vignette/vignette.d.ts +1 -1
  15. package/esm2022/effects/lib/bloom/bloom.mjs +44 -0
  16. package/esm2022/effects/lib/brightness-contrast/brightness-contrast.mjs +29 -0
  17. package/esm2022/effects/lib/color-depth/color-depth.mjs +29 -0
  18. package/esm2022/effects/lib/depth/depth.mjs +29 -0
  19. package/esm2022/effects/lib/dot-screen/dot-screen.mjs +29 -0
  20. package/esm2022/effects/lib/hue-saturation/hue-saturation.mjs +29 -0
  21. package/esm2022/effects/lib/lut/lut.mjs +60 -0
  22. package/esm2022/effects/lib/noise/noise.mjs +33 -0
  23. package/esm2022/effects/lib/scanline/scanline.mjs +33 -0
  24. package/esm2022/effects/lib/sepia/sepia.mjs +29 -0
  25. package/esm2022/effects/lib/ssao/ssao.mjs +102 -0
  26. package/esm2022/effects/lib/tilt-shift/tilt-shift.mjs +43 -0
  27. package/esm2022/effects/lib/tone-mapping/tone-mapping.mjs +39 -0
  28. package/esm2022/effects/lib/vignette/vignette.mjs +29 -0
  29. package/esm2022/lib/effect-composer.mjs +241 -0
  30. package/esm2022/lib/effect.mjs +80 -0
  31. package/esm2022/selection/lib/select.mjs +69 -0
  32. package/esm2022/selection/lib/selection.mjs +44 -0
  33. package/{fesm2020 → fesm2022}/angular-three-postprocessing-effects.mjs +70 -70
  34. package/{fesm2015 → fesm2022}/angular-three-postprocessing-effects.mjs.map +1 -1
  35. package/{fesm2015 → fesm2022}/angular-three-postprocessing-selection.mjs +10 -10
  36. package/{fesm2015 → fesm2022}/angular-three-postprocessing-selection.mjs.map +1 -1
  37. package/{fesm2020 → fesm2022}/angular-three-postprocessing.mjs +11 -11
  38. package/{fesm2020 → fesm2022}/angular-three-postprocessing.mjs.map +1 -1
  39. package/lib/effect-composer.d.ts +1 -1
  40. package/lib/effect.d.ts +1 -1
  41. package/package.json +20 -29
  42. package/plugin/package.json +1 -1
  43. package/plugin/src/generators/init/compat.js +1 -1
  44. package/plugin/src/generators/init/compat.js.map +1 -1
  45. package/plugin/src/generators/init/init.d.ts +1 -1
  46. package/plugin/src/generators/init/init.js +1 -1
  47. package/plugin/src/generators/init/init.js.map +1 -1
  48. package/selection/lib/select.d.ts +1 -1
  49. package/selection/lib/selection.d.ts +1 -1
  50. package/esm2020/effects/lib/bloom/bloom.mjs +0 -43
  51. package/esm2020/effects/lib/brightness-contrast/brightness-contrast.mjs +0 -28
  52. package/esm2020/effects/lib/color-depth/color-depth.mjs +0 -28
  53. package/esm2020/effects/lib/depth/depth.mjs +0 -28
  54. package/esm2020/effects/lib/dot-screen/dot-screen.mjs +0 -28
  55. package/esm2020/effects/lib/hue-saturation/hue-saturation.mjs +0 -28
  56. package/esm2020/effects/lib/lut/lut.mjs +0 -59
  57. package/esm2020/effects/lib/noise/noise.mjs +0 -32
  58. package/esm2020/effects/lib/scanline/scanline.mjs +0 -32
  59. package/esm2020/effects/lib/sepia/sepia.mjs +0 -28
  60. package/esm2020/effects/lib/ssao/ssao.mjs +0 -101
  61. package/esm2020/effects/lib/tilt-shift/tilt-shift.mjs +0 -42
  62. package/esm2020/effects/lib/tone-mapping/tone-mapping.mjs +0 -38
  63. package/esm2020/effects/lib/vignette/vignette.mjs +0 -28
  64. package/esm2020/lib/effect-composer.mjs +0 -240
  65. package/esm2020/lib/effect.mjs +0 -79
  66. package/esm2020/selection/lib/select.mjs +0 -68
  67. package/esm2020/selection/lib/selection.mjs +0 -43
  68. package/fesm2015/angular-three-postprocessing-effects.mjs +0 -481
  69. package/fesm2015/angular-three-postprocessing.mjs +0 -317
  70. package/fesm2015/angular-three-postprocessing.mjs.map +0 -1
  71. package/fesm2020/angular-three-postprocessing-effects.mjs.map +0 -1
  72. package/fesm2020/angular-three-postprocessing-selection.mjs +0 -114
  73. package/fesm2020/angular-three-postprocessing-selection.mjs.map +0 -1
  74. /package/{esm2020 → esm2022}/angular-three-postprocessing.mjs +0 -0
  75. /package/{esm2020 → esm2022}/effects/angular-three-postprocessing-effects.mjs +0 -0
  76. /package/{esm2020 → esm2022}/effects/index.mjs +0 -0
  77. /package/{esm2020 → esm2022}/index.mjs +0 -0
  78. /package/{esm2020 → esm2022}/selection/angular-three-postprocessing-selection.mjs +0 -0
  79. /package/{esm2020 → esm2022}/selection/index.mjs +0 -0
@@ -1,481 +0,0 @@
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';
7
-
8
- class NgtpBloom extends NgtpEffect {
9
- constructor() {
10
- super(...arguments);
11
- this.defaultBlendMode = BlendFunction.ADD;
12
- }
13
- get effectConstructor() {
14
- return BloomEffect;
15
- }
16
- }
17
- NgtpBloom.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpBloom, deps: null, target: i0.ɵɵFactoryTarget.Component });
18
- NgtpBloom.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", 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: `
19
- <ngt-primitive *args="[get('effect')]" ngtCompound />
20
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpBloom, decorators: [{
22
- type: Component,
23
- args: [{
24
- selector: 'ngtp-bloom',
25
- standalone: true,
26
- template: `
27
- <ngt-primitive *args="[get('effect')]" ngtCompound />
28
- `,
29
- imports: [NgtArgs],
30
- 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
- }]
44
- }] });
45
-
46
- class NgtpBrightnessContrast extends NgtpEffect {
47
- get effectConstructor() {
48
- return BrightnessContrastEffect;
49
- }
50
- }
51
- NgtpBrightnessContrast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpBrightnessContrast, deps: null, target: i0.ɵɵFactoryTarget.Component });
52
- NgtpBrightnessContrast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpBrightnessContrast, isStandalone: true, selector: "ngtp-brightness-contrast", inputs: { brightness: "brightness", contrast: "contrast" }, usesInheritance: true, ngImport: i0, template: `
53
- <ngt-primitive *args="[get('effect')]" ngtCompound />
54
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpBrightnessContrast, decorators: [{
56
- type: Component,
57
- args: [{
58
- selector: 'ngtp-brightness-contrast',
59
- standalone: true,
60
- template: `
61
- <ngt-primitive *args="[get('effect')]" ngtCompound />
62
- `,
63
- imports: [NgtArgs],
64
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
65
- inputs: ['brightness', 'contrast'],
66
- }]
67
- }] });
68
-
69
- class NgtpColorDepth extends NgtpEffect {
70
- get effectConstructor() {
71
- return ColorDepthEffect;
72
- }
73
- }
74
- NgtpColorDepth.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpColorDepth, deps: null, target: i0.ɵɵFactoryTarget.Component });
75
- NgtpColorDepth.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpColorDepth, isStandalone: true, selector: "ngtp-color-depth", inputs: { bits: "bits" }, usesInheritance: true, ngImport: i0, template: `
76
- <ngt-primitive *args="[get('effect')]" ngtCompound />
77
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpColorDepth, decorators: [{
79
- type: Component,
80
- args: [{
81
- selector: 'ngtp-color-depth',
82
- standalone: true,
83
- template: `
84
- <ngt-primitive *args="[get('effect')]" ngtCompound />
85
- `,
86
- imports: [NgtArgs],
87
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
88
- inputs: ['bits'],
89
- }]
90
- }] });
91
-
92
- class NgtpDepth extends NgtpEffect {
93
- get effectConstructor() {
94
- return DepthEffect;
95
- }
96
- }
97
- NgtpDepth.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpDepth, deps: null, target: i0.ɵɵFactoryTarget.Component });
98
- NgtpDepth.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpDepth, isStandalone: true, selector: "ngtp-depth", inputs: { inverted: "inverted" }, usesInheritance: true, ngImport: i0, template: `
99
- <ngt-primitive *args="[get('effect')]" ngtCompound />
100
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpDepth, decorators: [{
102
- type: Component,
103
- args: [{
104
- selector: 'ngtp-depth',
105
- standalone: true,
106
- template: `
107
- <ngt-primitive *args="[get('effect')]" ngtCompound />
108
- `,
109
- imports: [NgtArgs],
110
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
111
- inputs: ['inverted'],
112
- }]
113
- }] });
114
-
115
- class NgtpDotScreen extends NgtpEffect {
116
- get effectConstructor() {
117
- return DotScreenEffect;
118
- }
119
- }
120
- NgtpDotScreen.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpDotScreen, deps: null, target: i0.ɵɵFactoryTarget.Component });
121
- NgtpDotScreen.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpDotScreen, isStandalone: true, selector: "ngtp-dot-screen", inputs: { angle: "angle", scale: "scale" }, usesInheritance: true, ngImport: i0, template: `
122
- <ngt-primitive *args="[get('effect')]" ngtCompound />
123
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpDotScreen, decorators: [{
125
- type: Component,
126
- args: [{
127
- selector: 'ngtp-dot-screen',
128
- standalone: true,
129
- template: `
130
- <ngt-primitive *args="[get('effect')]" ngtCompound />
131
- `,
132
- imports: [NgtArgs],
133
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
134
- inputs: ['angle', 'scale'],
135
- }]
136
- }] });
137
-
138
- class NgtpHueSaturation extends NgtpEffect {
139
- get effectConstructor() {
140
- return HueSaturationEffect;
141
- }
142
- }
143
- NgtpHueSaturation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpHueSaturation, deps: null, target: i0.ɵɵFactoryTarget.Component });
144
- NgtpHueSaturation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpHueSaturation, isStandalone: true, selector: "ngtp-hue-saturation", inputs: { hue: "hue", saturation: "saturation" }, usesInheritance: true, ngImport: i0, template: `
145
- <ngt-primitive *args="[get('effect')]" ngtCompound />
146
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpHueSaturation, decorators: [{
148
- type: Component,
149
- args: [{
150
- selector: 'ngtp-hue-saturation',
151
- standalone: true,
152
- template: `
153
- <ngt-primitive *args="[get('effect')]" ngtCompound />
154
- `,
155
- imports: [NgtArgs],
156
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
157
- inputs: ['hue', 'saturation'],
158
- }]
159
- }] });
160
-
161
- class NgtpLUT extends NgtRxStore {
162
- constructor() {
163
- super(...arguments);
164
- this.store = inject(NgtStore);
165
- this.lutRef = injectNgtRef();
166
- }
167
- set lut(lut) {
168
- this.set({ lut });
169
- }
170
- ngOnChanges(changes) {
171
- this.set((s) => (Object.assign(Object.assign({}, 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;
186
- if (tetrahedralInterpolation)
187
- effect.tetrahedralInterpolation = tetrahedralInterpolation;
188
- invalidate();
189
- });
190
- }
191
- }
192
- NgtpLUT.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpLUT, deps: null, target: i0.ɵɵFactoryTarget.Component });
193
- NgtpLUT.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpLUT, isStandalone: true, selector: "ngtp-lut", inputs: { blendFunction: "blendFunction", tetrahedralInterpolation: "tetrahedralInterpolation", lutRef: "lutRef", lut: "lut" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
194
- <ngt-primitive *args="[get('effect')]" [ref]="lutRef" />
195
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpLUT, decorators: [{
197
- type: Component,
198
- args: [{
199
- selector: 'ngtp-lut',
200
- standalone: true,
201
- template: `
202
- <ngt-primitive *args="[get('effect')]" [ref]="lutRef" />
203
- `,
204
- imports: [NgtArgs],
205
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
206
- inputs: ['blendFunction', 'tetrahedralInterpolation'],
207
- }]
208
- }], propDecorators: { lutRef: [{
209
- type: Input
210
- }], lut: [{
211
- type: Input
212
- }] } });
213
-
214
- class NgtpNoise extends NgtpEffect {
215
- constructor() {
216
- super(...arguments);
217
- this.defaultBlendMode = BlendFunction.COLOR_DODGE;
218
- }
219
- get effectConstructor() {
220
- return NoiseEffect;
221
- }
222
- }
223
- NgtpNoise.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpNoise, deps: null, target: i0.ɵɵFactoryTarget.Component });
224
- NgtpNoise.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpNoise, isStandalone: true, selector: "ngtp-noise", inputs: { premultiply: "premultiply" }, usesInheritance: true, ngImport: i0, template: `
225
- <ngt-primitive *args="[get('effect')]" ngtCompound />
226
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
227
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpNoise, decorators: [{
228
- type: Component,
229
- args: [{
230
- selector: 'ngtp-noise',
231
- standalone: true,
232
- template: `
233
- <ngt-primitive *args="[get('effect')]" ngtCompound />
234
- `,
235
- imports: [NgtArgs],
236
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
237
- inputs: ['premultiply'],
238
- }]
239
- }] });
240
-
241
- class NgtpScanline extends NgtpEffect {
242
- constructor() {
243
- super(...arguments);
244
- this.defaultBlendMode = BlendFunction.OVERLAY;
245
- }
246
- get effectConstructor() {
247
- return ScanlineEffect;
248
- }
249
- }
250
- NgtpScanline.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpScanline, deps: null, target: i0.ɵɵFactoryTarget.Component });
251
- NgtpScanline.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpScanline, isStandalone: true, selector: "ngtp-scanline", inputs: { density: "density" }, usesInheritance: true, ngImport: i0, template: `
252
- <ngt-primitive *args="[get('effect')]" ngtCompound />
253
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpScanline, decorators: [{
255
- type: Component,
256
- args: [{
257
- selector: 'ngtp-scanline',
258
- standalone: true,
259
- template: `
260
- <ngt-primitive *args="[get('effect')]" ngtCompound />
261
- `,
262
- imports: [NgtArgs],
263
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
264
- inputs: ['density'],
265
- }]
266
- }] });
267
-
268
- class NgtpSepia extends NgtpEffect {
269
- get effectConstructor() {
270
- return SepiaEffect;
271
- }
272
- }
273
- NgtpSepia.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSepia, deps: null, target: i0.ɵɵFactoryTarget.Component });
274
- NgtpSepia.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpSepia, isStandalone: true, selector: "ngtp-sepia", inputs: { intensity: "intensity" }, usesInheritance: true, ngImport: i0, template: `
275
- <ngt-primitive *args="[get('effect')]" ngtCompound />
276
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSepia, decorators: [{
278
- type: Component,
279
- args: [{
280
- selector: 'ngtp-sepia',
281
- standalone: true,
282
- template: `
283
- <ngt-primitive *args="[get('effect')]" ngtCompound />
284
- `,
285
- imports: [NgtArgs],
286
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
287
- inputs: ['intensity'],
288
- }]
289
- }] });
290
-
291
- class NgtpSSAO extends NgtRxStore {
292
- constructor() {
293
- super(...arguments);
294
- this.effectComposerApi = inject(NGTP_EFFECT_COMPOSER_API);
295
- this.ssaoRef = injectNgtRef();
296
- }
297
- initialize() {
298
- super.initialize();
299
- this.set({
300
- blendFunction: BlendFunction.MULTIPLY,
301
- samples: 30,
302
- rings: 4,
303
- distanceThreshold: 1.0,
304
- distanceFalloff: 0.0,
305
- rangeThreshold: 0.5,
306
- rangeFalloff: 0.1,
307
- luminanceInfluence: 0.9,
308
- radius: 20,
309
- scale: 0.5,
310
- bias: 0.5,
311
- intensity: 1.0,
312
- color: null,
313
- depthAwareUpsampling: true,
314
- });
315
- }
316
- ngOnChanges(changes) {
317
- this.set((s) => (Object.assign(Object.assign({}, s), simpleChangesToStateObject(changes, ['ssaoRef']))));
318
- }
319
- ngOnInit() {
320
- this.connect('effect', combineLatest([
321
- this.effectComposerApi.select('entities'),
322
- this.effectComposerApi.select('activeCamera'),
323
- componentInputsToCombinedStream(this, (input) => input.propName !== 'ssaoRef'),
324
- ]).pipe(map(([[, normalPass, downSamplingPass], camera, props]) => {
325
- const { resolutionScale } = this.effectComposerApi;
326
- if (props['normalDepthBuffer'] === undefined) {
327
- props['normalDepthBuffer'] = downSamplingPass ? downSamplingPass.texture : null;
328
- }
329
- if (props['resolutionScale'] === undefined) {
330
- props['resolutionScale'] = resolutionScale !== null && resolutionScale !== void 0 ? resolutionScale : 1;
331
- }
332
- return new SSAOEffect(camera, normalPass && !downSamplingPass ? normalPass.texture : null, props);
333
- })));
334
- }
335
- }
336
- NgtpSSAO.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSSAO, deps: null, target: i0.ɵɵFactoryTarget.Component });
337
- NgtpSSAO.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", 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: `
338
- <ngt-primitive *args="[get('effect')]" [ref]="ssaoRef" />
339
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
340
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpSSAO, decorators: [{
341
- type: Component,
342
- args: [{
343
- selector: 'ngtp-ssao',
344
- standalone: true,
345
- template: `
346
- <ngt-primitive *args="[get('effect')]" [ref]="ssaoRef" />
347
- `,
348
- imports: [NgtArgs],
349
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
350
- inputs: [
351
- 'blendFunction',
352
- 'distanceScaling',
353
- 'depthAwareUpsampling',
354
- 'normalDepthBuffer',
355
- 'samples',
356
- 'rings',
357
- 'worldDistanceThreshold',
358
- 'worldDistanceFalloff',
359
- 'worldProximityThreshold',
360
- 'worldProximityFalloff',
361
- 'distanceThreshold',
362
- 'distanceFalloff',
363
- 'rangeThreshold',
364
- 'rangeFalloff',
365
- 'minRadiusScale',
366
- 'luminanceInfluence',
367
- 'radius',
368
- 'intensity',
369
- 'bias',
370
- 'fade',
371
- 'color',
372
- 'resolutionScale',
373
- 'resolutionX',
374
- 'resolutionY',
375
- 'width',
376
- 'height',
377
- ],
378
- }]
379
- }], propDecorators: { ssaoRef: [{
380
- type: Input
381
- }] } });
382
-
383
- class NgtpTiltShift extends NgtpEffect {
384
- constructor() {
385
- super(...arguments);
386
- this.defaultBlendMode = BlendFunction.ADD;
387
- }
388
- get effectConstructor() {
389
- return TiltShiftEffect;
390
- }
391
- }
392
- NgtpTiltShift.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpTiltShift, deps: null, target: i0.ɵɵFactoryTarget.Component });
393
- NgtpTiltShift.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", 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: `
394
- <ngt-primitive *args="[get('effect')]" ngtCompound />
395
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
396
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpTiltShift, decorators: [{
397
- type: Component,
398
- args: [{
399
- selector: 'ngtp-tilt-shift',
400
- standalone: true,
401
- template: `
402
- <ngt-primitive *args="[get('effect')]" ngtCompound />
403
- `,
404
- imports: [NgtArgs],
405
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
406
- inputs: [
407
- 'offset',
408
- 'rotation',
409
- 'focusArea',
410
- 'feather',
411
- 'bias',
412
- 'kernelSize',
413
- 'resolutionScale',
414
- 'resolutionX',
415
- 'resolutionY',
416
- ],
417
- }]
418
- }] });
419
-
420
- class NgtpToneMapping extends NgtpEffect {
421
- get effectConstructor() {
422
- return ToneMappingEffect;
423
- }
424
- }
425
- NgtpToneMapping.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpToneMapping, deps: null, target: i0.ɵɵFactoryTarget.Component });
426
- NgtpToneMapping.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", 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: `
427
- <ngt-primitive *args="[get('effect')]" ngtCompound />
428
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
429
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpToneMapping, decorators: [{
430
- type: Component,
431
- args: [{
432
- selector: 'ngtp-tone-mapping',
433
- standalone: true,
434
- template: `
435
- <ngt-primitive *args="[get('effect')]" ngtCompound />
436
- `,
437
- imports: [NgtArgs],
438
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
439
- inputs: [
440
- 'adaptive',
441
- 'mode',
442
- 'resolution',
443
- 'maxLuminance',
444
- 'whitePoint',
445
- 'middleGrey',
446
- 'minLuminance',
447
- 'averageLuminance',
448
- 'adaptationRate',
449
- ],
450
- }]
451
- }] });
452
-
453
- class NgtpVignette extends NgtpEffect {
454
- get effectConstructor() {
455
- return VignetteEffect;
456
- }
457
- }
458
- NgtpVignette.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpVignette, deps: null, target: i0.ɵɵFactoryTarget.Component });
459
- NgtpVignette.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: NgtpVignette, isStandalone: true, selector: "ngtp-vignette", inputs: { technique: "technique", eskil: "eskil", offset: "offset", darkness: "darkness" }, usesInheritance: true, ngImport: i0, template: `
460
- <ngt-primitive *args="[get('effect')]" ngtCompound />
461
- `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "[args]", inputs: ["args"] }] });
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: NgtpVignette, decorators: [{
463
- type: Component,
464
- args: [{
465
- selector: 'ngtp-vignette',
466
- standalone: true,
467
- template: `
468
- <ngt-primitive *args="[get('effect')]" ngtCompound />
469
- `,
470
- imports: [NgtArgs],
471
- schemas: [CUSTOM_ELEMENTS_SCHEMA],
472
- inputs: ['technique', 'eskil', 'offset', 'darkness'],
473
- }]
474
- }] });
475
-
476
- /**
477
- * Generated bundle index. Do not edit.
478
- */
479
-
480
- export { NgtpBloom, NgtpBrightnessContrast, NgtpColorDepth, NgtpDepth, NgtpDotScreen, NgtpHueSaturation, NgtpLUT, NgtpNoise, NgtpSSAO, NgtpScanline, NgtpSepia, NgtpTiltShift, NgtpToneMapping, NgtpVignette };
481
- //# sourceMappingURL=angular-three-postprocessing-effects.mjs.map