angular-three-postprocessing 4.0.0-next.99 → 4.0.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/README.md +80 -21
- package/fesm2022/angular-three-postprocessing-n8ao.mjs +42 -7
- package/fesm2022/angular-three-postprocessing-n8ao.mjs.map +1 -1
- package/fesm2022/angular-three-postprocessing.mjs +1185 -241
- package/fesm2022/angular-three-postprocessing.mjs.map +1 -1
- package/n8ao/README.md +143 -0
- package/package.json +7 -7
- package/types/angular-three-postprocessing-n8ao.d.ts +167 -0
- package/types/angular-three-postprocessing.d.ts +1887 -0
- package/index.d.ts +0 -3
- package/lib/effect-composer.d.ts +0 -38
- package/lib/effect.d.ts +0 -52
- package/lib/effects/ascii.d.ts +0 -24
- package/lib/effects/bloom.d.ts +0 -11
- package/lib/effects/brightness-contrast.d.ts +0 -16
- package/lib/effects/chromatic-abberation.d.ts +0 -17
- package/lib/effects/color-average.d.ts +0 -12
- package/lib/effects/color-depth.d.ts +0 -15
- package/lib/effects/depth-of-field.d.ts +0 -20
- package/lib/effects/depth.d.ts +0 -15
- package/lib/effects/dot-screen.d.ts +0 -16
- package/lib/effects/fxaa.d.ts +0 -14
- package/lib/effects/glitch.d.ts +0 -32
- package/lib/effects/god-rays.d.ts +0 -32
- package/lib/effects/grid.d.ts +0 -18
- package/lib/effects/hue-saturation.d.ts +0 -16
- package/lib/effects/index.d.ts +0 -29
- package/lib/effects/lens-flare.d.ts +0 -94
- package/lib/effects/lut.d.ts +0 -18
- package/lib/effects/noise.d.ts +0 -15
- package/lib/effects/outline.d.ts +0 -73
- package/lib/effects/pixelation.d.ts +0 -17
- package/lib/effects/scanline.d.ts +0 -18
- package/lib/effects/selective-bloom.d.ts +0 -42
- package/lib/effects/sepia.d.ts +0 -15
- package/lib/effects/shock-wave.d.ts +0 -12
- package/lib/effects/smaa.d.ts +0 -16
- package/lib/effects/tilt-shift-2.d.ts +0 -35
- package/lib/effects/tilt-shift.d.ts +0 -23
- package/lib/effects/tone-mapping.d.ts +0 -23
- package/lib/effects/vignette.d.ts +0 -18
- package/lib/effects/water.d.ts +0 -21
- package/n8ao/index.d.ts +0 -1
- package/n8ao/lib/n8ao.d.ts +0 -35
|
@@ -0,0 +1,1887 @@
|
|
|
1
|
+
import * as angular_three from 'angular-three';
|
|
2
|
+
import { NgtVector3, NgtVector2 } from 'angular-three';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { ElementRef } from '@angular/core';
|
|
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';
|
|
7
|
+
import * as THREE from 'three';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Injection token for providing default effect options.
|
|
11
|
+
*
|
|
12
|
+
* Use `injectDefaultEffectOptions` to inject default options in effect components.
|
|
13
|
+
* Use `provideDefaultEffectOptions` to provide default options for effects.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* @Component({
|
|
18
|
+
* providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.ADD, opacity: 0.5 })]
|
|
19
|
+
* })
|
|
20
|
+
* export class MyEffect {}
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const injectDefaultEffectOptions: {
|
|
24
|
+
(): {
|
|
25
|
+
blendFunction?: BlendFunction;
|
|
26
|
+
opacity?: number;
|
|
27
|
+
};
|
|
28
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
29
|
+
optional?: false;
|
|
30
|
+
} & {
|
|
31
|
+
injector?: _angular_core.Injector;
|
|
32
|
+
}): {
|
|
33
|
+
blendFunction?: BlendFunction;
|
|
34
|
+
opacity?: number;
|
|
35
|
+
};
|
|
36
|
+
(injectOptions: _angular_core.InjectOptions & {
|
|
37
|
+
injector?: _angular_core.Injector;
|
|
38
|
+
}): {
|
|
39
|
+
blendFunction?: BlendFunction;
|
|
40
|
+
opacity?: number;
|
|
41
|
+
} | null;
|
|
42
|
+
};
|
|
43
|
+
declare const provideDefaultEffectOptions: ((value: {
|
|
44
|
+
blendFunction?: BlendFunction;
|
|
45
|
+
opacity?: number;
|
|
46
|
+
} | (() => {
|
|
47
|
+
blendFunction?: BlendFunction;
|
|
48
|
+
opacity?: number;
|
|
49
|
+
})) => _angular_core.Provider) & ((value: {
|
|
50
|
+
blendFunction?: BlendFunction;
|
|
51
|
+
opacity?: number;
|
|
52
|
+
} | (() => {
|
|
53
|
+
blendFunction?: BlendFunction;
|
|
54
|
+
opacity?: number;
|
|
55
|
+
})) => _angular_core.Provider);
|
|
56
|
+
/**
|
|
57
|
+
* Component that applies blend mode settings to a postprocessing effect.
|
|
58
|
+
*
|
|
59
|
+
* This component is used internally by effect components to apply `blendFunction`
|
|
60
|
+
* and `opacity` values to the effect's blend mode.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```html
|
|
64
|
+
* <ngt-bloom-effect *args="[options()]">
|
|
65
|
+
* <ngtp-effect-blend-mode />
|
|
66
|
+
* </ngt-bloom-effect>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare class NgtpEffectBlendMode {
|
|
70
|
+
/** Reference to the parent NgtpEffect directive, if available */
|
|
71
|
+
effect: NgtpEffect | null;
|
|
72
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpEffectBlendMode, never>;
|
|
73
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpEffectBlendMode, "ngtp-effect-blend-mode", never, {}, {}, never, never, true, never>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Base directive for postprocessing effects that provides common functionality.
|
|
77
|
+
*
|
|
78
|
+
* This directive is used as a host directive by effect components to provide:
|
|
79
|
+
* - `blendFunction`: Controls how the effect blends with the scene
|
|
80
|
+
* - `opacity`: Controls the effect's opacity
|
|
81
|
+
* - Access to the camera and invalidate function from the store
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* @Component({
|
|
86
|
+
* hostDirectives: [{ directive: NgtpEffect, inputs: ['blendFunction', 'opacity'] }]
|
|
87
|
+
* })
|
|
88
|
+
* export class NgtpBloom {}
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
declare class NgtpEffect {
|
|
92
|
+
/** Default effect options injected from parent providers */
|
|
93
|
+
defaultEffectOptions: {
|
|
94
|
+
blendFunction?: BlendFunction;
|
|
95
|
+
opacity?: number;
|
|
96
|
+
} | null;
|
|
97
|
+
/**
|
|
98
|
+
* The blend function used to combine this effect with the scene.
|
|
99
|
+
* @see BlendFunction from postprocessing library
|
|
100
|
+
*/
|
|
101
|
+
blendFunction: _angular_core.InputSignal<BlendFunction | undefined>;
|
|
102
|
+
/**
|
|
103
|
+
* The opacity of the effect.
|
|
104
|
+
* @default undefined (uses effect's default)
|
|
105
|
+
*/
|
|
106
|
+
opacity: _angular_core.InputSignal<number | undefined>;
|
|
107
|
+
private store;
|
|
108
|
+
/** The current camera from the store */
|
|
109
|
+
camera: angular_three.DeepSignal<angular_three.NgtCamera>;
|
|
110
|
+
/** Function to invalidate the render loop, triggering a re-render */
|
|
111
|
+
invalidate: _angular_core.Signal<(frames?: number) => void>;
|
|
112
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpEffect, never>;
|
|
113
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgtpEffect, never, never, { "blendFunction": { "alias": "blendFunction"; "required": false; "isSignal": true; }; "opacity": { "alias": "opacity"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Configuration options for the effect composer.
|
|
118
|
+
*/
|
|
119
|
+
interface NgtpEffectComposerOptions {
|
|
120
|
+
/**
|
|
121
|
+
* Whether the effect composer is enabled.
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
enabled: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Whether to use a depth buffer.
|
|
127
|
+
* @default undefined
|
|
128
|
+
*/
|
|
129
|
+
depthBuffer?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Whether to enable the normal pass.
|
|
132
|
+
* Only used for SSGI currently, leave it disabled for everything else unless it's needed.
|
|
133
|
+
* @default undefined
|
|
134
|
+
*/
|
|
135
|
+
enableNormalPass?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Whether to use a stencil buffer.
|
|
138
|
+
* @default undefined
|
|
139
|
+
*/
|
|
140
|
+
stencilBuffer?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Whether to auto-clear before rendering.
|
|
143
|
+
* @default true
|
|
144
|
+
*/
|
|
145
|
+
autoClear: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Resolution scale for the effect composer.
|
|
148
|
+
* @default undefined
|
|
149
|
+
*/
|
|
150
|
+
resolutionScale?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Number of samples for multisampling anti-aliasing.
|
|
153
|
+
* Set to 0 to disable multisampling.
|
|
154
|
+
* @default 8
|
|
155
|
+
*/
|
|
156
|
+
multisampling: number;
|
|
157
|
+
/**
|
|
158
|
+
* The texture data type for the frame buffer.
|
|
159
|
+
* @default THREE.HalfFloatType
|
|
160
|
+
*/
|
|
161
|
+
frameBufferType: THREE.TextureDataType;
|
|
162
|
+
/**
|
|
163
|
+
* The render priority for the effect composer.
|
|
164
|
+
* Higher values render later.
|
|
165
|
+
* @default 1
|
|
166
|
+
*/
|
|
167
|
+
renderPriority: number;
|
|
168
|
+
/**
|
|
169
|
+
* Custom camera to use for rendering effects.
|
|
170
|
+
* If not provided, uses the default camera from the store.
|
|
171
|
+
* @default undefined
|
|
172
|
+
*/
|
|
173
|
+
camera?: THREE.Camera;
|
|
174
|
+
/**
|
|
175
|
+
* Custom scene to use for rendering effects.
|
|
176
|
+
* If not provided, uses the default scene from the store.
|
|
177
|
+
* @default undefined
|
|
178
|
+
*/
|
|
179
|
+
scene?: THREE.Scene;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Angular component that manages postprocessing effects for a Three.js scene.
|
|
183
|
+
*
|
|
184
|
+
* The effect composer wraps the postprocessing library's EffectComposer and provides
|
|
185
|
+
* a declarative way to add effects to your scene. Effects are added as children of
|
|
186
|
+
* this component and are automatically composed into an effect pass.
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```html
|
|
190
|
+
* <ngtp-effect-composer>
|
|
191
|
+
* <ngtp-bloom [options]="{ intensity: 1, luminanceThreshold: 0.9 }" />
|
|
192
|
+
* <ngtp-vignette [options]="{ darkness: 0.5 }" />
|
|
193
|
+
* </ngtp-effect-composer>
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```html
|
|
198
|
+
* <!-- With custom options -->
|
|
199
|
+
* <ngtp-effect-composer [options]="{ multisampling: 4, autoClear: false }">
|
|
200
|
+
* <ngtp-smaa />
|
|
201
|
+
* <ngtp-tone-mapping />
|
|
202
|
+
* </ngtp-effect-composer>
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
declare class NgtpEffectComposer {
|
|
206
|
+
/**
|
|
207
|
+
* Configuration options for the effect composer.
|
|
208
|
+
* @see NgtpEffectComposerOptions
|
|
209
|
+
*/
|
|
210
|
+
options: _angular_core.InputSignalWithTransform<NgtpEffectComposerOptions, "" | Partial<NgtpEffectComposerOptions>>;
|
|
211
|
+
private store;
|
|
212
|
+
private depthBuffer;
|
|
213
|
+
private stencilBuffer;
|
|
214
|
+
private multisampling;
|
|
215
|
+
private frameBufferType;
|
|
216
|
+
private enableNormalPass;
|
|
217
|
+
private resolutionScale;
|
|
218
|
+
private enabled;
|
|
219
|
+
private renderPriority;
|
|
220
|
+
/**
|
|
221
|
+
* The scene used for rendering effects.
|
|
222
|
+
* Uses custom scene from options if provided, otherwise uses the store's scene.
|
|
223
|
+
*/
|
|
224
|
+
scene: _angular_core.Signal<THREE.Scene<THREE.Object3DEventMap>>;
|
|
225
|
+
/**
|
|
226
|
+
* The camera used for rendering effects.
|
|
227
|
+
* Uses custom camera from options if provided, otherwise uses the store's camera.
|
|
228
|
+
*/
|
|
229
|
+
camera: _angular_core.Signal<THREE.Camera>;
|
|
230
|
+
private groupRef;
|
|
231
|
+
/**
|
|
232
|
+
* Computed render priority based on whether the composer is enabled.
|
|
233
|
+
* Returns 0 when disabled, otherwise returns the configured renderPriority.
|
|
234
|
+
*/
|
|
235
|
+
private priority;
|
|
236
|
+
/**
|
|
237
|
+
* Creates and configures the effect composer with render pass, normal pass,
|
|
238
|
+
* and depth downsampling pass based on options.
|
|
239
|
+
*/
|
|
240
|
+
private composerData;
|
|
241
|
+
/**
|
|
242
|
+
* The underlying postprocessing EffectComposer instance.
|
|
243
|
+
* Can be used to access the composer directly for advanced use cases.
|
|
244
|
+
*/
|
|
245
|
+
effectComposer: _angular_core.Signal<EffectComposer>;
|
|
246
|
+
constructor();
|
|
247
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpEffectComposer, never>;
|
|
248
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpEffectComposer, "ngtp-effect-composer", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Configuration options for the ASCII effect.
|
|
253
|
+
*/
|
|
254
|
+
interface ASCIIEffectOptions {
|
|
255
|
+
/**
|
|
256
|
+
* The font family to use for rendering characters.
|
|
257
|
+
* @default 'arial'
|
|
258
|
+
*/
|
|
259
|
+
font?: string;
|
|
260
|
+
/**
|
|
261
|
+
* The character set to use for rendering, ordered from darkest to brightest.
|
|
262
|
+
* @default " .:,'-^=*+?!|0#X%WM@"
|
|
263
|
+
*/
|
|
264
|
+
characters?: string;
|
|
265
|
+
/**
|
|
266
|
+
* The font size in pixels for the character texture.
|
|
267
|
+
* @default 54
|
|
268
|
+
*/
|
|
269
|
+
fontSize?: number;
|
|
270
|
+
/**
|
|
271
|
+
* The size of each cell in pixels.
|
|
272
|
+
* @default 16
|
|
273
|
+
*/
|
|
274
|
+
cellSize?: number;
|
|
275
|
+
/**
|
|
276
|
+
* The color of the ASCII characters in hex format.
|
|
277
|
+
* @default '#ffffff'
|
|
278
|
+
*/
|
|
279
|
+
color?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Whether to invert the brightness mapping.
|
|
282
|
+
* @default false
|
|
283
|
+
*/
|
|
284
|
+
invert?: boolean;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* A postprocessing effect that renders the scene as ASCII art.
|
|
288
|
+
*
|
|
289
|
+
* This effect converts the rendered scene into a grid of ASCII characters,
|
|
290
|
+
* where the character used depends on the brightness of the underlying pixels.
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```typescript
|
|
294
|
+
* const effect = new ASCIIEffect({
|
|
295
|
+
* cellSize: 12,
|
|
296
|
+
* color: '#00ff00',
|
|
297
|
+
* characters: ' .:-=+*#%@'
|
|
298
|
+
* });
|
|
299
|
+
* ```
|
|
300
|
+
*/
|
|
301
|
+
declare class ASCIIEffect extends Effect {
|
|
302
|
+
constructor({ font, characters, fontSize, cellSize, color, invert, }?: ASCIIEffectOptions);
|
|
303
|
+
/**
|
|
304
|
+
* Creates a texture containing all the ASCII characters.
|
|
305
|
+
*
|
|
306
|
+
* Draws each character in the character set onto a canvas and creates
|
|
307
|
+
* a texture that can be sampled in the shader.
|
|
308
|
+
*
|
|
309
|
+
* @param characters - The character set to render
|
|
310
|
+
* @param font - The font family to use
|
|
311
|
+
* @param fontSize - The font size in pixels
|
|
312
|
+
* @returns A Three.js texture containing the rendered characters
|
|
313
|
+
*/
|
|
314
|
+
createCharactersTexture(characters: string, font: string, fontSize: number): THREE.Texture;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Angular component that applies an ASCII art postprocessing effect to the scene.
|
|
318
|
+
*
|
|
319
|
+
* Renders the scene as ASCII characters, where character selection is based on
|
|
320
|
+
* the brightness of the underlying pixels.
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* ```html
|
|
324
|
+
* <ngtp-effect-composer>
|
|
325
|
+
* <ngtp-ascii [options]="{ cellSize: 12, color: '#00ff00' }" />
|
|
326
|
+
* </ngtp-effect-composer>
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
declare class NgtpASCII {
|
|
330
|
+
/**
|
|
331
|
+
* Configuration options for the ASCII effect.
|
|
332
|
+
* @see ASCIIEffectOptions
|
|
333
|
+
*/
|
|
334
|
+
options: _angular_core.InputSignalWithTransform<ASCIIEffectOptions, "" | Partial<ASCIIEffectOptions>>;
|
|
335
|
+
/** The underlying ASCIIEffect instance */
|
|
336
|
+
effect: _angular_core.Signal<ASCIIEffect>;
|
|
337
|
+
constructor();
|
|
338
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpASCII, never>;
|
|
339
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpASCII, "ngtp-ascii", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Angular component that applies a bloom postprocessing effect to the scene.
|
|
344
|
+
*
|
|
345
|
+
* The bloom effect creates a glow around bright areas of the scene, simulating
|
|
346
|
+
* the way bright light bleeds in cameras and the human eye.
|
|
347
|
+
*
|
|
348
|
+
* @example
|
|
349
|
+
* ```html
|
|
350
|
+
* <ngtp-effect-composer>
|
|
351
|
+
* <ngtp-bloom [options]="{ intensity: 1, luminanceThreshold: 0.9 }" />
|
|
352
|
+
* </ngtp-effect-composer>
|
|
353
|
+
* ```
|
|
354
|
+
*
|
|
355
|
+
* @example
|
|
356
|
+
* ```html
|
|
357
|
+
* <!-- With custom blend function -->
|
|
358
|
+
* <ngtp-effect-composer>
|
|
359
|
+
* <ngtp-bloom
|
|
360
|
+
* [blendFunction]="BlendFunction.SCREEN"
|
|
361
|
+
* [options]="{ intensity: 0.5, luminanceSmoothing: 0.9 }"
|
|
362
|
+
* />
|
|
363
|
+
* </ngtp-effect-composer>
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
declare class NgtpBloom {
|
|
367
|
+
/**
|
|
368
|
+
* Configuration options for the bloom effect.
|
|
369
|
+
* Accepts all BloomEffectOptions except blendFunction (use the blendFunction input instead).
|
|
370
|
+
* @see BloomEffectOptions from postprocessing library
|
|
371
|
+
*/
|
|
372
|
+
options: _angular_core.InputSignal<Omit<BloomEffectOptions, "blendFunction">>;
|
|
373
|
+
/** Reference to the host NgtpEffect directive */
|
|
374
|
+
protected hostEffect: NgtpEffect;
|
|
375
|
+
effectRef: _angular_core.Signal<ElementRef<BloomEffect> | undefined>;
|
|
376
|
+
constructor();
|
|
377
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpBloom, never>;
|
|
378
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpBloom, "ngtp-bloom", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Configuration options for the brightness/contrast effect.
|
|
383
|
+
* Derived from BrightnessContrastEffect constructor parameters.
|
|
384
|
+
*/
|
|
385
|
+
type BrightnessEffectOptions = NonNullable<ConstructorParameters<typeof BrightnessContrastEffect>[0]>;
|
|
386
|
+
/**
|
|
387
|
+
* Angular component that applies brightness and contrast adjustments to the scene.
|
|
388
|
+
*
|
|
389
|
+
* This effect allows you to modify the overall brightness and contrast of the
|
|
390
|
+
* rendered scene as a postprocessing step.
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* ```html
|
|
394
|
+
* <ngtp-effect-composer>
|
|
395
|
+
* <ngtp-brightness-contrast [options]="{ brightness: 0.1, contrast: 0.2 }" />
|
|
396
|
+
* </ngtp-effect-composer>
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
declare class NgtpBrightnessContrast {
|
|
400
|
+
/**
|
|
401
|
+
* Configuration options for the brightness/contrast effect.
|
|
402
|
+
* @see BrightnessEffectOptions
|
|
403
|
+
*/
|
|
404
|
+
options: _angular_core.InputSignal<Omit<{
|
|
405
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
406
|
+
brightness?: number;
|
|
407
|
+
contrast?: number;
|
|
408
|
+
}, "blendFunction">>;
|
|
409
|
+
/** Reference to the host NgtpEffect directive */
|
|
410
|
+
protected hostEffect: NgtpEffect;
|
|
411
|
+
effectRef: _angular_core.Signal<ElementRef<BrightnessContrastEffect> | undefined>;
|
|
412
|
+
constructor();
|
|
413
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpBrightnessContrast, never>;
|
|
414
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpBrightnessContrast, "ngtp-brightness-contrast", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Configuration options for the chromatic aberration effect.
|
|
419
|
+
* Derived from ChromaticAberrationEffect constructor parameters.
|
|
420
|
+
*/
|
|
421
|
+
type ChromaticAberrationEffectOptions = Partial<NonNullable<ConstructorParameters<typeof ChromaticAberrationEffect>[0]>>;
|
|
422
|
+
/**
|
|
423
|
+
* Angular component that applies a chromatic aberration effect to the scene.
|
|
424
|
+
*
|
|
425
|
+
* Chromatic aberration simulates the color fringing that occurs in real camera lenses
|
|
426
|
+
* when different wavelengths of light are focused at different distances.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```html
|
|
430
|
+
* <ngtp-effect-composer>
|
|
431
|
+
* <ngtp-chromatic-aberration [options]="{ offset: [0.002, 0.002] }" />
|
|
432
|
+
* </ngtp-effect-composer>
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
435
|
+
declare class NgtpChromaticAberration {
|
|
436
|
+
/**
|
|
437
|
+
* Configuration options for the chromatic aberration effect.
|
|
438
|
+
* @see ChromaticAberrationEffectOptions
|
|
439
|
+
*/
|
|
440
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
441
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
442
|
+
offset?: THREE.Vector2;
|
|
443
|
+
radialModulation: boolean;
|
|
444
|
+
modulationOffset: number;
|
|
445
|
+
}>, "blendFunction">>;
|
|
446
|
+
/** Reference to the host NgtpEffect directive */
|
|
447
|
+
protected hostEffect: NgtpEffect;
|
|
448
|
+
effectRef: _angular_core.Signal<ElementRef<ChromaticAberrationEffect> | undefined>;
|
|
449
|
+
constructor();
|
|
450
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpChromaticAberration, never>;
|
|
451
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpChromaticAberration, "ngtp-chromatic-aberration", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Angular component that applies a color averaging effect to the scene.
|
|
456
|
+
*
|
|
457
|
+
* This effect converts the scene to grayscale by averaging the color channels,
|
|
458
|
+
* which can create a desaturated or monochrome look.
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* ```html
|
|
462
|
+
* <ngtp-effect-composer>
|
|
463
|
+
* <ngtp-color-average />
|
|
464
|
+
* </ngtp-effect-composer>
|
|
465
|
+
* ```
|
|
466
|
+
*
|
|
467
|
+
* @example
|
|
468
|
+
* ```html
|
|
469
|
+
* <!-- With custom blend function -->
|
|
470
|
+
* <ngtp-effect-composer>
|
|
471
|
+
* <ngtp-color-average [options]="{ blendFunction: BlendFunction.MULTIPLY }" />
|
|
472
|
+
* </ngtp-effect-composer>
|
|
473
|
+
* ```
|
|
474
|
+
*/
|
|
475
|
+
declare class NgtpColorAverage {
|
|
476
|
+
/**
|
|
477
|
+
* Configuration options for the color average effect.
|
|
478
|
+
* @default { blendFunction: BlendFunction.NORMAL }
|
|
479
|
+
*/
|
|
480
|
+
options: _angular_core.InputSignalWithTransform<{
|
|
481
|
+
blendFunction: BlendFunction;
|
|
482
|
+
}, "" | Partial<{
|
|
483
|
+
blendFunction: BlendFunction;
|
|
484
|
+
}>>;
|
|
485
|
+
effectRef: _angular_core.Signal<ElementRef<ColorAverageEffect> | undefined>;
|
|
486
|
+
constructor();
|
|
487
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpColorAverage, never>;
|
|
488
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpColorAverage, "ngtp-color-average", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Configuration options for the color depth effect.
|
|
493
|
+
* Derived from ColorDepthEffect constructor parameters.
|
|
494
|
+
*/
|
|
495
|
+
type ColorDepthEffectOptions = Partial<NonNullable<ConstructorParameters<typeof ColorDepthEffect>[0]>>;
|
|
496
|
+
/**
|
|
497
|
+
* Angular component that applies a color depth reduction effect to the scene.
|
|
498
|
+
*
|
|
499
|
+
* This effect reduces the number of colors in the scene, creating a posterized
|
|
500
|
+
* or retro look similar to older display hardware with limited color palettes.
|
|
501
|
+
*
|
|
502
|
+
* @example
|
|
503
|
+
* ```html
|
|
504
|
+
* <ngtp-effect-composer>
|
|
505
|
+
* <ngtp-color-depth [options]="{ bits: 4 }" />
|
|
506
|
+
* </ngtp-effect-composer>
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
509
|
+
declare class NgtpColorDepth {
|
|
510
|
+
/**
|
|
511
|
+
* Configuration options for the color depth effect.
|
|
512
|
+
* @see ColorDepthEffectOptions
|
|
513
|
+
*/
|
|
514
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
515
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
516
|
+
bits?: number;
|
|
517
|
+
}>, "blendFunction">>;
|
|
518
|
+
/** Reference to the host NgtpEffect directive */
|
|
519
|
+
protected hostEffect: NgtpEffect;
|
|
520
|
+
effectRef: _angular_core.Signal<ElementRef<ColorDepthEffect> | undefined>;
|
|
521
|
+
constructor();
|
|
522
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpColorDepth, never>;
|
|
523
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpColorDepth, "ngtp-color-depth", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Configuration options for the depth effect.
|
|
528
|
+
* Derived from DepthEffect constructor parameters.
|
|
529
|
+
*/
|
|
530
|
+
type DepthEffectOptions = Partial<NonNullable<ConstructorParameters<typeof DepthEffect>[0]>>;
|
|
531
|
+
/**
|
|
532
|
+
* Angular component that visualizes the scene's depth buffer.
|
|
533
|
+
*
|
|
534
|
+
* This effect renders the depth information of the scene, which can be useful
|
|
535
|
+
* for debugging or creating stylized depth-based visualizations.
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* ```html
|
|
539
|
+
* <ngtp-effect-composer>
|
|
540
|
+
* <ngtp-depth [options]="{ inverted: true }" />
|
|
541
|
+
* </ngtp-effect-composer>
|
|
542
|
+
* ```
|
|
543
|
+
*/
|
|
544
|
+
declare class NgtpDepth {
|
|
545
|
+
/**
|
|
546
|
+
* Configuration options for the depth effect.
|
|
547
|
+
* @see DepthEffectOptions
|
|
548
|
+
*/
|
|
549
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
550
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
551
|
+
inverted?: boolean;
|
|
552
|
+
}>, "blendFunction">>;
|
|
553
|
+
/** Reference to the host NgtpEffect directive */
|
|
554
|
+
protected hostEffect: NgtpEffect;
|
|
555
|
+
effectRef: _angular_core.Signal<ElementRef<DepthEffect> | undefined>;
|
|
556
|
+
constructor();
|
|
557
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpDepth, never>;
|
|
558
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpDepth, "ngtp-depth", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Configuration options for the depth of field effect.
|
|
563
|
+
* Extends DepthOfFieldEffect options with additional target and depth texture support.
|
|
564
|
+
*/
|
|
565
|
+
type DOFOptions = NonNullable<ConstructorParameters<typeof DepthOfFieldEffect>[1]> & Partial<{
|
|
566
|
+
target: NgtVector3;
|
|
567
|
+
depthTexture: {
|
|
568
|
+
texture: THREE.Texture;
|
|
569
|
+
packing: THREE.DepthPackingStrategies;
|
|
570
|
+
};
|
|
571
|
+
}>;
|
|
572
|
+
/**
|
|
573
|
+
* Angular component that applies a depth of field effect to the scene.
|
|
574
|
+
*
|
|
575
|
+
* This effect simulates the focus behavior of real camera lenses, blurring
|
|
576
|
+
* objects that are outside the focal range. Can be configured for autofocus
|
|
577
|
+
* by providing a target position.
|
|
578
|
+
*
|
|
579
|
+
* @example
|
|
580
|
+
* ```html
|
|
581
|
+
* <ngtp-effect-composer>
|
|
582
|
+
* <ngtp-depth-of-field [options]="{ focusDistance: 0, focalLength: 0.02, bokehScale: 2 }" />
|
|
583
|
+
* </ngtp-effect-composer>
|
|
584
|
+
* ```
|
|
585
|
+
*
|
|
586
|
+
* @example
|
|
587
|
+
* ```html
|
|
588
|
+
* <!-- With autofocus target -->
|
|
589
|
+
* <ngtp-effect-composer>
|
|
590
|
+
* <ngtp-depth-of-field [options]="{ target: [0, 0, 5], bokehScale: 3 }" />
|
|
591
|
+
* </ngtp-effect-composer>
|
|
592
|
+
* ```
|
|
593
|
+
*/
|
|
594
|
+
declare class NgtpDepthOfField {
|
|
595
|
+
/**
|
|
596
|
+
* Configuration options for the depth of field effect.
|
|
597
|
+
* @see DOFOptions
|
|
598
|
+
*/
|
|
599
|
+
options: _angular_core.InputSignal<DOFOptions>;
|
|
600
|
+
private effectComposer;
|
|
601
|
+
/**
|
|
602
|
+
* Creates the DepthOfFieldEffect instance with the configured options.
|
|
603
|
+
* Enables autofocus if a target is provided and applies depth texture settings.
|
|
604
|
+
*/
|
|
605
|
+
effect: _angular_core.Signal<DepthOfFieldEffect>;
|
|
606
|
+
constructor();
|
|
607
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpDepthOfField, never>;
|
|
608
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpDepthOfField, "ngtp-depth-of-field", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Configuration options for the dot screen effect.
|
|
613
|
+
* Derived from DotScreenEffect constructor parameters.
|
|
614
|
+
*/
|
|
615
|
+
type DotScreenEffectOptions = Partial<NonNullable<ConstructorParameters<typeof DotScreenEffect>[0]>>;
|
|
616
|
+
/**
|
|
617
|
+
* Angular component that applies a dot screen effect to the scene.
|
|
618
|
+
*
|
|
619
|
+
* This effect overlays a pattern of dots on the scene, creating a halftone
|
|
620
|
+
* or comic book style appearance.
|
|
621
|
+
*
|
|
622
|
+
* @example
|
|
623
|
+
* ```html
|
|
624
|
+
* <ngtp-effect-composer>
|
|
625
|
+
* <ngtp-dot-screen [options]="{ scale: 1.5, angle: Math.PI * 0.25 }" />
|
|
626
|
+
* </ngtp-effect-composer>
|
|
627
|
+
* ```
|
|
628
|
+
*/
|
|
629
|
+
declare class NgtpDotScreen {
|
|
630
|
+
/**
|
|
631
|
+
* Configuration options for the dot screen effect.
|
|
632
|
+
* @see DotScreenEffectOptions
|
|
633
|
+
*/
|
|
634
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
635
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
636
|
+
angle?: number;
|
|
637
|
+
scale?: number;
|
|
638
|
+
}>, "blendFunction">>;
|
|
639
|
+
/** Reference to the host NgtpEffect directive */
|
|
640
|
+
protected hostEffect: NgtpEffect;
|
|
641
|
+
effectRef: _angular_core.Signal<ElementRef<DotScreenEffect> | undefined>;
|
|
642
|
+
constructor();
|
|
643
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpDotScreen, never>;
|
|
644
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpDotScreen, "ngtp-dot-screen", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Configuration options for the FXAA effect.
|
|
649
|
+
* Derived from FXAAEffect constructor parameters.
|
|
650
|
+
*/
|
|
651
|
+
type FXAAEffectOptions = Partial<NonNullable<ConstructorParameters<typeof FXAAEffect>[0]>>;
|
|
652
|
+
/**
|
|
653
|
+
* Angular component that applies Fast Approximate Anti-Aliasing (FXAA) to the scene.
|
|
654
|
+
*
|
|
655
|
+
* FXAA is a fast, single-pass anti-aliasing technique that smooths jagged edges
|
|
656
|
+
* in the rendered image. It's less demanding than multisampling but may blur
|
|
657
|
+
* some fine details.
|
|
658
|
+
*
|
|
659
|
+
* @example
|
|
660
|
+
* ```html
|
|
661
|
+
* <ngtp-effect-composer [options]="{ multisampling: 0 }">
|
|
662
|
+
* <ngtp-fxaa />
|
|
663
|
+
* </ngtp-effect-composer>
|
|
664
|
+
* ```
|
|
665
|
+
*/
|
|
666
|
+
declare class NgtpFXAA {
|
|
667
|
+
/**
|
|
668
|
+
* Configuration options for the FXAA effect.
|
|
669
|
+
* @see FXAAEffectOptions
|
|
670
|
+
*/
|
|
671
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
672
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
673
|
+
}>, "blendFunction">>;
|
|
674
|
+
/** Reference to the host NgtpEffect directive */
|
|
675
|
+
protected hostEffect: NgtpEffect;
|
|
676
|
+
effectRef: _angular_core.Signal<ElementRef<FXAAEffect> | undefined>;
|
|
677
|
+
constructor();
|
|
678
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpFXAA, never>;
|
|
679
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpFXAA, "ngtp-fxaa", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Configuration options for the glitch effect.
|
|
684
|
+
* Extends GlitchEffect options with additional control properties.
|
|
685
|
+
*/
|
|
686
|
+
type GlitchOptions = NonNullable<ConstructorParameters<typeof GlitchEffect>[0]> & Partial<{
|
|
687
|
+
/** The glitch mode (SPORADIC, CONSTANT_MILD, CONSTANT_WILD, DISABLED) */
|
|
688
|
+
mode: GlitchMode;
|
|
689
|
+
/** Whether the glitch effect is active */
|
|
690
|
+
active: boolean;
|
|
691
|
+
/** Delay range between glitches [min, max] in seconds */
|
|
692
|
+
delay: NgtVector2;
|
|
693
|
+
/** Duration range of glitches [min, max] in seconds */
|
|
694
|
+
duration: NgtVector2;
|
|
695
|
+
/** Chromatic aberration offset */
|
|
696
|
+
chromaticAberrationOffset: NgtVector2;
|
|
697
|
+
/** Strength of the glitch effect [x, y] */
|
|
698
|
+
strength: NgtVector2;
|
|
699
|
+
}>;
|
|
700
|
+
/**
|
|
701
|
+
* Angular component that applies a glitch effect to the scene.
|
|
702
|
+
*
|
|
703
|
+
* This effect simulates digital glitches with customizable timing, strength,
|
|
704
|
+
* and chromatic aberration. Can be toggled on/off and configured for different
|
|
705
|
+
* glitch modes.
|
|
706
|
+
*
|
|
707
|
+
* @example
|
|
708
|
+
* ```html
|
|
709
|
+
* <ngtp-effect-composer>
|
|
710
|
+
* <ngtp-glitch [options]="{ delay: [1.5, 3.5], duration: [0.6, 1.0] }" />
|
|
711
|
+
* </ngtp-effect-composer>
|
|
712
|
+
* ```
|
|
713
|
+
*
|
|
714
|
+
* @example
|
|
715
|
+
* ```html
|
|
716
|
+
* <!-- Constant glitch mode -->
|
|
717
|
+
* <ngtp-effect-composer>
|
|
718
|
+
* <ngtp-glitch [options]="{ mode: GlitchMode.CONSTANT_MILD, active: true }" />
|
|
719
|
+
* </ngtp-effect-composer>
|
|
720
|
+
* ```
|
|
721
|
+
*/
|
|
722
|
+
declare class NgtpGlitch {
|
|
723
|
+
/**
|
|
724
|
+
* Configuration options for the glitch effect.
|
|
725
|
+
* @default { active: true }
|
|
726
|
+
* @see GlitchOptions
|
|
727
|
+
*/
|
|
728
|
+
options: _angular_core.InputSignalWithTransform<GlitchOptions, "" | Partial<{
|
|
729
|
+
active: boolean;
|
|
730
|
+
}>>;
|
|
731
|
+
private active;
|
|
732
|
+
private mode;
|
|
733
|
+
private ratio;
|
|
734
|
+
private dtSize;
|
|
735
|
+
private columns;
|
|
736
|
+
private blendFunction;
|
|
737
|
+
private perturbationMap;
|
|
738
|
+
private delay;
|
|
739
|
+
private duration;
|
|
740
|
+
private chromaticAberrationOffset;
|
|
741
|
+
private strength;
|
|
742
|
+
private store;
|
|
743
|
+
/**
|
|
744
|
+
* The underlying GlitchEffect instance.
|
|
745
|
+
* Created with the configured options and vector2 parameters.
|
|
746
|
+
*/
|
|
747
|
+
effect: _angular_core.Signal<GlitchEffect>;
|
|
748
|
+
constructor();
|
|
749
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpGlitch, never>;
|
|
750
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpGlitch, "ngtp-glitch", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* Angular component that applies a god rays (volumetric lighting) effect to the scene.
|
|
755
|
+
*
|
|
756
|
+
* This effect creates light shafts emanating from a light source, simulating
|
|
757
|
+
* the way light scatters through atmospheric particles. Requires a sun/light
|
|
758
|
+
* source mesh to generate the rays from.
|
|
759
|
+
*
|
|
760
|
+
* @example
|
|
761
|
+
* ```html
|
|
762
|
+
* <ngt-mesh #sun [position]="[0, 5, -10]">
|
|
763
|
+
* <ngt-sphere-geometry />
|
|
764
|
+
* <ngt-mesh-basic-material color="yellow" />
|
|
765
|
+
* </ngt-mesh>
|
|
766
|
+
*
|
|
767
|
+
* <ngtp-effect-composer>
|
|
768
|
+
* <ngtp-god-rays [options]="{ sun: sunRef, density: 0.96 }" />
|
|
769
|
+
* </ngtp-effect-composer>
|
|
770
|
+
* ```
|
|
771
|
+
*/
|
|
772
|
+
declare class NgtpGodRays {
|
|
773
|
+
/**
|
|
774
|
+
* Configuration options for the god rays effect.
|
|
775
|
+
* Must include a `sun` property with the light source reference.
|
|
776
|
+
* @see GodRaysOptions
|
|
777
|
+
*/
|
|
778
|
+
options: _angular_core.InputSignal<{
|
|
779
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
780
|
+
samples?: number;
|
|
781
|
+
density?: number;
|
|
782
|
+
decay?: number;
|
|
783
|
+
weight?: number;
|
|
784
|
+
exposure?: number;
|
|
785
|
+
clampMax?: number;
|
|
786
|
+
resolutionScale?: number;
|
|
787
|
+
resolutionX?: number;
|
|
788
|
+
resolutionY?: number;
|
|
789
|
+
width?: number;
|
|
790
|
+
height?: number;
|
|
791
|
+
kernelSize?: postprocessing.KernelSize;
|
|
792
|
+
blur?: boolean;
|
|
793
|
+
} & {
|
|
794
|
+
/**
|
|
795
|
+
* The light source for the god rays.
|
|
796
|
+
* Can be a Mesh, Points, ElementRef, or a Signal of any of these.
|
|
797
|
+
*/
|
|
798
|
+
sun: THREE.Mesh | THREE.Points | ElementRef<THREE.Mesh | THREE.Points> | (() => THREE.Mesh | THREE.Points | ElementRef<THREE.Mesh | THREE.Points> | undefined);
|
|
799
|
+
}>;
|
|
800
|
+
private effectComposer;
|
|
801
|
+
private effectOptions;
|
|
802
|
+
private sun;
|
|
803
|
+
/**
|
|
804
|
+
* Resolves the sun reference to the actual Three.js object.
|
|
805
|
+
* Handles both direct references and function references.
|
|
806
|
+
*/
|
|
807
|
+
private sunElement;
|
|
808
|
+
/**
|
|
809
|
+
* The underlying GodRaysEffect instance.
|
|
810
|
+
* Created with the camera, sun element, and configured options.
|
|
811
|
+
*/
|
|
812
|
+
effect: _angular_core.Signal<GodRaysEffect>;
|
|
813
|
+
constructor();
|
|
814
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpGodRays, never>;
|
|
815
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpGodRays, "ngtp-god-rays", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Configuration options for the grid effect.
|
|
820
|
+
* Extends GridEffect options with optional size configuration.
|
|
821
|
+
*/
|
|
822
|
+
type GridOptions = NonNullable<ConstructorParameters<typeof GridEffect>[0]> & Partial<{
|
|
823
|
+
/** Custom size for the grid effect */
|
|
824
|
+
size: {
|
|
825
|
+
width: number;
|
|
826
|
+
height: number;
|
|
827
|
+
};
|
|
828
|
+
}>;
|
|
829
|
+
/**
|
|
830
|
+
* Angular component that applies a grid overlay effect to the scene.
|
|
831
|
+
*
|
|
832
|
+
* This effect overlays a grid pattern on the rendered scene, which can be
|
|
833
|
+
* useful for technical visualization or stylized effects.
|
|
834
|
+
*
|
|
835
|
+
* @example
|
|
836
|
+
* ```html
|
|
837
|
+
* <ngtp-effect-composer>
|
|
838
|
+
* <ngtp-grid [options]="{ scale: 1.5, lineWidth: 0.5 }" />
|
|
839
|
+
* </ngtp-effect-composer>
|
|
840
|
+
* ```
|
|
841
|
+
*/
|
|
842
|
+
declare class NgtpGrid {
|
|
843
|
+
/**
|
|
844
|
+
* Configuration options for the grid effect.
|
|
845
|
+
* @see GridOptions
|
|
846
|
+
*/
|
|
847
|
+
options: _angular_core.InputSignal<GridOptions>;
|
|
848
|
+
private effectOptions;
|
|
849
|
+
private size;
|
|
850
|
+
/** The underlying GridEffect instance */
|
|
851
|
+
effect: _angular_core.Signal<GridEffect>;
|
|
852
|
+
constructor();
|
|
853
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpGrid, never>;
|
|
854
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpGrid, "ngtp-grid", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Configuration options for the hue/saturation effect.
|
|
859
|
+
* Derived from HueSaturationEffect constructor parameters.
|
|
860
|
+
*/
|
|
861
|
+
type HueSaturationEffectOptions = Partial<NonNullable<ConstructorParameters<typeof HueSaturationEffect>[0]>>;
|
|
862
|
+
/**
|
|
863
|
+
* Angular component that applies hue and saturation adjustments to the scene.
|
|
864
|
+
*
|
|
865
|
+
* This effect allows you to shift the hue and adjust the saturation of the
|
|
866
|
+
* rendered scene as a postprocessing step.
|
|
867
|
+
*
|
|
868
|
+
* @example
|
|
869
|
+
* ```html
|
|
870
|
+
* <ngtp-effect-composer>
|
|
871
|
+
* <ngtp-hue-saturation [options]="{ hue: 0.5, saturation: 0.2 }" />
|
|
872
|
+
* </ngtp-effect-composer>
|
|
873
|
+
* ```
|
|
874
|
+
*/
|
|
875
|
+
declare class NgtpHueSaturation {
|
|
876
|
+
/**
|
|
877
|
+
* Configuration options for the hue/saturation effect.
|
|
878
|
+
* @see HueSaturationEffectOptions
|
|
879
|
+
*/
|
|
880
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
881
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
882
|
+
hue?: number;
|
|
883
|
+
saturation?: number;
|
|
884
|
+
}>, "blendFunction">>;
|
|
885
|
+
/** Reference to the host NgtpEffect directive */
|
|
886
|
+
protected hostEffect: NgtpEffect;
|
|
887
|
+
effectRef: _angular_core.Signal<ElementRef<HueSaturationEffect> | undefined>;
|
|
888
|
+
constructor();
|
|
889
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpHueSaturation, never>;
|
|
890
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpHueSaturation, "ngtp-hue-saturation", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* A postprocessing effect that simulates camera lens flares.
|
|
895
|
+
*
|
|
896
|
+
* Creates realistic lens flare effects including glare, ghosts, star bursts,
|
|
897
|
+
* and anamorphic flares. Can be animated and positioned dynamically.
|
|
898
|
+
*
|
|
899
|
+
* @example
|
|
900
|
+
* ```typescript
|
|
901
|
+
* const effect = new LensFlareEffect({
|
|
902
|
+
* glareSize: 0.3,
|
|
903
|
+
* starPoints: 8,
|
|
904
|
+
* animated: true
|
|
905
|
+
* });
|
|
906
|
+
* ```
|
|
907
|
+
*/
|
|
908
|
+
declare class LensFlareEffect extends Effect {
|
|
909
|
+
/**
|
|
910
|
+
* Creates a new LensFlareEffect instance.
|
|
911
|
+
*
|
|
912
|
+
* @param options - Configuration options for the lens flare
|
|
913
|
+
* @param options.blendFunction - How to blend with the scene
|
|
914
|
+
* @param options.enabled - Whether the effect is enabled
|
|
915
|
+
* @param options.glareSize - Size of the glare
|
|
916
|
+
* @param options.lensPosition - Position of the lens on screen
|
|
917
|
+
* @param options.iResolution - Resolution of the effect
|
|
918
|
+
* @param options.starPoints - Number of points in the star pattern
|
|
919
|
+
* @param options.flareSize - Size of individual flares
|
|
920
|
+
* @param options.flareSpeed - Animation speed of flares
|
|
921
|
+
* @param options.flareShape - Shape parameter for flares
|
|
922
|
+
* @param options.animated - Whether to animate the effect
|
|
923
|
+
* @param options.anamorphic - Enable anamorphic lens simulation
|
|
924
|
+
* @param options.colorGain - Color tint for the effect
|
|
925
|
+
* @param options.lensDirtTexture - Texture for lens dirt overlay
|
|
926
|
+
* @param options.haloScale - Scale of the halo effect
|
|
927
|
+
* @param options.secondaryGhosts - Enable secondary ghost images
|
|
928
|
+
* @param options.aditionalStreaks - Enable additional streak effects
|
|
929
|
+
* @param options.ghostScale - Scale of ghost images
|
|
930
|
+
* @param options.opacity - Opacity of the effect
|
|
931
|
+
* @param options.starBurst - Enable star burst effect
|
|
932
|
+
*/
|
|
933
|
+
constructor({ blendFunction, enabled, glareSize, lensPosition, iResolution, starPoints, flareSize, flareSpeed, flareShape, animated, anamorphic, colorGain, lensDirtTexture, haloScale, secondaryGhosts, aditionalStreaks, ghostScale, opacity, starBurst, }?: {
|
|
934
|
+
blendFunction?: BlendFunction | undefined;
|
|
935
|
+
enabled?: boolean | undefined;
|
|
936
|
+
glareSize?: number | undefined;
|
|
937
|
+
lensPosition?: number[] | undefined;
|
|
938
|
+
iResolution?: number[] | undefined;
|
|
939
|
+
starPoints?: number | undefined;
|
|
940
|
+
flareSize?: number | undefined;
|
|
941
|
+
flareSpeed?: number | undefined;
|
|
942
|
+
flareShape?: number | undefined;
|
|
943
|
+
animated?: boolean | undefined;
|
|
944
|
+
anamorphic?: boolean | undefined;
|
|
945
|
+
colorGain?: THREE.Color | undefined;
|
|
946
|
+
lensDirtTexture?: THREE.Texture<unknown> | null | undefined;
|
|
947
|
+
haloScale?: number | undefined;
|
|
948
|
+
secondaryGhosts?: boolean | undefined;
|
|
949
|
+
aditionalStreaks?: boolean | undefined;
|
|
950
|
+
ghostScale?: number | undefined;
|
|
951
|
+
opacity?: number | undefined;
|
|
952
|
+
starBurst?: boolean | undefined;
|
|
953
|
+
});
|
|
954
|
+
/**
|
|
955
|
+
* Updates the effect's time uniform for animation.
|
|
956
|
+
*
|
|
957
|
+
* @param _renderer - The WebGL renderer (unused)
|
|
958
|
+
* @param _inputBuffer - The input render target (unused)
|
|
959
|
+
* @param deltaTime - Time elapsed since last frame
|
|
960
|
+
*/
|
|
961
|
+
update(_renderer: THREE.WebGLRenderer, _inputBuffer: THREE.WebGLRenderTarget, deltaTime: number): void;
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
* Configuration options for the Angular lens flare component.
|
|
965
|
+
* Extends LensFlareEffect options with position and mouse tracking.
|
|
966
|
+
*/
|
|
967
|
+
type LensFlareOptions = ConstructorParameters<typeof LensFlareEffect>[0] & {
|
|
968
|
+
/** World position of the light source for the flare */
|
|
969
|
+
position: NgtVector3;
|
|
970
|
+
/** Whether the flare should follow the mouse cursor */
|
|
971
|
+
followMouse: boolean;
|
|
972
|
+
/** Smoothing time for opacity transitions */
|
|
973
|
+
smoothTime: number;
|
|
974
|
+
};
|
|
975
|
+
/**
|
|
976
|
+
* Angular component that applies a lens flare effect to the scene.
|
|
977
|
+
*
|
|
978
|
+
* This effect simulates realistic camera lens flares with support for
|
|
979
|
+
* dynamic positioning, mouse following, and occlusion detection.
|
|
980
|
+
* The flare automatically fades when occluded by scene objects.
|
|
981
|
+
*
|
|
982
|
+
* @example
|
|
983
|
+
* ```html
|
|
984
|
+
* <ngtp-effect-composer>
|
|
985
|
+
* <ngtp-lens-flare [options]="{ position: [10, 5, -20], glareSize: 0.3 }" />
|
|
986
|
+
* </ngtp-effect-composer>
|
|
987
|
+
* ```
|
|
988
|
+
*
|
|
989
|
+
* @example
|
|
990
|
+
* ```html
|
|
991
|
+
* <!-- Mouse-following flare -->
|
|
992
|
+
* <ngtp-effect-composer>
|
|
993
|
+
* <ngtp-lens-flare [options]="{ followMouse: true, smoothTime: 0.5 }" />
|
|
994
|
+
* </ngtp-effect-composer>
|
|
995
|
+
* ```
|
|
996
|
+
*/
|
|
997
|
+
declare class NgtpLensFlare {
|
|
998
|
+
/**
|
|
999
|
+
* Configuration options for the lens flare effect.
|
|
1000
|
+
* @see LensFlareOptions
|
|
1001
|
+
*/
|
|
1002
|
+
options: _angular_core.InputSignalWithTransform<{
|
|
1003
|
+
blendFunction?: BlendFunction | undefined;
|
|
1004
|
+
enabled?: boolean | undefined;
|
|
1005
|
+
glareSize?: number | undefined;
|
|
1006
|
+
lensPosition?: number[] | undefined;
|
|
1007
|
+
iResolution?: number[] | undefined;
|
|
1008
|
+
starPoints?: number | undefined;
|
|
1009
|
+
flareSize?: number | undefined;
|
|
1010
|
+
flareSpeed?: number | undefined;
|
|
1011
|
+
flareShape?: number | undefined;
|
|
1012
|
+
animated?: boolean | undefined;
|
|
1013
|
+
anamorphic?: boolean | undefined;
|
|
1014
|
+
colorGain?: THREE.Color | undefined;
|
|
1015
|
+
lensDirtTexture?: THREE.Texture<unknown> | null | undefined;
|
|
1016
|
+
haloScale?: number | undefined;
|
|
1017
|
+
secondaryGhosts?: boolean | undefined;
|
|
1018
|
+
aditionalStreaks?: boolean | undefined;
|
|
1019
|
+
ghostScale?: number | undefined;
|
|
1020
|
+
opacity?: number | undefined;
|
|
1021
|
+
starBurst?: boolean | undefined;
|
|
1022
|
+
} & {
|
|
1023
|
+
/** World position of the light source for the flare */
|
|
1024
|
+
position: NgtVector3;
|
|
1025
|
+
/** Whether the flare should follow the mouse cursor */
|
|
1026
|
+
followMouse: boolean;
|
|
1027
|
+
/** Smoothing time for opacity transitions */
|
|
1028
|
+
smoothTime: number;
|
|
1029
|
+
}, "" | Partial<{
|
|
1030
|
+
blendFunction?: BlendFunction | undefined;
|
|
1031
|
+
enabled?: boolean | undefined;
|
|
1032
|
+
glareSize?: number | undefined;
|
|
1033
|
+
lensPosition?: number[] | undefined;
|
|
1034
|
+
iResolution?: number[] | undefined;
|
|
1035
|
+
starPoints?: number | undefined;
|
|
1036
|
+
flareSize?: number | undefined;
|
|
1037
|
+
flareSpeed?: number | undefined;
|
|
1038
|
+
flareShape?: number | undefined;
|
|
1039
|
+
animated?: boolean | undefined;
|
|
1040
|
+
anamorphic?: boolean | undefined;
|
|
1041
|
+
colorGain?: THREE.Color | undefined;
|
|
1042
|
+
lensDirtTexture?: THREE.Texture<unknown> | null | undefined;
|
|
1043
|
+
haloScale?: number | undefined;
|
|
1044
|
+
secondaryGhosts?: boolean | undefined;
|
|
1045
|
+
aditionalStreaks?: boolean | undefined;
|
|
1046
|
+
ghostScale?: number | undefined;
|
|
1047
|
+
opacity?: number | undefined;
|
|
1048
|
+
starBurst?: boolean | undefined;
|
|
1049
|
+
} & {
|
|
1050
|
+
/** World position of the light source for the flare */
|
|
1051
|
+
position: NgtVector3;
|
|
1052
|
+
/** Whether the flare should follow the mouse cursor */
|
|
1053
|
+
followMouse: boolean;
|
|
1054
|
+
/** Smoothing time for opacity transitions */
|
|
1055
|
+
smoothTime: number;
|
|
1056
|
+
}>>;
|
|
1057
|
+
private store;
|
|
1058
|
+
private effectComposer;
|
|
1059
|
+
private effectOptions;
|
|
1060
|
+
private position;
|
|
1061
|
+
/** Cached vector for projecting 3D position to screen space */
|
|
1062
|
+
private projectedPosition;
|
|
1063
|
+
/** Cached vector for 2D mouse/raycaster coordinates */
|
|
1064
|
+
private mouse2d;
|
|
1065
|
+
/** The underlying LensFlareEffect instance */
|
|
1066
|
+
effect: _angular_core.Signal<LensFlareEffect>;
|
|
1067
|
+
constructor();
|
|
1068
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpLensFlare, never>;
|
|
1069
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpLensFlare, "ngtp-lens-flare", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Configuration options for the LUT (Look-Up Table) effect.
|
|
1074
|
+
*/
|
|
1075
|
+
interface LUTOptions {
|
|
1076
|
+
/**
|
|
1077
|
+
* The 3D LUT texture to apply for color grading.
|
|
1078
|
+
* Can be loaded using LUTCubeLoader or LUT3dlLoader.
|
|
1079
|
+
*/
|
|
1080
|
+
lut: THREE.Texture;
|
|
1081
|
+
/**
|
|
1082
|
+
* The blend function for combining with the scene.
|
|
1083
|
+
* @default BlendFunction.SRC
|
|
1084
|
+
*/
|
|
1085
|
+
blendFunction?: BlendFunction;
|
|
1086
|
+
/**
|
|
1087
|
+
* Whether to use tetrahedral interpolation for smoother color transitions.
|
|
1088
|
+
* @default false
|
|
1089
|
+
*/
|
|
1090
|
+
tetrahedralInterpolation?: boolean;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Angular component that applies a LUT (Look-Up Table) color grading effect.
|
|
1094
|
+
*
|
|
1095
|
+
* LUTs are used for color grading in film and photography. This effect applies
|
|
1096
|
+
* a 3D LUT texture to transform the colors of the rendered scene.
|
|
1097
|
+
*
|
|
1098
|
+
* @example
|
|
1099
|
+
* ```typescript
|
|
1100
|
+
* // In component
|
|
1101
|
+
* lutTexture = injectLoader(() => LUTCubeLoader, () => 'path/to/lut.cube');
|
|
1102
|
+
* ```
|
|
1103
|
+
*
|
|
1104
|
+
* ```html
|
|
1105
|
+
* <ngtp-effect-composer>
|
|
1106
|
+
* <ngtp-lut [options]="{ lut: lutTexture() }" />
|
|
1107
|
+
* </ngtp-effect-composer>
|
|
1108
|
+
* ```
|
|
1109
|
+
*/
|
|
1110
|
+
declare class NgtpLUT {
|
|
1111
|
+
/**
|
|
1112
|
+
* Configuration options for the LUT effect.
|
|
1113
|
+
* Must include a `lut` texture.
|
|
1114
|
+
* @see LUTOptions
|
|
1115
|
+
*/
|
|
1116
|
+
options: _angular_core.InputSignal<LUTOptions>;
|
|
1117
|
+
private lut;
|
|
1118
|
+
private tetrahedralInterpolation;
|
|
1119
|
+
private store;
|
|
1120
|
+
/** The underlying LUT3DEffect instance */
|
|
1121
|
+
effect: _angular_core.Signal<LUT3DEffect>;
|
|
1122
|
+
constructor();
|
|
1123
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpLUT, never>;
|
|
1124
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpLUT, "ngtp-lut", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* Configuration options for the noise effect.
|
|
1129
|
+
* Derived from NoiseEffect constructor parameters.
|
|
1130
|
+
*/
|
|
1131
|
+
type NoiseEffectOptions = Partial<NonNullable<ConstructorParameters<typeof NoiseEffect>[0]>>;
|
|
1132
|
+
/**
|
|
1133
|
+
* Angular component that applies a noise/grain effect to the scene.
|
|
1134
|
+
*
|
|
1135
|
+
* This effect adds film grain or noise to the rendered image, which can
|
|
1136
|
+
* add a cinematic quality or help hide banding in gradients.
|
|
1137
|
+
*
|
|
1138
|
+
* @example
|
|
1139
|
+
* ```html
|
|
1140
|
+
* <ngtp-effect-composer>
|
|
1141
|
+
* <ngtp-noise [options]="{ premultiply: true }" />
|
|
1142
|
+
* </ngtp-effect-composer>
|
|
1143
|
+
* ```
|
|
1144
|
+
*/
|
|
1145
|
+
declare class NgtpNoise {
|
|
1146
|
+
/**
|
|
1147
|
+
* Configuration options for the noise effect.
|
|
1148
|
+
* @see NoiseEffectOptions
|
|
1149
|
+
*/
|
|
1150
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1151
|
+
blendFunction?: BlendFunction;
|
|
1152
|
+
premultiply?: boolean;
|
|
1153
|
+
}>, "blendFunction">>;
|
|
1154
|
+
/** Reference to the host NgtpEffect directive */
|
|
1155
|
+
protected hostEffect: NgtpEffect;
|
|
1156
|
+
effectRef: _angular_core.Signal<ElementRef<NoiseEffect> | undefined>;
|
|
1157
|
+
constructor();
|
|
1158
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpNoise, never>;
|
|
1159
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpNoise, "ngtp-noise", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Configuration options for the outline effect.
|
|
1164
|
+
* Extends OutlineEffect options with selection management.
|
|
1165
|
+
*/
|
|
1166
|
+
type NgtpOutlineOptions = ConstructorParameters<typeof OutlineEffect>[2] & {
|
|
1167
|
+
/**
|
|
1168
|
+
* Array of objects to outline.
|
|
1169
|
+
* Can be Object3D instances or ElementRefs.
|
|
1170
|
+
* Not needed if using NgtSelectionApi.
|
|
1171
|
+
*/
|
|
1172
|
+
selection?: Array<THREE.Object3D | ElementRef<THREE.Object3D>>;
|
|
1173
|
+
/**
|
|
1174
|
+
* The layer used for selection rendering.
|
|
1175
|
+
* @default 10
|
|
1176
|
+
*/
|
|
1177
|
+
selectionLayer: number;
|
|
1178
|
+
};
|
|
1179
|
+
/**
|
|
1180
|
+
* Angular component that applies an outline effect to selected objects.
|
|
1181
|
+
*
|
|
1182
|
+
* This effect draws an outline around specified objects in the scene.
|
|
1183
|
+
* Can be used with NgtSelectionApi for declarative selection or with
|
|
1184
|
+
* manual selection via the options input.
|
|
1185
|
+
*
|
|
1186
|
+
* @example
|
|
1187
|
+
* ```html
|
|
1188
|
+
* <!-- With NgtSelectionApi (recommended) -->
|
|
1189
|
+
* <ngt-group [select]="hovered()" (pointerenter)="hovered.set(true)">
|
|
1190
|
+
* <ngt-mesh>...</ngt-mesh>
|
|
1191
|
+
* </ngt-group>
|
|
1192
|
+
*
|
|
1193
|
+
* <ngtp-effect-composer>
|
|
1194
|
+
* <ngtp-outline [options]="{ edgeStrength: 2.5, blur: true }" />
|
|
1195
|
+
* </ngtp-effect-composer>
|
|
1196
|
+
* ```
|
|
1197
|
+
*
|
|
1198
|
+
* @example
|
|
1199
|
+
* ```html
|
|
1200
|
+
* <!-- With manual selection -->
|
|
1201
|
+
* <ngtp-effect-composer>
|
|
1202
|
+
* <ngtp-outline [options]="{ selection: [meshRef.nativeElement], edgeStrength: 5 }" />
|
|
1203
|
+
* </ngtp-effect-composer>
|
|
1204
|
+
* ```
|
|
1205
|
+
*/
|
|
1206
|
+
declare class NgtpOutline {
|
|
1207
|
+
/**
|
|
1208
|
+
* Configuration options for the outline effect.
|
|
1209
|
+
* @see NgtpOutlineOptions
|
|
1210
|
+
*/
|
|
1211
|
+
options: _angular_core.InputSignalWithTransform<{
|
|
1212
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
1213
|
+
patternTexture?: THREE.Texture;
|
|
1214
|
+
patternScale?: number;
|
|
1215
|
+
edgeStrength?: number;
|
|
1216
|
+
pulseSpeed?: number;
|
|
1217
|
+
visibleEdgeColor?: number;
|
|
1218
|
+
hiddenEdgeColor?: number;
|
|
1219
|
+
multisampling?: number;
|
|
1220
|
+
resolutionScale?: number;
|
|
1221
|
+
resolutionX?: number;
|
|
1222
|
+
resolutionY?: number;
|
|
1223
|
+
width?: number;
|
|
1224
|
+
height?: number;
|
|
1225
|
+
kernelSize?: postprocessing.KernelSize;
|
|
1226
|
+
blur?: boolean;
|
|
1227
|
+
xRay?: boolean;
|
|
1228
|
+
} & {
|
|
1229
|
+
/**
|
|
1230
|
+
* Array of objects to outline.
|
|
1231
|
+
* Can be Object3D instances or ElementRefs.
|
|
1232
|
+
* Not needed if using NgtSelectionApi.
|
|
1233
|
+
*/
|
|
1234
|
+
selection?: Array<THREE.Object3D | ElementRef<THREE.Object3D>>;
|
|
1235
|
+
/**
|
|
1236
|
+
* The layer used for selection rendering.
|
|
1237
|
+
* @default 10
|
|
1238
|
+
*/
|
|
1239
|
+
selectionLayer: number;
|
|
1240
|
+
}, "" | Partial<{
|
|
1241
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
1242
|
+
patternTexture?: THREE.Texture;
|
|
1243
|
+
patternScale?: number;
|
|
1244
|
+
edgeStrength?: number;
|
|
1245
|
+
pulseSpeed?: number;
|
|
1246
|
+
visibleEdgeColor?: number;
|
|
1247
|
+
hiddenEdgeColor?: number;
|
|
1248
|
+
multisampling?: number;
|
|
1249
|
+
resolutionScale?: number;
|
|
1250
|
+
resolutionX?: number;
|
|
1251
|
+
resolutionY?: number;
|
|
1252
|
+
width?: number;
|
|
1253
|
+
height?: number;
|
|
1254
|
+
kernelSize?: postprocessing.KernelSize;
|
|
1255
|
+
blur?: boolean;
|
|
1256
|
+
xRay?: boolean;
|
|
1257
|
+
} & {
|
|
1258
|
+
/**
|
|
1259
|
+
* Array of objects to outline.
|
|
1260
|
+
* Can be Object3D instances or ElementRefs.
|
|
1261
|
+
* Not needed if using NgtSelectionApi.
|
|
1262
|
+
*/
|
|
1263
|
+
selection?: Array<THREE.Object3D | ElementRef<THREE.Object3D>>;
|
|
1264
|
+
/**
|
|
1265
|
+
* The layer used for selection rendering.
|
|
1266
|
+
* @default 10
|
|
1267
|
+
*/
|
|
1268
|
+
selectionLayer: number;
|
|
1269
|
+
}>>;
|
|
1270
|
+
private selectionApi;
|
|
1271
|
+
private effectComposer;
|
|
1272
|
+
private store;
|
|
1273
|
+
private selection;
|
|
1274
|
+
private selectionLayer;
|
|
1275
|
+
private blendFunction;
|
|
1276
|
+
private patternTexture;
|
|
1277
|
+
private edgeStrength;
|
|
1278
|
+
private pulseSpeed;
|
|
1279
|
+
private visibleEdgeColor;
|
|
1280
|
+
private hiddenEdgeColor;
|
|
1281
|
+
private width;
|
|
1282
|
+
private height;
|
|
1283
|
+
private kernelSize;
|
|
1284
|
+
private blur;
|
|
1285
|
+
private xRay;
|
|
1286
|
+
private restOptions;
|
|
1287
|
+
/**
|
|
1288
|
+
* The underlying OutlineEffect instance.
|
|
1289
|
+
* Created with the scene, camera, and configured options.
|
|
1290
|
+
*/
|
|
1291
|
+
effect: _angular_core.Signal<OutlineEffect>;
|
|
1292
|
+
constructor();
|
|
1293
|
+
/**
|
|
1294
|
+
* Handles changes to the selection and updates the outline effect.
|
|
1295
|
+
*
|
|
1296
|
+
* @param selected - Function returning the currently selected objects
|
|
1297
|
+
* @param _effect - Function returning the OutlineEffect instance
|
|
1298
|
+
* @param _invalidate - Function returning the invalidate callback
|
|
1299
|
+
* @returns Cleanup function to clear the selection
|
|
1300
|
+
*/
|
|
1301
|
+
private handleSelectionChangeEffect;
|
|
1302
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpOutline, never>;
|
|
1303
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpOutline, "ngtp-outline", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* Configuration options for the pixelation effect.
|
|
1308
|
+
*/
|
|
1309
|
+
interface PixelationOptions {
|
|
1310
|
+
/**
|
|
1311
|
+
* The pixel granularity - higher values create larger pixels.
|
|
1312
|
+
* @default 5
|
|
1313
|
+
*/
|
|
1314
|
+
granularity: number;
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Angular component that applies a pixelation effect to the scene.
|
|
1318
|
+
*
|
|
1319
|
+
* This effect reduces the resolution of the rendered image to create
|
|
1320
|
+
* a retro, 8-bit style appearance.
|
|
1321
|
+
*
|
|
1322
|
+
* @example
|
|
1323
|
+
* ```html
|
|
1324
|
+
* <ngtp-effect-composer>
|
|
1325
|
+
* <ngtp-pixelation [options]="{ granularity: 10 }" />
|
|
1326
|
+
* </ngtp-effect-composer>
|
|
1327
|
+
* ```
|
|
1328
|
+
*/
|
|
1329
|
+
declare class NgtpPixelation {
|
|
1330
|
+
/**
|
|
1331
|
+
* Configuration options for the pixelation effect.
|
|
1332
|
+
* @default { granularity: 5 }
|
|
1333
|
+
* @see PixelationOptions
|
|
1334
|
+
*/
|
|
1335
|
+
options: _angular_core.InputSignalWithTransform<{
|
|
1336
|
+
granularity: number;
|
|
1337
|
+
}, "" | Partial<{
|
|
1338
|
+
granularity: number;
|
|
1339
|
+
}>>;
|
|
1340
|
+
private granularity;
|
|
1341
|
+
/** The underlying PixelationEffect instance */
|
|
1342
|
+
effect: _angular_core.Signal<PixelationEffect>;
|
|
1343
|
+
constructor();
|
|
1344
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpPixelation, never>;
|
|
1345
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpPixelation, "ngtp-pixelation", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Configuration options for the scanline effect.
|
|
1350
|
+
* Derived from ScanlineEffect constructor parameters.
|
|
1351
|
+
*/
|
|
1352
|
+
type ScanlineEffectOptions = Partial<NonNullable<ConstructorParameters<typeof ScanlineEffect>[0]>>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Angular component that applies a scanline effect to the scene.
|
|
1355
|
+
*
|
|
1356
|
+
* This effect overlays horizontal scanlines on the image, simulating
|
|
1357
|
+
* the appearance of old CRT monitors or television screens.
|
|
1358
|
+
*
|
|
1359
|
+
* @example
|
|
1360
|
+
* ```html
|
|
1361
|
+
* <ngtp-effect-composer>
|
|
1362
|
+
* <ngtp-scanline [options]="{ density: 2.0 }" />
|
|
1363
|
+
* </ngtp-effect-composer>
|
|
1364
|
+
* ```
|
|
1365
|
+
*/
|
|
1366
|
+
declare class NgtpScanline {
|
|
1367
|
+
/**
|
|
1368
|
+
* Configuration options for the scanline effect.
|
|
1369
|
+
* @default { density: 1.25 }
|
|
1370
|
+
* @see ScanlineEffectOptions
|
|
1371
|
+
*/
|
|
1372
|
+
options: _angular_core.InputSignalWithTransform<Omit<Partial<{
|
|
1373
|
+
blendFunction?: BlendFunction;
|
|
1374
|
+
density?: number;
|
|
1375
|
+
}>, "blendFunction">, "" | Partial<Omit<Partial<{
|
|
1376
|
+
blendFunction?: BlendFunction;
|
|
1377
|
+
density?: number;
|
|
1378
|
+
}>, "blendFunction">>>;
|
|
1379
|
+
/** Reference to the host NgtpEffect directive */
|
|
1380
|
+
protected hostEffect: NgtpEffect;
|
|
1381
|
+
effectRef: _angular_core.Signal<ElementRef<ScanlineEffect> | undefined>;
|
|
1382
|
+
constructor();
|
|
1383
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpScanline, never>;
|
|
1384
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpScanline, "ngtp-scanline", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Configuration options for the selective bloom effect.
|
|
1389
|
+
* Extends BloomEffectOptions with selection control properties.
|
|
1390
|
+
*/
|
|
1391
|
+
type SelectiveBloomOptions = BloomEffectOptions & {
|
|
1392
|
+
/**
|
|
1393
|
+
* The layer used for selection rendering.
|
|
1394
|
+
* @default 10
|
|
1395
|
+
*/
|
|
1396
|
+
selectionLayer: number;
|
|
1397
|
+
/**
|
|
1398
|
+
* Whether to invert the selection (bloom everything except selected).
|
|
1399
|
+
* @default false
|
|
1400
|
+
*/
|
|
1401
|
+
inverted: boolean;
|
|
1402
|
+
/**
|
|
1403
|
+
* Whether to ignore the background in the bloom effect.
|
|
1404
|
+
* @default false
|
|
1405
|
+
*/
|
|
1406
|
+
ignoreBackground: boolean;
|
|
1407
|
+
};
|
|
1408
|
+
/**
|
|
1409
|
+
* Angular component that applies bloom only to selected objects.
|
|
1410
|
+
*
|
|
1411
|
+
* Unlike the standard bloom effect, selective bloom allows you to specify
|
|
1412
|
+
* which objects should glow. Requires light sources to be provided for
|
|
1413
|
+
* proper rendering.
|
|
1414
|
+
*
|
|
1415
|
+
* Can be used with NgtSelectionApi for declarative selection or with
|
|
1416
|
+
* manual selection via the selection input.
|
|
1417
|
+
*
|
|
1418
|
+
* @example
|
|
1419
|
+
* ```html
|
|
1420
|
+
* <ngtp-effect-composer>
|
|
1421
|
+
* <ngtp-selective-bloom
|
|
1422
|
+
* [lights]="[ambientLightRef, pointLightRef]"
|
|
1423
|
+
* [selection]="[glowingMeshRef]"
|
|
1424
|
+
* [options]="{ intensity: 2, luminanceThreshold: 0 }"
|
|
1425
|
+
* />
|
|
1426
|
+
* </ngtp-effect-composer>
|
|
1427
|
+
* ```
|
|
1428
|
+
*/
|
|
1429
|
+
declare class NgtpSelectiveBloom {
|
|
1430
|
+
/**
|
|
1431
|
+
* Light sources that should be included in the bloom calculation.
|
|
1432
|
+
* Required for proper selective bloom rendering.
|
|
1433
|
+
*/
|
|
1434
|
+
lights: _angular_core.InputSignal<THREE.Object3D<THREE.Object3DEventMap>[] | ElementRef<THREE.Object3D<THREE.Object3DEventMap> | undefined>[]>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Objects to apply bloom to.
|
|
1437
|
+
* Can be a single object, array of objects, or ElementRefs.
|
|
1438
|
+
* Not needed if using NgtSelectionApi.
|
|
1439
|
+
* @default []
|
|
1440
|
+
*/
|
|
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>[]>;
|
|
1442
|
+
/**
|
|
1443
|
+
* Configuration options for the selective bloom effect.
|
|
1444
|
+
* @see SelectiveBloomOptions
|
|
1445
|
+
*/
|
|
1446
|
+
options: _angular_core.InputSignalWithTransform<SelectiveBloomOptions, "" | Partial<SelectiveBloomOptions>>;
|
|
1447
|
+
private blendFunction;
|
|
1448
|
+
private luminanceThreshold;
|
|
1449
|
+
private luminanceSmoothing;
|
|
1450
|
+
private mipmapBlur;
|
|
1451
|
+
private intensity;
|
|
1452
|
+
private radius;
|
|
1453
|
+
private levels;
|
|
1454
|
+
private kernelSize;
|
|
1455
|
+
private resolutionScale;
|
|
1456
|
+
private width;
|
|
1457
|
+
private height;
|
|
1458
|
+
private resolutionX;
|
|
1459
|
+
private resolutionY;
|
|
1460
|
+
private inverted;
|
|
1461
|
+
private ignoreBackground;
|
|
1462
|
+
private selectionLayer;
|
|
1463
|
+
private store;
|
|
1464
|
+
private effectComposer;
|
|
1465
|
+
private selectionApi;
|
|
1466
|
+
private resolvedLights;
|
|
1467
|
+
private resolvedSelected;
|
|
1468
|
+
private resolvedNgtSelected;
|
|
1469
|
+
/**
|
|
1470
|
+
* The underlying SelectiveBloomEffect instance.
|
|
1471
|
+
* Created with the scene, camera, and configured options.
|
|
1472
|
+
*/
|
|
1473
|
+
effect: _angular_core.Signal<SelectiveBloomEffect>;
|
|
1474
|
+
constructor();
|
|
1475
|
+
/**
|
|
1476
|
+
* Enables the selection layer on a light source.
|
|
1477
|
+
*
|
|
1478
|
+
* @param effect - The SelectiveBloomEffect instance
|
|
1479
|
+
* @param light - The light to enable on the selection layer
|
|
1480
|
+
*/
|
|
1481
|
+
private addLight;
|
|
1482
|
+
/**
|
|
1483
|
+
* Disables the selection layer on a light source.
|
|
1484
|
+
*
|
|
1485
|
+
* @param effect - The SelectiveBloomEffect instance
|
|
1486
|
+
* @param light - The light to disable from the selection layer
|
|
1487
|
+
*/
|
|
1488
|
+
private removeLight;
|
|
1489
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpSelectiveBloom, never>;
|
|
1490
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpSelectiveBloom, "ngtp-selective-bloom", never, { "lights": { "alias": "lights"; "required": true; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
/**
|
|
1494
|
+
* Configuration options for the sepia effect.
|
|
1495
|
+
* Derived from SepiaEffect constructor parameters.
|
|
1496
|
+
*/
|
|
1497
|
+
type SepiaEffectOptions = Partial<NonNullable<ConstructorParameters<typeof SepiaEffect>[0]>>;
|
|
1498
|
+
/**
|
|
1499
|
+
* Angular component that applies a sepia tone effect to the scene.
|
|
1500
|
+
*
|
|
1501
|
+
* This effect gives the rendered image a warm, brownish tint similar to
|
|
1502
|
+
* old photographs, creating a vintage or nostalgic appearance.
|
|
1503
|
+
*
|
|
1504
|
+
* @example
|
|
1505
|
+
* ```html
|
|
1506
|
+
* <ngtp-effect-composer>
|
|
1507
|
+
* <ngtp-sepia [options]="{ intensity: 0.5 }" />
|
|
1508
|
+
* </ngtp-effect-composer>
|
|
1509
|
+
* ```
|
|
1510
|
+
*/
|
|
1511
|
+
declare class NgtpSepia {
|
|
1512
|
+
/**
|
|
1513
|
+
* Configuration options for the sepia effect.
|
|
1514
|
+
* @see SepiaEffectOptions
|
|
1515
|
+
*/
|
|
1516
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1517
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
1518
|
+
intensity?: number;
|
|
1519
|
+
}>, "blendFunction">>;
|
|
1520
|
+
/** Reference to the host NgtpEffect directive */
|
|
1521
|
+
protected hostEffect: NgtpEffect;
|
|
1522
|
+
effectRef: _angular_core.Signal<ElementRef<SepiaEffect> | undefined>;
|
|
1523
|
+
constructor();
|
|
1524
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpSepia, never>;
|
|
1525
|
+
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
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* Configuration options for the shock wave effect.
|
|
1530
|
+
* Derived from ShockWaveEffect constructor parameters.
|
|
1531
|
+
*/
|
|
1532
|
+
type ShockWaveEffectOptions = Partial<NonNullable<ConstructorParameters<typeof ShockWaveEffect>[0]>>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Angular component that applies a shock wave distortion effect.
|
|
1535
|
+
*
|
|
1536
|
+
* This effect creates an expanding ring distortion that simulates a
|
|
1537
|
+
* shock wave or explosion ripple emanating from a point in the scene.
|
|
1538
|
+
*
|
|
1539
|
+
* @example
|
|
1540
|
+
* ```html
|
|
1541
|
+
* <ngtp-effect-composer>
|
|
1542
|
+
* <ngtp-shock-wave
|
|
1543
|
+
* [options]="{ speed: 2, maxRadius: 1, waveSize: 0.2, amplitude: 0.05 }"
|
|
1544
|
+
* />
|
|
1545
|
+
* </ngtp-effect-composer>
|
|
1546
|
+
* ```
|
|
1547
|
+
*/
|
|
1548
|
+
declare class NgtpShockWave {
|
|
1549
|
+
/**
|
|
1550
|
+
* Configuration options for the shock wave effect.
|
|
1551
|
+
* @see ShockWaveEffectOptions
|
|
1552
|
+
*/
|
|
1553
|
+
options: _angular_core.InputSignal<Omit<Partial<THREE.Camera>, "blendFunction">>;
|
|
1554
|
+
/** Reference to the host NgtpEffect directive */
|
|
1555
|
+
protected hostEffect: NgtpEffect;
|
|
1556
|
+
effectRef: _angular_core.Signal<ElementRef<ShockWaveEffect> | undefined>;
|
|
1557
|
+
constructor();
|
|
1558
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpShockWave, never>;
|
|
1559
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpShockWave, "ngtp-shock-wave", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Configuration options for the SMAA effect.
|
|
1564
|
+
* Derived from SMAAEffect constructor parameters.
|
|
1565
|
+
*/
|
|
1566
|
+
type SMAAEffectOptions = Partial<NonNullable<ConstructorParameters<typeof SMAAEffect>[0]>>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Angular component that applies Subpixel Morphological Anti-Aliasing (SMAA).
|
|
1569
|
+
*
|
|
1570
|
+
* SMAA is a high-quality, efficient anti-aliasing technique that provides
|
|
1571
|
+
* better results than FXAA while being less demanding than multisampling.
|
|
1572
|
+
* It's particularly effective at smoothing edges while preserving sharpness.
|
|
1573
|
+
*
|
|
1574
|
+
* @example
|
|
1575
|
+
* ```html
|
|
1576
|
+
* <ngtp-effect-composer [options]="{ multisampling: 0 }">
|
|
1577
|
+
* <ngtp-smaa />
|
|
1578
|
+
* </ngtp-effect-composer>
|
|
1579
|
+
* ```
|
|
1580
|
+
*
|
|
1581
|
+
* @example
|
|
1582
|
+
* ```html
|
|
1583
|
+
* <!-- With preset -->
|
|
1584
|
+
* <ngtp-effect-composer>
|
|
1585
|
+
* <ngtp-smaa [options]="{ preset: SMAAPreset.ULTRA }" />
|
|
1586
|
+
* </ngtp-effect-composer>
|
|
1587
|
+
* ```
|
|
1588
|
+
*/
|
|
1589
|
+
declare class NgtpSMAA {
|
|
1590
|
+
/**
|
|
1591
|
+
* Configuration options for the SMAA effect.
|
|
1592
|
+
* @see SMAAEffectOptions
|
|
1593
|
+
*/
|
|
1594
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1595
|
+
preset?: postprocessing.SMAAPreset;
|
|
1596
|
+
edgeDetectionMode?: postprocessing.EdgeDetectionMode;
|
|
1597
|
+
predicationMode?: postprocessing.PredicationMode;
|
|
1598
|
+
}>, "blendFunction">>;
|
|
1599
|
+
/** Reference to the host NgtpEffect directive */
|
|
1600
|
+
protected hostEffect: NgtpEffect;
|
|
1601
|
+
effectRef: _angular_core.Signal<ElementRef<SMAAEffect> | undefined>;
|
|
1602
|
+
constructor();
|
|
1603
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpSMAA, never>;
|
|
1604
|
+
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
|
+
}
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* Configuration options for the tilt-shift effect.
|
|
1609
|
+
* Derived from TiltShiftEffect constructor parameters.
|
|
1610
|
+
*/
|
|
1611
|
+
type TiltShiftEffectOptions = Partial<NonNullable<ConstructorParameters<typeof TiltShiftEffect>[0]>>;
|
|
1612
|
+
/**
|
|
1613
|
+
* Angular component that applies a tilt-shift blur effect.
|
|
1614
|
+
*
|
|
1615
|
+
* This effect simulates the shallow depth of field look from tilt-shift
|
|
1616
|
+
* photography, creating a "miniature" or "diorama" appearance where only
|
|
1617
|
+
* a horizontal band of the image is in focus.
|
|
1618
|
+
*
|
|
1619
|
+
* Uses the postprocessing library's built-in TiltShiftEffect.
|
|
1620
|
+
*
|
|
1621
|
+
* @example
|
|
1622
|
+
* ```html
|
|
1623
|
+
* <ngtp-effect-composer>
|
|
1624
|
+
* <ngtp-tilt-shift [options]="{ blur: 0.5, offset: 0.5 }" />
|
|
1625
|
+
* </ngtp-effect-composer>
|
|
1626
|
+
* ```
|
|
1627
|
+
*
|
|
1628
|
+
* @see NgtpTiltShift2 for an alternative implementation with different parameters
|
|
1629
|
+
*/
|
|
1630
|
+
declare class NgtpTiltShift {
|
|
1631
|
+
/**
|
|
1632
|
+
* Configuration options for the tilt-shift effect.
|
|
1633
|
+
* @see TiltShiftEffectOptions
|
|
1634
|
+
*/
|
|
1635
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1636
|
+
blendFunction?: BlendFunction;
|
|
1637
|
+
offset?: number;
|
|
1638
|
+
rotation?: number;
|
|
1639
|
+
focusArea?: number;
|
|
1640
|
+
feather?: number;
|
|
1641
|
+
bias?: number;
|
|
1642
|
+
kernelSize?: postprocessing.KernelSize;
|
|
1643
|
+
resolutionScale?: number;
|
|
1644
|
+
resolutionX?: number;
|
|
1645
|
+
resolutionY?: number;
|
|
1646
|
+
}>, "blendFunction">>;
|
|
1647
|
+
/** Reference to the host NgtpEffect directive */
|
|
1648
|
+
protected hostEffect: NgtpEffect;
|
|
1649
|
+
effectRef: _angular_core.Signal<ElementRef<TiltShiftEffect> | undefined>;
|
|
1650
|
+
constructor();
|
|
1651
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpTiltShift, never>;
|
|
1652
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpTiltShift, "ngtp-tilt-shift", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
/**
|
|
1656
|
+
* A custom tilt-shift effect with line-based focus control.
|
|
1657
|
+
*
|
|
1658
|
+
* This effect provides a different approach to tilt-shift compared to
|
|
1659
|
+
* the standard TiltShiftEffect, allowing you to define a focus line
|
|
1660
|
+
* between two screen-space points.
|
|
1661
|
+
*
|
|
1662
|
+
* @example
|
|
1663
|
+
* ```typescript
|
|
1664
|
+
* const effect = new TiltShift2Effect({
|
|
1665
|
+
* blur: 0.2,
|
|
1666
|
+
* start: [0.5, 0.3],
|
|
1667
|
+
* end: [0.5, 0.7]
|
|
1668
|
+
* });
|
|
1669
|
+
* ```
|
|
1670
|
+
*/
|
|
1671
|
+
declare class TiltShift2Effect extends Effect {
|
|
1672
|
+
/**
|
|
1673
|
+
* Creates a new TiltShift2Effect instance.
|
|
1674
|
+
*
|
|
1675
|
+
* @param options - Configuration options
|
|
1676
|
+
* @param options.blendFunction - How to blend with the scene
|
|
1677
|
+
* @param options.blur - Blur intensity [0, 1], can exceed 1 for more blur
|
|
1678
|
+
* @param options.taper - Taper of the focus area [0, 1]
|
|
1679
|
+
* @param options.start - Start point of focus line in screen space [x, y]
|
|
1680
|
+
* @param options.end - End point of focus line in screen space [x, y]
|
|
1681
|
+
* @param options.samples - Number of blur samples
|
|
1682
|
+
* @param options.direction - Direction of the blur
|
|
1683
|
+
*/
|
|
1684
|
+
constructor({ blendFunction, blur, // [0, 1], can go beyond 1 for extra
|
|
1685
|
+
taper, // [0, 1], can go beyond 1 for extra
|
|
1686
|
+
start, // [0,1] percentage x,y of screenspace
|
|
1687
|
+
end, // [0,1] percentage x,y of screenspace
|
|
1688
|
+
samples, // number of blur samples
|
|
1689
|
+
direction, }?: {
|
|
1690
|
+
blendFunction?: BlendFunction | undefined;
|
|
1691
|
+
blur?: number | undefined;
|
|
1692
|
+
taper?: number | undefined;
|
|
1693
|
+
start?: number[] | undefined;
|
|
1694
|
+
end?: number[] | undefined;
|
|
1695
|
+
samples?: number | undefined;
|
|
1696
|
+
direction?: number[] | undefined;
|
|
1697
|
+
});
|
|
1698
|
+
}
|
|
1699
|
+
/**
|
|
1700
|
+
* Configuration options for the TiltShift2 effect.
|
|
1701
|
+
* Derived from TiltShift2Effect constructor parameters.
|
|
1702
|
+
*/
|
|
1703
|
+
type TiltShift2EffectOptions = Partial<NonNullable<ConstructorParameters<typeof TiltShift2Effect>[0]>>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Angular component that applies an alternative tilt-shift effect.
|
|
1706
|
+
*
|
|
1707
|
+
* This effect uses a line-based focus system where you define start and
|
|
1708
|
+
* end points in screen space. The area between these points stays in focus
|
|
1709
|
+
* while the rest of the image is blurred.
|
|
1710
|
+
*
|
|
1711
|
+
* @example
|
|
1712
|
+
* ```html
|
|
1713
|
+
* <ngtp-effect-composer>
|
|
1714
|
+
* <ngtp-tilt-shift2 [options]="{ blur: 0.2, start: [0.5, 0.3], end: [0.5, 0.7] }" />
|
|
1715
|
+
* </ngtp-effect-composer>
|
|
1716
|
+
* ```
|
|
1717
|
+
*
|
|
1718
|
+
* @see NgtpTiltShift for the standard tilt-shift implementation
|
|
1719
|
+
*/
|
|
1720
|
+
declare class NgtpTiltShift2 {
|
|
1721
|
+
/**
|
|
1722
|
+
* Configuration options for the tilt-shift effect.
|
|
1723
|
+
* @see TiltShift2EffectOptions
|
|
1724
|
+
*/
|
|
1725
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1726
|
+
blendFunction?: BlendFunction | undefined;
|
|
1727
|
+
blur?: number | undefined;
|
|
1728
|
+
taper?: number | undefined;
|
|
1729
|
+
start?: number[] | undefined;
|
|
1730
|
+
end?: number[] | undefined;
|
|
1731
|
+
samples?: number | undefined;
|
|
1732
|
+
direction?: number[] | undefined;
|
|
1733
|
+
}>, "blendFunction">>;
|
|
1734
|
+
/** Reference to the host NgtpEffect directive */
|
|
1735
|
+
protected hostEffect: NgtpEffect;
|
|
1736
|
+
effectRef: _angular_core.Signal<ElementRef<TiltShift2Effect> | undefined>;
|
|
1737
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpTiltShift2, never>;
|
|
1738
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpTiltShift2, "ngtp-tilt-shift2", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
/**
|
|
1742
|
+
* Configuration options for the tone mapping effect.
|
|
1743
|
+
* Derived from ToneMappingEffect constructor parameters.
|
|
1744
|
+
*/
|
|
1745
|
+
type ToneMappingEffectOptions = NonNullable<ConstructorParameters<typeof ToneMappingEffect>[0]>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Angular component that applies tone mapping to the scene.
|
|
1748
|
+
*
|
|
1749
|
+
* Tone mapping converts HDR (High Dynamic Range) values to LDR (Low Dynamic
|
|
1750
|
+
* Range) for display. Various tone mapping modes are available including
|
|
1751
|
+
* Reinhard, ACES Filmic, and custom linear options.
|
|
1752
|
+
*
|
|
1753
|
+
* Note: The effect composer disables Three.js's built-in tone mapping,
|
|
1754
|
+
* so this effect should be used if tone mapping is desired.
|
|
1755
|
+
*
|
|
1756
|
+
* @example
|
|
1757
|
+
* ```html
|
|
1758
|
+
* <ngtp-effect-composer>
|
|
1759
|
+
* <ngtp-tone-mapping [options]="{ mode: ToneMappingMode.ACES_FILMIC }" />
|
|
1760
|
+
* </ngtp-effect-composer>
|
|
1761
|
+
* ```
|
|
1762
|
+
*/
|
|
1763
|
+
declare class NgtpToneMapping {
|
|
1764
|
+
/**
|
|
1765
|
+
* Configuration options for the tone mapping effect.
|
|
1766
|
+
* @see ToneMappingEffectOptions
|
|
1767
|
+
*/
|
|
1768
|
+
options: _angular_core.InputSignal<Omit<{
|
|
1769
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
1770
|
+
adaptive?: boolean;
|
|
1771
|
+
mode?: postprocessing.ToneMappingMode;
|
|
1772
|
+
resolution?: number;
|
|
1773
|
+
maxLuminance?: number;
|
|
1774
|
+
whitePoint?: number;
|
|
1775
|
+
middleGrey?: number;
|
|
1776
|
+
minLuminance?: number;
|
|
1777
|
+
averageLuminance?: number;
|
|
1778
|
+
adaptationRate?: number;
|
|
1779
|
+
}, "blendFunction">>;
|
|
1780
|
+
/** Reference to the host NgtpEffect directive */
|
|
1781
|
+
protected hostEffect: NgtpEffect;
|
|
1782
|
+
effectRef: _angular_core.Signal<ElementRef<ToneMappingEffect> | undefined>;
|
|
1783
|
+
constructor();
|
|
1784
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpToneMapping, never>;
|
|
1785
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpToneMapping, "ngtp-tone-mapping", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* Configuration options for the vignette effect.
|
|
1790
|
+
* Derived from VignetteEffect constructor parameters.
|
|
1791
|
+
*/
|
|
1792
|
+
type VignetteEffectOptions = Partial<NonNullable<ConstructorParameters<typeof VignetteEffect>[0]>>;
|
|
1793
|
+
/**
|
|
1794
|
+
* Angular component that applies a vignette effect to the scene.
|
|
1795
|
+
*
|
|
1796
|
+
* This effect darkens the corners and edges of the image, drawing the
|
|
1797
|
+
* viewer's attention to the center. It's a common cinematic technique
|
|
1798
|
+
* for creating focus and atmosphere.
|
|
1799
|
+
*
|
|
1800
|
+
* @example
|
|
1801
|
+
* ```html
|
|
1802
|
+
* <ngtp-effect-composer>
|
|
1803
|
+
* <ngtp-vignette [options]="{ darkness: 0.5, offset: 0.3 }" />
|
|
1804
|
+
* </ngtp-effect-composer>
|
|
1805
|
+
* ```
|
|
1806
|
+
*/
|
|
1807
|
+
declare class NgtpVignette {
|
|
1808
|
+
/**
|
|
1809
|
+
* Configuration options for the vignette effect.
|
|
1810
|
+
* @see VignetteEffectOptions
|
|
1811
|
+
*/
|
|
1812
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1813
|
+
blendFunction?: postprocessing.BlendFunction;
|
|
1814
|
+
technique?: postprocessing.VignetteTechnique;
|
|
1815
|
+
eskil?: boolean;
|
|
1816
|
+
offset?: number;
|
|
1817
|
+
darkness?: number;
|
|
1818
|
+
}>, "blendFunction">>;
|
|
1819
|
+
/** Reference to the host NgtpEffect directive */
|
|
1820
|
+
protected hostEffect: NgtpEffect;
|
|
1821
|
+
effectRef: _angular_core.Signal<ElementRef<VignetteEffect> | undefined>;
|
|
1822
|
+
constructor();
|
|
1823
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpVignette, never>;
|
|
1824
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgtpVignette, "ngtp-vignette", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, [{ directive: typeof NgtpEffect; inputs: { "blendFunction": "blendFunction"; "opacity": "opacity"; }; outputs: {}; }]>;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
/**
|
|
1828
|
+
* A postprocessing effect that simulates an underwater/water distortion.
|
|
1829
|
+
*
|
|
1830
|
+
* Creates animated rippling distortion that makes the scene appear as if
|
|
1831
|
+
* viewed through water or a heat haze.
|
|
1832
|
+
*
|
|
1833
|
+
* @example
|
|
1834
|
+
* ```typescript
|
|
1835
|
+
* const effect = new WaterEffect({ factor: 0.5 });
|
|
1836
|
+
* ```
|
|
1837
|
+
*/
|
|
1838
|
+
declare class WaterEffect extends Effect {
|
|
1839
|
+
/**
|
|
1840
|
+
* Creates a new WaterEffect instance.
|
|
1841
|
+
*
|
|
1842
|
+
* @param options - Configuration options
|
|
1843
|
+
* @param options.blendFunction - How to blend with the scene
|
|
1844
|
+
* @param options.factor - Intensity of the water effect (0 = no effect)
|
|
1845
|
+
*/
|
|
1846
|
+
constructor({ blendFunction, factor }?: {
|
|
1847
|
+
blendFunction?: BlendFunction | undefined;
|
|
1848
|
+
factor?: number | undefined;
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* Configuration options for the water effect.
|
|
1853
|
+
* Derived from WaterEffect constructor parameters.
|
|
1854
|
+
*/
|
|
1855
|
+
type WaterEffectOptions = Partial<NonNullable<ConstructorParameters<typeof WaterEffect>[0]>>;
|
|
1856
|
+
/**
|
|
1857
|
+
* Angular component that applies a water/ripple distortion effect.
|
|
1858
|
+
*
|
|
1859
|
+
* This effect creates an animated underwater-like distortion that can
|
|
1860
|
+
* simulate viewing through water, heat haze, or a dream-like state.
|
|
1861
|
+
*
|
|
1862
|
+
* @example
|
|
1863
|
+
* ```html
|
|
1864
|
+
* <ngtp-effect-composer>
|
|
1865
|
+
* <ngtp-water [options]="{ factor: 0.5 }" />
|
|
1866
|
+
* </ngtp-effect-composer>
|
|
1867
|
+
* ```
|
|
1868
|
+
*/
|
|
1869
|
+
declare class NgtpWater {
|
|
1870
|
+
/**
|
|
1871
|
+
* Configuration options for the water effect.
|
|
1872
|
+
* @see WaterEffectOptions
|
|
1873
|
+
*/
|
|
1874
|
+
options: _angular_core.InputSignal<Omit<Partial<{
|
|
1875
|
+
blendFunction?: BlendFunction | undefined;
|
|
1876
|
+
factor?: number | undefined;
|
|
1877
|
+
}>, "blendFunction">>;
|
|
1878
|
+
/** Reference to the host NgtpEffect directive */
|
|
1879
|
+
protected hostEffect: NgtpEffect;
|
|
1880
|
+
effectRef: _angular_core.Signal<ElementRef<WaterEffect> | undefined>;
|
|
1881
|
+
constructor();
|
|
1882
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgtpWater, never>;
|
|
1883
|
+
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
|
+
}
|
|
1885
|
+
|
|
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 };
|