angular-three-postprocessing 2.0.0-beta.6 → 2.0.0-beta.8
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/esm2022/index.mjs +4 -3
- package/esm2022/lib/effect-composer.mjs +248 -0
- package/esm2022/lib/effect.mjs +78 -0
- package/esm2022/lib/effects/bloom/bloom.mjs +33 -0
- package/esm2022/lib/effects/brightness-contrast/brightness-contrast.mjs +29 -0
- package/esm2022/lib/effects/color-depth/color-depth.mjs +29 -0
- package/esm2022/lib/effects/depth/depth.mjs +29 -0
- package/esm2022/lib/effects/dot-screen/dot-screen.mjs +29 -0
- package/esm2022/lib/effects/hue-saturation/hue-saturation.mjs +29 -0
- package/esm2022/lib/effects/index.mjs +18 -0
- package/esm2022/lib/effects/lut/lut.mjs +70 -0
- package/esm2022/lib/effects/noise/noise.mjs +33 -0
- package/esm2022/lib/effects/pixelation/pixelation.mjs +33 -0
- package/esm2022/lib/effects/scanline/scanline.mjs +33 -0
- package/esm2022/lib/effects/sepia/sepia.mjs +29 -0
- package/esm2022/lib/effects/shock-wave/shock-wave.mjs +29 -0
- package/esm2022/lib/effects/smaa/smaa.mjs +29 -0
- package/esm2022/lib/effects/ssao/ssao.mjs +213 -0
- package/esm2022/lib/effects/tilt-shift/tilt-shift.mjs +33 -0
- package/esm2022/lib/effects/tone-mapping/tone-mapping.mjs +29 -0
- package/esm2022/lib/effects/vignette/vignette.mjs +29 -0
- package/fesm2022/angular-three-postprocessing.mjs +868 -206
- package/fesm2022/angular-three-postprocessing.mjs.map +1 -1
- package/index.d.ts +3 -2
- package/lib/effect-composer.d.ts +100 -0
- package/lib/effect.d.ts +27 -0
- package/{effects → lib/effects}/bloom/bloom.d.ts +7 -2
- package/{effects → lib/effects}/brightness-contrast/brightness-contrast.d.ts +9 -1
- package/{effects → lib/effects}/color-depth/color-depth.d.ts +8 -1
- package/{effects → lib/effects}/depth/depth.d.ts +8 -1
- package/{effects → lib/effects}/dot-screen/dot-screen.d.ts +9 -1
- package/{effects → lib/effects}/hue-saturation/hue-saturation.d.ts +9 -1
- package/{effects → lib/effects}/index.d.ts +1 -0
- package/lib/effects/lut/lut.d.ts +29 -0
- package/{effects → lib/effects}/noise/noise.d.ts +8 -1
- package/lib/effects/pixelation/pixelation.d.ts +20 -0
- package/{effects → lib/effects}/scanline/scanline.d.ts +8 -1
- package/{effects → lib/effects}/sepia/sepia.d.ts +8 -1
- package/lib/effects/shock-wave/shock-wave.d.ts +17 -0
- package/lib/effects/smaa/smaa.d.ts +16 -0
- package/lib/effects/ssao/ssao.d.ts +42 -0
- package/lib/effects/tilt-shift/tilt-shift.d.ts +23 -0
- package/lib/effects/tone-mapping/tone-mapping.d.ts +22 -0
- package/lib/effects/vignette/vignette.d.ts +17 -0
- package/package.json +3 -14
- package/effect-composer.d.ts +0 -53
- package/effect.d.ts +0 -24
- package/effects/README.md +0 -3
- package/effects/lut/lut.d.ts +0 -19
- package/effects/shock-wave/shock-wave.d.ts +0 -7
- package/effects/smaa/smaa.d.ts +0 -7
- package/effects/ssao/ssao.d.ts +0 -38
- package/effects/tilt-shift/tilt-shift.d.ts +0 -8
- package/effects/tone-mapping/tone-mapping.d.ts +0 -7
- package/effects/vignette/vignette.d.ts +0 -7
- package/esm2022/effect-composer.mjs +0 -242
- package/esm2022/effect.mjs +0 -79
- package/esm2022/effects/angular-three-postprocessing-effects.mjs +0 -5
- package/esm2022/effects/bloom/bloom.mjs +0 -34
- package/esm2022/effects/brightness-contrast/brightness-contrast.mjs +0 -30
- package/esm2022/effects/color-depth/color-depth.mjs +0 -30
- package/esm2022/effects/depth/depth.mjs +0 -30
- package/esm2022/effects/dot-screen/dot-screen.mjs +0 -30
- package/esm2022/effects/hue-saturation/hue-saturation.mjs +0 -30
- package/esm2022/effects/index.mjs +0 -17
- package/esm2022/effects/lut/lut.mjs +0 -77
- package/esm2022/effects/noise/noise.mjs +0 -34
- package/esm2022/effects/scanline/scanline.mjs +0 -34
- package/esm2022/effects/sepia/sepia.mjs +0 -30
- package/esm2022/effects/shock-wave/shock-wave.mjs +0 -30
- package/esm2022/effects/smaa/smaa.mjs +0 -30
- package/esm2022/effects/ssao/ssao.mjs +0 -187
- package/esm2022/effects/tilt-shift/tilt-shift.mjs +0 -34
- package/esm2022/effects/tone-mapping/tone-mapping.mjs +0 -30
- package/esm2022/effects/vignette/vignette.mjs +0 -30
- package/fesm2022/angular-three-postprocessing-effects.mjs +0 -617
- package/fesm2022/angular-three-postprocessing-effects.mjs.map +0 -1
- package/plugin/README.md +0 -11
- package/plugin/generators.json +0 -19
- package/plugin/package.json +0 -9
- package/plugin/src/generators/init/compat.d.ts +0 -2
- package/plugin/src/generators/init/compat.js +0 -6
- package/plugin/src/generators/init/compat.js.map +0 -1
- package/plugin/src/generators/init/init.d.ts +0 -4
- package/plugin/src/generators/init/init.js +0 -22
- package/plugin/src/generators/init/init.js.map +0 -1
- package/plugin/src/generators/init/schema.json +0 -6
- package/plugin/src/index.d.ts +0 -1
- package/plugin/src/index.js +0 -6
- package/plugin/src/index.js.map +0 -1
|
@@ -1,65 +1,63 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BlendFunction, EffectComposer, RenderPass, NormalPass, DepthDownsamplingPass, EffectPass } from 'postprocessing';
|
|
2
|
+
import { computed, effect, Directive, Input, forwardRef, inject, Injector, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
|
+
import { signalStore, injectNgtRef, injectNgtStore, getLocalState, is, extend, createInjectionToken, injectBeforeRender, NgtArgs } from 'angular-three';
|
|
4
|
+
import { BlendFunction, EffectComposer, RenderPass, NormalPass, DepthDownsamplingPass, Effect, EffectPass, Pass, BloomEffect, BrightnessContrastEffect, ColorDepthEffect, DepthEffect, DotScreenEffect, HueSaturationEffect, LUT3DEffect, NoiseEffect, PixelationEffect, ScanlineEffect, SepiaEffect, ShockWaveEffect, SMAAEffect, SSAOEffect, TiltShiftEffect, ToneMappingEffect, VignetteEffect } from 'postprocessing';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { Group } from 'three';
|
|
7
7
|
import { isWebGL2Available } from 'three-stdlib';
|
|
8
8
|
|
|
9
|
-
class NgtpEffect
|
|
10
|
-
set
|
|
11
|
-
this.set({ blendFunction });
|
|
9
|
+
class NgtpEffect {
|
|
10
|
+
set _blendFunction(blendFunction) {
|
|
11
|
+
this.inputs.set({ blendFunction });
|
|
12
12
|
}
|
|
13
|
-
set
|
|
14
|
-
this.set({ opacity });
|
|
13
|
+
set _opacity(opacity) {
|
|
14
|
+
this.inputs.set({ opacity });
|
|
15
15
|
}
|
|
16
|
-
#previousProps;
|
|
17
|
-
#nativeProps;
|
|
18
16
|
constructor() {
|
|
19
|
-
|
|
17
|
+
this.inputs = signalStore();
|
|
20
18
|
this.effectRef = injectNgtRef();
|
|
21
19
|
this.defaultBlendFunction = BlendFunction.NORMAL;
|
|
22
20
|
this.nativeArgs = () => [];
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.store =
|
|
21
|
+
this.blendFunction = this.inputs.select('blendFunction');
|
|
22
|
+
this.opacity = this.inputs.select('opacity');
|
|
23
|
+
this.store = injectNgtStore();
|
|
26
24
|
this.camera = this.store.select('camera');
|
|
27
|
-
this
|
|
25
|
+
this.invalidate = this.store.select('invalidate');
|
|
26
|
+
this.nativeInputs = computed(() => {
|
|
28
27
|
const effect = this.effectRef.nativeElement;
|
|
29
28
|
if (!effect)
|
|
30
|
-
return this
|
|
29
|
+
return this.previousInputs || null;
|
|
31
30
|
const localState = getLocalState(effect);
|
|
32
31
|
if (!localState)
|
|
33
|
-
return this
|
|
34
|
-
const nativeProps = localState.nativeProps.
|
|
32
|
+
return this.previousInputs || null;
|
|
33
|
+
const nativeProps = localState.nativeProps.state();
|
|
35
34
|
delete nativeProps['__ngt_dummy_state__'];
|
|
36
35
|
if ('camera' in nativeProps) {
|
|
37
36
|
delete nativeProps['camera'];
|
|
38
37
|
}
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
if (!Object.keys(nativeProps).length)
|
|
39
|
+
return this.previousInputs || null;
|
|
40
|
+
return (this.previousInputs = nativeProps);
|
|
41
|
+
}, { equal: (a, b) => is.equ(a, b, { objects: 'shallow' }) });
|
|
41
42
|
this.args = computed(() => {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
47
|
-
});
|
|
48
|
-
requestAnimationFrameInInjectionContext(() => {
|
|
49
|
-
this.#setBlendMode();
|
|
43
|
+
const [nativeInputs, nativeArgs] = [this.nativeInputs(), this.nativeArgs()];
|
|
44
|
+
if (nativeInputs) {
|
|
45
|
+
nativeArgs.push(nativeInputs);
|
|
46
|
+
}
|
|
47
|
+
return nativeArgs;
|
|
50
48
|
});
|
|
49
|
+
this.setBlendMode();
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
const trigger = computed(() => ({
|
|
54
|
-
blendFunction: this.effectBlendFunction(),
|
|
55
|
-
opacity: this.effectOpacity(),
|
|
56
|
-
effect: this.effectRef.nativeElement,
|
|
57
|
-
}));
|
|
51
|
+
setBlendMode() {
|
|
58
52
|
effect(() => {
|
|
59
|
-
const
|
|
53
|
+
const [blendFunction, opacity, effect, invalidate] = [
|
|
54
|
+
this.blendFunction(),
|
|
55
|
+
this.opacity(),
|
|
56
|
+
this.effectRef.nativeElement,
|
|
57
|
+
this.invalidate(),
|
|
58
|
+
];
|
|
60
59
|
if (!effect)
|
|
61
60
|
return;
|
|
62
|
-
const invalidate = this.store.get('invalidate');
|
|
63
61
|
effect.blendMode.blendFunction =
|
|
64
62
|
!blendFunction && blendFunction !== 0 ? this.defaultBlendFunction : blendFunction;
|
|
65
63
|
if (opacity !== undefined)
|
|
@@ -67,73 +65,59 @@ class NgtpEffect extends NgtSignalStore {
|
|
|
67
65
|
invalidate();
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
71
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpEffect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
69
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.7", type: NgtpEffect, inputs: { effectRef: "effectRef", _blendFunction: ["blendFunction", "_blendFunction"], _opacity: ["opacity", "_opacity"] }, ngImport: i0 }); }
|
|
72
70
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpEffect, decorators: [{
|
|
74
72
|
type: Directive
|
|
75
73
|
}], ctorParameters: function () { return []; }, propDecorators: { effectRef: [{
|
|
76
74
|
type: Input
|
|
77
|
-
}],
|
|
78
|
-
type: Input
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
}], _blendFunction: [{
|
|
76
|
+
type: Input,
|
|
77
|
+
args: [{ alias: 'blendFunction' }]
|
|
78
|
+
}], _opacity: [{
|
|
79
|
+
type: Input,
|
|
80
|
+
args: [{ alias: 'opacity' }]
|
|
81
81
|
}] } });
|
|
82
82
|
|
|
83
83
|
extend({ Group });
|
|
84
|
-
const
|
|
85
|
-
class NgtpEffectComposer
|
|
86
|
-
set
|
|
87
|
-
this.set({ enabled });
|
|
88
|
-
}
|
|
89
|
-
set
|
|
90
|
-
this.set({ depthBuffer });
|
|
91
|
-
}
|
|
92
|
-
set
|
|
93
|
-
this.set({ disableNormalPass });
|
|
94
|
-
}
|
|
95
|
-
set
|
|
96
|
-
this.set({ stencilBuffer });
|
|
97
|
-
}
|
|
98
|
-
set
|
|
99
|
-
this.set({ autoClear });
|
|
100
|
-
}
|
|
101
|
-
set
|
|
102
|
-
this.set({ resolutionScale });
|
|
103
|
-
}
|
|
104
|
-
set
|
|
105
|
-
this.set({ multisampling });
|
|
106
|
-
}
|
|
107
|
-
set
|
|
108
|
-
this.set({ frameBufferType });
|
|
109
|
-
}
|
|
110
|
-
set
|
|
111
|
-
this.set({ renderPriority });
|
|
112
|
-
}
|
|
113
|
-
set
|
|
114
|
-
this.set({ camera });
|
|
115
|
-
}
|
|
116
|
-
set
|
|
117
|
-
this.set({ scene });
|
|
118
|
-
}
|
|
119
|
-
#store;
|
|
120
|
-
#gl;
|
|
121
|
-
#size;
|
|
122
|
-
#defaultScene;
|
|
123
|
-
#defaultCamera;
|
|
124
|
-
#scene;
|
|
125
|
-
#camera;
|
|
126
|
-
#depthBuffer;
|
|
127
|
-
#stencilBuffer;
|
|
128
|
-
#multisampling;
|
|
129
|
-
#frameBufferType;
|
|
130
|
-
#disableNormalPass;
|
|
131
|
-
#resolutionScale;
|
|
132
|
-
#activeScene;
|
|
133
|
-
#activeCamera;
|
|
134
|
-
#composerEntities;
|
|
84
|
+
const [injectNgtpEffectComposerApi, provideNgtpEffectComposerApi] = createInjectionToken((composer) => composer.api, { isRoot: false, deps: [forwardRef(() => NgtpEffectComposer)] });
|
|
85
|
+
class NgtpEffectComposer {
|
|
86
|
+
set _enabled(enabled) {
|
|
87
|
+
this.inputs.set({ enabled });
|
|
88
|
+
}
|
|
89
|
+
set _depthBuffer(depthBuffer) {
|
|
90
|
+
this.inputs.set({ depthBuffer });
|
|
91
|
+
}
|
|
92
|
+
set _disableNormalPass(disableNormalPass) {
|
|
93
|
+
this.inputs.set({ disableNormalPass });
|
|
94
|
+
}
|
|
95
|
+
set _stencilBuffer(stencilBuffer) {
|
|
96
|
+
this.inputs.set({ stencilBuffer });
|
|
97
|
+
}
|
|
98
|
+
set _autoClear(autoClear) {
|
|
99
|
+
this.inputs.set({ autoClear });
|
|
100
|
+
}
|
|
101
|
+
set _resolutionScale(resolutionScale) {
|
|
102
|
+
this.inputs.set({ resolutionScale });
|
|
103
|
+
}
|
|
104
|
+
set _multisampling(multisampling) {
|
|
105
|
+
this.inputs.set({ multisampling });
|
|
106
|
+
}
|
|
107
|
+
set _frameBufferType(frameBufferType) {
|
|
108
|
+
this.inputs.set({ frameBufferType });
|
|
109
|
+
}
|
|
110
|
+
set _renderPriority(renderPriority) {
|
|
111
|
+
this.inputs.set({ renderPriority });
|
|
112
|
+
}
|
|
113
|
+
set _camera(camera) {
|
|
114
|
+
this.inputs.set({ camera });
|
|
115
|
+
}
|
|
116
|
+
set _scene(scene) {
|
|
117
|
+
this.inputs.set({ scene });
|
|
118
|
+
}
|
|
135
119
|
constructor() {
|
|
136
|
-
|
|
120
|
+
this.inputs = signalStore({
|
|
137
121
|
enabled: true,
|
|
138
122
|
renderPriority: 1,
|
|
139
123
|
autoClear: true,
|
|
@@ -141,32 +125,36 @@ class NgtpEffectComposer extends NgtSignalStore {
|
|
|
141
125
|
frameBufferType: THREE.HalfFloatType,
|
|
142
126
|
});
|
|
143
127
|
this.composerRef = injectNgtRef();
|
|
144
|
-
this
|
|
145
|
-
this
|
|
146
|
-
this
|
|
147
|
-
this
|
|
148
|
-
this
|
|
149
|
-
this
|
|
150
|
-
this
|
|
151
|
-
this
|
|
152
|
-
this
|
|
153
|
-
this
|
|
154
|
-
this
|
|
155
|
-
this
|
|
156
|
-
this
|
|
157
|
-
this
|
|
158
|
-
this
|
|
159
|
-
this
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const scene = this.#activeScene();
|
|
163
|
-
const depthBuffer = this.#depthBuffer();
|
|
164
|
-
const stencilBuffer = this.#stencilBuffer();
|
|
165
|
-
const multisampling = this.#multisampling();
|
|
166
|
-
const frameBufferType = this.#frameBufferType();
|
|
167
|
-
const disableNormalPass = this.#disableNormalPass();
|
|
168
|
-
const resolutionScale = this.#resolutionScale();
|
|
128
|
+
this.injector = inject(Injector);
|
|
129
|
+
this.store = injectNgtStore();
|
|
130
|
+
this.gl = this.store.select('gl');
|
|
131
|
+
this.defaultScene = this.store.select('scene');
|
|
132
|
+
this.defaultCamera = this.store.select('camera');
|
|
133
|
+
this.size = this.store.select('size');
|
|
134
|
+
this.depthBuffer = this.inputs.select('depthBuffer');
|
|
135
|
+
this.stencilBuffer = this.inputs.select('stencilBuffer');
|
|
136
|
+
this.multisampling = this.inputs.select('multisampling');
|
|
137
|
+
this.frameBufferType = this.inputs.select('frameBufferType');
|
|
138
|
+
this.scene = this.inputs.select('scene');
|
|
139
|
+
this.camera = this.inputs.select('camera');
|
|
140
|
+
this.disableNormalPass = this.inputs.select('disableNormalPass');
|
|
141
|
+
this.resolutionScale = this.inputs.select('resolutionScale');
|
|
142
|
+
this.autoClear = this.inputs.select('autoClear');
|
|
143
|
+
this.activeScene = computed(() => this.scene() || this.defaultScene());
|
|
144
|
+
this.activeCamera = computed(() => this.camera() || this.defaultCamera());
|
|
145
|
+
this.composerEntities = computed(() => {
|
|
169
146
|
const webGL2Available = isWebGL2Available();
|
|
147
|
+
const [gl, depthBuffer, stencilBuffer, multisampling, frameBufferType, scene, camera, disableNormalPass, resolutionScale,] = [
|
|
148
|
+
this.gl(),
|
|
149
|
+
this.depthBuffer(),
|
|
150
|
+
this.stencilBuffer(),
|
|
151
|
+
this.multisampling(),
|
|
152
|
+
this.frameBufferType(),
|
|
153
|
+
this.activeScene(),
|
|
154
|
+
this.activeCamera(),
|
|
155
|
+
this.disableNormalPass(),
|
|
156
|
+
this.resolutionScale(),
|
|
157
|
+
];
|
|
170
158
|
// Initialize composer
|
|
171
159
|
const effectComposer = new EffectComposer(gl, {
|
|
172
160
|
depthBuffer,
|
|
@@ -191,54 +179,62 @@ class NgtpEffectComposer extends NgtSignalStore {
|
|
|
191
179
|
}
|
|
192
180
|
return { effectComposer, normalPass, downSamplingPass };
|
|
193
181
|
});
|
|
182
|
+
this.composer = computed(() => this.composerEntities().effectComposer);
|
|
194
183
|
this.api = computed(() => {
|
|
195
|
-
const { effectComposer, normalPass, downSamplingPass } =
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
scene: this.#activeScene(),
|
|
203
|
-
};
|
|
204
|
-
});
|
|
205
|
-
requestAnimationFrameInInjectionContext(() => {
|
|
206
|
-
this.#setComposerSize();
|
|
207
|
-
this.#updateEffectPasses();
|
|
208
|
-
this.#setBeforeRender();
|
|
184
|
+
const [{ effectComposer: composer, normalPass, downSamplingPass }, resolutionScale, camera, scene] = [
|
|
185
|
+
this.composerEntities(),
|
|
186
|
+
this.resolutionScale(),
|
|
187
|
+
this.activeCamera(),
|
|
188
|
+
this.activeScene(),
|
|
189
|
+
];
|
|
190
|
+
return { composer, normalPass, downSamplingPass, resolutionScale, camera, scene };
|
|
209
191
|
});
|
|
192
|
+
this.setComposerSize();
|
|
193
|
+
this.updatePasses();
|
|
210
194
|
}
|
|
211
|
-
|
|
212
|
-
|
|
195
|
+
ngOnInit() {
|
|
196
|
+
this.beforeRender();
|
|
197
|
+
}
|
|
198
|
+
setComposerSize() {
|
|
213
199
|
effect(() => {
|
|
214
|
-
const
|
|
215
|
-
if (!composer)
|
|
216
|
-
return;
|
|
200
|
+
const [composer, size] = [this.composer(), this.size()];
|
|
217
201
|
composer.setSize(size.width, size.height);
|
|
218
202
|
});
|
|
219
203
|
}
|
|
220
|
-
|
|
221
|
-
const trigger = computed(() => ({
|
|
222
|
-
composerEntities: this.#composerEntities(),
|
|
223
|
-
instance: this.composerRef.nativeElement,
|
|
224
|
-
children: this.composerRef.children('nonObjects')(),
|
|
225
|
-
camera: this.#activeCamera(),
|
|
226
|
-
}));
|
|
204
|
+
updatePasses() {
|
|
227
205
|
effect((onCleanup) => {
|
|
228
|
-
const {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
206
|
+
const [{ effectComposer: composer, normalPass, downSamplingPass }, instance, children, camera] = [
|
|
207
|
+
this.composerEntities(),
|
|
208
|
+
this.composerRef.nativeElement,
|
|
209
|
+
this.composerRef.children('nonObjects')(),
|
|
210
|
+
this.activeCamera(),
|
|
211
|
+
];
|
|
212
|
+
const passes = [];
|
|
213
|
+
if (instance && composer && children.length) {
|
|
214
|
+
for (let i = 0; i < children.length; i++) {
|
|
215
|
+
const child = children[i];
|
|
216
|
+
if (child instanceof Effect) {
|
|
217
|
+
const effects = [];
|
|
218
|
+
while (children[i] instanceof Effect)
|
|
219
|
+
effects.push(children[i++]);
|
|
220
|
+
i--;
|
|
221
|
+
const pass = new EffectPass(camera, ...effects);
|
|
222
|
+
passes.push(pass);
|
|
223
|
+
}
|
|
224
|
+
else if (child instanceof Pass) {
|
|
225
|
+
passes.push(child);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
for (const pass of passes)
|
|
229
|
+
composer.addPass(pass);
|
|
234
230
|
if (normalPass)
|
|
235
231
|
normalPass.enabled = true;
|
|
236
232
|
if (downSamplingPass)
|
|
237
233
|
downSamplingPass.enabled = true;
|
|
238
234
|
}
|
|
239
235
|
onCleanup(() => {
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
for (const pass of passes)
|
|
237
|
+
composer?.removePass(pass);
|
|
242
238
|
if (normalPass)
|
|
243
239
|
normalPass.enabled = false;
|
|
244
240
|
if (downSamplingPass)
|
|
@@ -246,77 +242,743 @@ class NgtpEffectComposer extends NgtSignalStore {
|
|
|
246
242
|
});
|
|
247
243
|
});
|
|
248
244
|
}
|
|
249
|
-
|
|
245
|
+
beforeRender() {
|
|
250
246
|
injectBeforeRender(({ delta }) => {
|
|
251
|
-
const enabled =
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
const [enabled, gl, autoClear, stencilBuffer, composer] = [
|
|
248
|
+
this.inputs.get('enabled'),
|
|
249
|
+
this.gl(),
|
|
250
|
+
this.autoClear(),
|
|
251
|
+
this.stencilBuffer(),
|
|
252
|
+
this.composer(),
|
|
253
|
+
];
|
|
254
|
+
if (enabled) {
|
|
255
|
+
const currentAutoClear = gl.autoClear;
|
|
256
256
|
gl.autoClear = autoClear;
|
|
257
|
-
|
|
257
|
+
if (stencilBuffer && !autoClear)
|
|
258
|
+
gl.clearStencil();
|
|
259
|
+
composer.render(delta);
|
|
260
|
+
gl.autoClear = currentAutoClear;
|
|
258
261
|
}
|
|
259
|
-
}, {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<ng-content />
|
|
271
|
-
</ngt-group>
|
|
272
|
-
`, isInline: true }); }
|
|
262
|
+
}, {
|
|
263
|
+
injector: this.injector,
|
|
264
|
+
priority: this.inputs.get('enabled') ? this.inputs.get('renderPriority') : 0,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpEffectComposer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
268
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpEffectComposer, isStandalone: true, selector: "ngtp-effect-composer", inputs: { composerRef: "composerRef", _enabled: ["enabled", "_enabled"], _depthBuffer: ["depthBuffer", "_depthBuffer"], _disableNormalPass: ["disableNormalPass", "_disableNormalPass"], _stencilBuffer: ["stencilBuffer", "_stencilBuffer"], _autoClear: ["autoClear", "_autoClear"], _resolutionScale: ["resolutionScale", "_resolutionScale"], _multisampling: ["multisampling", "_multisampling"], _frameBufferType: ["frameBufferType", "_frameBufferType"], _renderPriority: ["renderPriority", "_renderPriority"], _camera: ["camera", "_camera"], _scene: ["scene", "_scene"] }, providers: [provideNgtpEffectComposerApi()], ngImport: i0, template: `
|
|
269
|
+
<ngt-group [ref]="composerRef">
|
|
270
|
+
<ng-content />
|
|
271
|
+
</ngt-group>
|
|
272
|
+
`, isInline: true }); }
|
|
273
273
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpEffectComposer, decorators: [{
|
|
275
275
|
type: Component,
|
|
276
276
|
args: [{
|
|
277
277
|
selector: 'ngtp-effect-composer',
|
|
278
278
|
standalone: true,
|
|
279
279
|
template: `
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
providers: [
|
|
285
|
-
{
|
|
286
|
-
provide: NGTP_EFFECT_COMPOSER_API,
|
|
287
|
-
useFactory: (composer) => composer.api,
|
|
288
|
-
deps: [NgtpEffectComposer],
|
|
289
|
-
},
|
|
290
|
-
],
|
|
280
|
+
<ngt-group [ref]="composerRef">
|
|
281
|
+
<ng-content />
|
|
282
|
+
</ngt-group>
|
|
283
|
+
`,
|
|
284
|
+
providers: [provideNgtpEffectComposerApi()],
|
|
291
285
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
292
286
|
}]
|
|
293
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
294
|
-
type: Input
|
|
295
|
-
}], depthBuffer: [{
|
|
296
|
-
type: Input
|
|
297
|
-
}], disableNormalPass: [{
|
|
298
|
-
type: Input
|
|
299
|
-
}], stencilBuffer: [{
|
|
300
|
-
type: Input
|
|
301
|
-
}], autoClear: [{
|
|
302
|
-
type: Input
|
|
303
|
-
}], resolutionScale: [{
|
|
304
|
-
type: Input
|
|
305
|
-
}], multisampling: [{
|
|
287
|
+
}], ctorParameters: function () { return []; }, propDecorators: { composerRef: [{
|
|
306
288
|
type: Input
|
|
307
|
-
}],
|
|
308
|
-
type: Input
|
|
309
|
-
|
|
289
|
+
}], _enabled: [{
|
|
290
|
+
type: Input,
|
|
291
|
+
args: [{ alias: 'enabled' }]
|
|
292
|
+
}], _depthBuffer: [{
|
|
293
|
+
type: Input,
|
|
294
|
+
args: [{ alias: 'depthBuffer' }]
|
|
295
|
+
}], _disableNormalPass: [{
|
|
296
|
+
type: Input,
|
|
297
|
+
args: [{ alias: 'disableNormalPass' }]
|
|
298
|
+
}], _stencilBuffer: [{
|
|
299
|
+
type: Input,
|
|
300
|
+
args: [{ alias: 'stencilBuffer' }]
|
|
301
|
+
}], _autoClear: [{
|
|
302
|
+
type: Input,
|
|
303
|
+
args: [{ alias: 'autoClear' }]
|
|
304
|
+
}], _resolutionScale: [{
|
|
305
|
+
type: Input,
|
|
306
|
+
args: [{ alias: 'resolutionScale' }]
|
|
307
|
+
}], _multisampling: [{
|
|
308
|
+
type: Input,
|
|
309
|
+
args: [{ alias: 'multisampling' }]
|
|
310
|
+
}], _frameBufferType: [{
|
|
311
|
+
type: Input,
|
|
312
|
+
args: [{ alias: 'frameBufferType' }]
|
|
313
|
+
}], _renderPriority: [{
|
|
314
|
+
type: Input,
|
|
315
|
+
args: [{ alias: 'renderPriority' }]
|
|
316
|
+
}], _camera: [{
|
|
317
|
+
type: Input,
|
|
318
|
+
args: [{ alias: 'camera' }]
|
|
319
|
+
}], _scene: [{
|
|
320
|
+
type: Input,
|
|
321
|
+
args: [{ alias: 'scene' }]
|
|
322
|
+
}] } });
|
|
323
|
+
|
|
324
|
+
extend({ BloomEffect });
|
|
325
|
+
class NgtpBloom extends NgtpEffect {
|
|
326
|
+
constructor() {
|
|
327
|
+
super(...arguments);
|
|
328
|
+
this.defaultBlendFunction = BlendFunction.ADD;
|
|
329
|
+
}
|
|
330
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpBloom, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
331
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpBloom, isStandalone: true, selector: "ngtp-bloom", usesInheritance: true, ngImport: i0, template: `
|
|
332
|
+
<ngt-bloom-effect ngtCompound *args="args()" [ref]="effectRef" [camera]="camera()">
|
|
333
|
+
<ng-content />
|
|
334
|
+
</ngt-bloom-effect>
|
|
335
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
336
|
+
}
|
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpBloom, decorators: [{
|
|
338
|
+
type: Component,
|
|
339
|
+
args: [{
|
|
340
|
+
selector: 'ngtp-bloom',
|
|
341
|
+
standalone: true,
|
|
342
|
+
template: `
|
|
343
|
+
<ngt-bloom-effect ngtCompound *args="args()" [ref]="effectRef" [camera]="camera()">
|
|
344
|
+
<ng-content />
|
|
345
|
+
</ngt-bloom-effect>
|
|
346
|
+
`,
|
|
347
|
+
imports: [NgtArgs],
|
|
348
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
349
|
+
}]
|
|
350
|
+
}] });
|
|
351
|
+
|
|
352
|
+
extend({ BrightnessContrastEffect });
|
|
353
|
+
class NgtpBrightnessContrast extends NgtpEffect {
|
|
354
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpBrightnessContrast, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
355
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpBrightnessContrast, isStandalone: true, selector: "ngtp-brightness-contrast", usesInheritance: true, ngImport: i0, template: `
|
|
356
|
+
<ngt-brightness-contrast-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
357
|
+
<ng-content />
|
|
358
|
+
</ngt-brightness-contrast-effect>
|
|
359
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
360
|
+
}
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpBrightnessContrast, decorators: [{
|
|
362
|
+
type: Component,
|
|
363
|
+
args: [{
|
|
364
|
+
selector: 'ngtp-brightness-contrast',
|
|
365
|
+
standalone: true,
|
|
366
|
+
template: `
|
|
367
|
+
<ngt-brightness-contrast-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
368
|
+
<ng-content />
|
|
369
|
+
</ngt-brightness-contrast-effect>
|
|
370
|
+
`,
|
|
371
|
+
imports: [NgtArgs],
|
|
372
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
373
|
+
}]
|
|
374
|
+
}] });
|
|
375
|
+
|
|
376
|
+
extend({ ColorDepthEffect });
|
|
377
|
+
class NgtpColorDepth extends NgtpEffect {
|
|
378
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpColorDepth, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
379
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpColorDepth, isStandalone: true, selector: "ngtp-color-depth", usesInheritance: true, ngImport: i0, template: `
|
|
380
|
+
<ngt-color-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
381
|
+
<ng-content />
|
|
382
|
+
</ngt-color-depth-effect>
|
|
383
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
384
|
+
}
|
|
385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpColorDepth, decorators: [{
|
|
386
|
+
type: Component,
|
|
387
|
+
args: [{
|
|
388
|
+
selector: 'ngtp-color-depth',
|
|
389
|
+
standalone: true,
|
|
390
|
+
template: `
|
|
391
|
+
<ngt-color-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
392
|
+
<ng-content />
|
|
393
|
+
</ngt-color-depth-effect>
|
|
394
|
+
`,
|
|
395
|
+
imports: [NgtArgs],
|
|
396
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
397
|
+
}]
|
|
398
|
+
}] });
|
|
399
|
+
|
|
400
|
+
extend({ DepthEffect });
|
|
401
|
+
class NgtpDepth extends NgtpEffect {
|
|
402
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpDepth, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
403
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpDepth, isStandalone: true, selector: "ngtp-depth", usesInheritance: true, ngImport: i0, template: `
|
|
404
|
+
<ngt-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
405
|
+
<ng-content />
|
|
406
|
+
</ngt-depth-effect>
|
|
407
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
408
|
+
}
|
|
409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpDepth, decorators: [{
|
|
410
|
+
type: Component,
|
|
411
|
+
args: [{
|
|
412
|
+
selector: 'ngtp-depth',
|
|
413
|
+
standalone: true,
|
|
414
|
+
template: `
|
|
415
|
+
<ngt-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
416
|
+
<ng-content />
|
|
417
|
+
</ngt-depth-effect>
|
|
418
|
+
`,
|
|
419
|
+
imports: [NgtArgs],
|
|
420
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
421
|
+
}]
|
|
422
|
+
}] });
|
|
423
|
+
|
|
424
|
+
extend({ DotScreenEffect });
|
|
425
|
+
class NgtpDotScreen extends NgtpEffect {
|
|
426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpDotScreen, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
427
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpDotScreen, isStandalone: true, selector: "ngtp-dot-screen", usesInheritance: true, ngImport: i0, template: `
|
|
428
|
+
<ngt-dot-screen-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
429
|
+
<ng-content />
|
|
430
|
+
</ngt-dot-screen-effect>
|
|
431
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
432
|
+
}
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpDotScreen, decorators: [{
|
|
434
|
+
type: Component,
|
|
435
|
+
args: [{
|
|
436
|
+
selector: 'ngtp-dot-screen',
|
|
437
|
+
standalone: true,
|
|
438
|
+
template: `
|
|
439
|
+
<ngt-dot-screen-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
440
|
+
<ng-content />
|
|
441
|
+
</ngt-dot-screen-effect>
|
|
442
|
+
`,
|
|
443
|
+
imports: [NgtArgs],
|
|
444
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
445
|
+
}]
|
|
446
|
+
}] });
|
|
447
|
+
|
|
448
|
+
extend({ HueSaturationEffect });
|
|
449
|
+
class NgtpHueSaturation extends NgtpEffect {
|
|
450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpHueSaturation, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
451
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpHueSaturation, isStandalone: true, selector: "ngtp-hue-saturation", usesInheritance: true, ngImport: i0, template: `
|
|
452
|
+
<ngt-hue-saturation-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
453
|
+
<ng-content />
|
|
454
|
+
</ngt-hue-saturation-effect>
|
|
455
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
456
|
+
}
|
|
457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpHueSaturation, decorators: [{
|
|
458
|
+
type: Component,
|
|
459
|
+
args: [{
|
|
460
|
+
selector: 'ngtp-hue-saturation',
|
|
461
|
+
standalone: true,
|
|
462
|
+
template: `
|
|
463
|
+
<ngt-hue-saturation-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
464
|
+
<ng-content />
|
|
465
|
+
</ngt-hue-saturation-effect>
|
|
466
|
+
`,
|
|
467
|
+
imports: [NgtArgs],
|
|
468
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
469
|
+
}]
|
|
470
|
+
}] });
|
|
471
|
+
|
|
472
|
+
class NgtpLUT {
|
|
473
|
+
set _lut(lut) {
|
|
474
|
+
this.inputs.set({ lut });
|
|
475
|
+
}
|
|
476
|
+
set _blendFunction(blendFunction) {
|
|
477
|
+
this.inputs.set({ blendFunction });
|
|
478
|
+
}
|
|
479
|
+
set _tetrahedralInterpolation(tetrahedralInterpolation) {
|
|
480
|
+
this.inputs.set({ tetrahedralInterpolation });
|
|
481
|
+
}
|
|
482
|
+
constructor() {
|
|
483
|
+
this.inputs = signalStore({});
|
|
484
|
+
this.effectRef = injectNgtRef();
|
|
485
|
+
this.lut = this.inputs.select('lut');
|
|
486
|
+
this.tetrahedralInterpolation = this.inputs.select('tetrahedralInterpolation');
|
|
487
|
+
this.blendFunction = this.inputs.select('blendFunction');
|
|
488
|
+
this.store = injectNgtStore();
|
|
489
|
+
this.invalidate = this.store.select('invalidate');
|
|
490
|
+
this.effect = computed(() => new LUT3DEffect(this.lut(), {
|
|
491
|
+
blendFunction: this.blendFunction(),
|
|
492
|
+
tetrahedralInterpolation: this.tetrahedralInterpolation(),
|
|
493
|
+
}));
|
|
494
|
+
this.setState();
|
|
495
|
+
}
|
|
496
|
+
setState() {
|
|
497
|
+
effect(() => {
|
|
498
|
+
const [effect, invalidate, lut, tetrahedralInterpolation] = [
|
|
499
|
+
this.effect(),
|
|
500
|
+
this.invalidate(),
|
|
501
|
+
this.lut(),
|
|
502
|
+
this.tetrahedralInterpolation(),
|
|
503
|
+
];
|
|
504
|
+
if (!effect)
|
|
505
|
+
return;
|
|
506
|
+
if (tetrahedralInterpolation)
|
|
507
|
+
effect.tetrahedralInterpolation = tetrahedralInterpolation;
|
|
508
|
+
if (lut)
|
|
509
|
+
effect.lut = lut;
|
|
510
|
+
invalidate();
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpLUT, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
514
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpLUT, isStandalone: true, selector: "ngtp-lut", inputs: { effectRef: "effectRef", _lut: ["lut", "_lut"], _blendFunction: ["blendFunction", "_blendFunction"], _tetrahedralInterpolation: ["tetrahedralInterpolation", "_tetrahedralInterpolation"] }, ngImport: i0, template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
515
|
+
}
|
|
516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpLUT, decorators: [{
|
|
517
|
+
type: Component,
|
|
518
|
+
args: [{
|
|
519
|
+
selector: 'ngtp-lut',
|
|
520
|
+
standalone: true,
|
|
521
|
+
template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `,
|
|
522
|
+
imports: [NgtArgs],
|
|
523
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
524
|
+
}]
|
|
525
|
+
}], ctorParameters: function () { return []; }, propDecorators: { effectRef: [{
|
|
310
526
|
type: Input
|
|
311
|
-
}],
|
|
527
|
+
}], _lut: [{
|
|
528
|
+
type: Input,
|
|
529
|
+
args: [{ required: true, alias: 'lut' }]
|
|
530
|
+
}], _blendFunction: [{
|
|
531
|
+
type: Input,
|
|
532
|
+
args: [{ alias: 'blendFunction' }]
|
|
533
|
+
}], _tetrahedralInterpolation: [{
|
|
534
|
+
type: Input,
|
|
535
|
+
args: [{ alias: 'tetrahedralInterpolation' }]
|
|
536
|
+
}] } });
|
|
537
|
+
|
|
538
|
+
extend({ NoiseEffect });
|
|
539
|
+
class NgtpNoise extends NgtpEffect {
|
|
540
|
+
constructor() {
|
|
541
|
+
super(...arguments);
|
|
542
|
+
this.defaultBlendFunction = BlendFunction.COLOR_DODGE;
|
|
543
|
+
}
|
|
544
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpNoise, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
545
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpNoise, isStandalone: true, selector: "ngtp-noise", usesInheritance: true, ngImport: i0, template: `
|
|
546
|
+
<ngt-noise-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
547
|
+
<ng-content />
|
|
548
|
+
</ngt-noise-effect>
|
|
549
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
550
|
+
}
|
|
551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpNoise, decorators: [{
|
|
552
|
+
type: Component,
|
|
553
|
+
args: [{
|
|
554
|
+
selector: 'ngtp-noise',
|
|
555
|
+
standalone: true,
|
|
556
|
+
template: `
|
|
557
|
+
<ngt-noise-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
558
|
+
<ng-content />
|
|
559
|
+
</ngt-noise-effect>
|
|
560
|
+
`,
|
|
561
|
+
imports: [NgtArgs],
|
|
562
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
563
|
+
}]
|
|
564
|
+
}] });
|
|
565
|
+
|
|
566
|
+
class NgtpPixelation {
|
|
567
|
+
constructor() {
|
|
568
|
+
this.inputs = signalStore({ granularity: 30 });
|
|
569
|
+
this.effectRef = injectNgtRef();
|
|
570
|
+
this.granularity = this.inputs.select('granularity');
|
|
571
|
+
this.effect = computed(() => new PixelationEffect(this.granularity()));
|
|
572
|
+
}
|
|
573
|
+
set _granularity(granularity) {
|
|
574
|
+
this.inputs.set({ granularity });
|
|
575
|
+
}
|
|
576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpPixelation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
577
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpPixelation, isStandalone: true, selector: "ngtp-pixelation", inputs: { effectRef: "effectRef", _granularity: ["granularity", "_granularity"] }, ngImport: i0, template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
578
|
+
}
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpPixelation, decorators: [{
|
|
580
|
+
type: Component,
|
|
581
|
+
args: [{
|
|
582
|
+
selector: 'ngtp-pixelation',
|
|
583
|
+
standalone: true,
|
|
584
|
+
template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `,
|
|
585
|
+
imports: [NgtArgs],
|
|
586
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
587
|
+
}]
|
|
588
|
+
}], propDecorators: { effectRef: [{
|
|
312
589
|
type: Input
|
|
313
|
-
}],
|
|
590
|
+
}], _granularity: [{
|
|
591
|
+
type: Input,
|
|
592
|
+
args: [{ alias: 'granularity' }]
|
|
593
|
+
}] } });
|
|
594
|
+
|
|
595
|
+
extend({ ScanlineEffect });
|
|
596
|
+
class NgtpScanline extends NgtpEffect {
|
|
597
|
+
constructor() {
|
|
598
|
+
super(...arguments);
|
|
599
|
+
this.defaultBlendFunction = BlendFunction.OVERLAY;
|
|
600
|
+
}
|
|
601
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpScanline, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
602
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpScanline, isStandalone: true, selector: "ngtp-scanline", usesInheritance: true, ngImport: i0, template: `
|
|
603
|
+
<ngt-scanline-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
604
|
+
<ng-content />
|
|
605
|
+
</ngt-scanline-effect>
|
|
606
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
607
|
+
}
|
|
608
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpScanline, decorators: [{
|
|
609
|
+
type: Component,
|
|
610
|
+
args: [{
|
|
611
|
+
selector: 'ngtp-scanline',
|
|
612
|
+
standalone: true,
|
|
613
|
+
template: `
|
|
614
|
+
<ngt-scanline-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
615
|
+
<ng-content />
|
|
616
|
+
</ngt-scanline-effect>
|
|
617
|
+
`,
|
|
618
|
+
imports: [NgtArgs],
|
|
619
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
620
|
+
}]
|
|
621
|
+
}] });
|
|
622
|
+
|
|
623
|
+
extend({ SepiaEffect });
|
|
624
|
+
class NgtpSepia extends NgtpEffect {
|
|
625
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpSepia, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
626
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpSepia, isStandalone: true, selector: "ngtp-sepia", usesInheritance: true, ngImport: i0, template: `
|
|
627
|
+
<ngt-sepia-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
628
|
+
<ng-content />
|
|
629
|
+
</ngt-sepia-effect>
|
|
630
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
631
|
+
}
|
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpSepia, decorators: [{
|
|
633
|
+
type: Component,
|
|
634
|
+
args: [{
|
|
635
|
+
selector: 'ngtp-sepia',
|
|
636
|
+
standalone: true,
|
|
637
|
+
template: `
|
|
638
|
+
<ngt-sepia-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
639
|
+
<ng-content />
|
|
640
|
+
</ngt-sepia-effect>
|
|
641
|
+
`,
|
|
642
|
+
imports: [NgtArgs],
|
|
643
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
644
|
+
}]
|
|
645
|
+
}] });
|
|
646
|
+
|
|
647
|
+
extend({ ShockWaveEffect });
|
|
648
|
+
class NgtpShockWave extends NgtpEffect {
|
|
649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpShockWave, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
650
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpShockWave, isStandalone: true, selector: "ngtp-shock-wave", usesInheritance: true, ngImport: i0, template: `
|
|
651
|
+
<ngt-shock-wave-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
652
|
+
<ng-content />
|
|
653
|
+
</ngt-shock-wave-effect>
|
|
654
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
655
|
+
}
|
|
656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpShockWave, decorators: [{
|
|
657
|
+
type: Component,
|
|
658
|
+
args: [{
|
|
659
|
+
selector: 'ngtp-shock-wave',
|
|
660
|
+
standalone: true,
|
|
661
|
+
template: `
|
|
662
|
+
<ngt-shock-wave-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
663
|
+
<ng-content />
|
|
664
|
+
</ngt-shock-wave-effect>
|
|
665
|
+
`,
|
|
666
|
+
imports: [NgtArgs],
|
|
667
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
668
|
+
}]
|
|
669
|
+
}] });
|
|
670
|
+
|
|
671
|
+
extend({ SMAAEffect });
|
|
672
|
+
class NgtpSMAA extends NgtpEffect {
|
|
673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpSMAA, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
674
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpSMAA, isStandalone: true, selector: "ngtp-SMAA", usesInheritance: true, ngImport: i0, template: `
|
|
675
|
+
<ngt-SMAA-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
676
|
+
<ng-content />
|
|
677
|
+
</ngt-SMAA-effect>
|
|
678
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
679
|
+
}
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpSMAA, decorators: [{
|
|
681
|
+
type: Component,
|
|
682
|
+
args: [{
|
|
683
|
+
selector: 'ngtp-SMAA',
|
|
684
|
+
standalone: true,
|
|
685
|
+
template: `
|
|
686
|
+
<ngt-SMAA-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
687
|
+
<ng-content />
|
|
688
|
+
</ngt-SMAA-effect>
|
|
689
|
+
`,
|
|
690
|
+
imports: [NgtArgs],
|
|
691
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
692
|
+
}]
|
|
693
|
+
}] });
|
|
694
|
+
|
|
695
|
+
class NgtpSSAO {
|
|
696
|
+
constructor() {
|
|
697
|
+
this.inputs = signalStore({
|
|
698
|
+
blendFunction: BlendFunction.MULTIPLY,
|
|
699
|
+
samples: 30,
|
|
700
|
+
rings: 4,
|
|
701
|
+
distanceThreshold: 1.0,
|
|
702
|
+
distanceFalloff: 0.0,
|
|
703
|
+
rangeThreshold: 0.5,
|
|
704
|
+
rangeFalloff: 0.1,
|
|
705
|
+
luminanceInfluence: 0.9,
|
|
706
|
+
radius: 20,
|
|
707
|
+
bias: 0.5,
|
|
708
|
+
intensity: 1.0,
|
|
709
|
+
depthAwareUpsampling: true,
|
|
710
|
+
});
|
|
711
|
+
this.effectRef = injectNgtRef();
|
|
712
|
+
this.effectComposerApi = injectNgtpEffectComposerApi();
|
|
713
|
+
this.effect = computed(() => {
|
|
714
|
+
const [state, { camera, normalPass, downSamplingPass, resolutionScale }] = [
|
|
715
|
+
this.inputs.state(),
|
|
716
|
+
this.effectComposerApi(),
|
|
717
|
+
];
|
|
718
|
+
if (normalPass === null && downSamplingPass === null) {
|
|
719
|
+
console.error('Please enable the NormalPass in the NgtpEffectComposer in order to use NgtpSSAO.');
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
return new SSAOEffect(camera, normalPass && !downSamplingPass ? normalPass.texture : null, {
|
|
723
|
+
...state,
|
|
724
|
+
// @ts-expect-error
|
|
725
|
+
normalDepthBuffer: state.normalDepthBuffer || (downSamplingPass ? downSamplingPass.texture : null),
|
|
726
|
+
resolutionScale: state.resolutionScale || (resolutionScale ?? 1),
|
|
727
|
+
depthAwareUpsampling: state.depthAwareUpsampling ?? true,
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
set _blendFunction(blendFunction) {
|
|
732
|
+
this.inputs.set({ blendFunction });
|
|
733
|
+
}
|
|
734
|
+
set _distanceScaling(distanceScaling) {
|
|
735
|
+
this.inputs.set({ distanceScaling });
|
|
736
|
+
}
|
|
737
|
+
set _depthAwareUpsampling(depthAwareUpsampling) {
|
|
738
|
+
this.inputs.set({ depthAwareUpsampling });
|
|
739
|
+
}
|
|
740
|
+
set _normalDepthBuffer(normalDepthBuffer) {
|
|
741
|
+
this.inputs.set({ normalDepthBuffer });
|
|
742
|
+
}
|
|
743
|
+
set _samples(samples) {
|
|
744
|
+
this.inputs.set({ samples });
|
|
745
|
+
}
|
|
746
|
+
set _rings(rings) {
|
|
747
|
+
this.inputs.set({ rings });
|
|
748
|
+
}
|
|
749
|
+
set _worldDistanceThreshold(worldDistanceThreshold) {
|
|
750
|
+
this.inputs.set({ worldDistanceThreshold });
|
|
751
|
+
}
|
|
752
|
+
set _worldDistanceFalloff(worldDistanceFalloff) {
|
|
753
|
+
this.inputs.set({ worldDistanceFalloff });
|
|
754
|
+
}
|
|
755
|
+
set _worldProximityThreshold(worldProximityThreshold) {
|
|
756
|
+
this.inputs.set({ worldProximityThreshold });
|
|
757
|
+
}
|
|
758
|
+
set _worldProximityFalloff(worldProximityFalloff) {
|
|
759
|
+
this.inputs.set({ worldProximityFalloff });
|
|
760
|
+
}
|
|
761
|
+
set _distanceThreshold(distanceThreshold) {
|
|
762
|
+
this.inputs.set({ distanceThreshold });
|
|
763
|
+
}
|
|
764
|
+
set _distanceFalloff(distanceFalloff) {
|
|
765
|
+
this.inputs.set({ distanceFalloff });
|
|
766
|
+
}
|
|
767
|
+
set _rangeThreshold(rangeThreshold) {
|
|
768
|
+
this.inputs.set({ rangeThreshold });
|
|
769
|
+
}
|
|
770
|
+
set _rangeFalloff(rangeFalloff) {
|
|
771
|
+
this.inputs.set({ rangeFalloff });
|
|
772
|
+
}
|
|
773
|
+
set _minRadiusScale(minRadiusScale) {
|
|
774
|
+
this.inputs.set({ minRadiusScale });
|
|
775
|
+
}
|
|
776
|
+
set _luminanceInfluence(luminanceInfluence) {
|
|
777
|
+
this.inputs.set({ luminanceInfluence });
|
|
778
|
+
}
|
|
779
|
+
set _radius(radius) {
|
|
780
|
+
this.inputs.set({ radius });
|
|
781
|
+
}
|
|
782
|
+
set _intensity(intensity) {
|
|
783
|
+
this.inputs.set({ intensity });
|
|
784
|
+
}
|
|
785
|
+
set _bias(bias) {
|
|
786
|
+
this.inputs.set({ bias });
|
|
787
|
+
}
|
|
788
|
+
set _fade(fade) {
|
|
789
|
+
this.inputs.set({ fade });
|
|
790
|
+
}
|
|
791
|
+
set _color(color) {
|
|
792
|
+
this.inputs.set({ color });
|
|
793
|
+
}
|
|
794
|
+
set _resolutionScale(resolutionScale) {
|
|
795
|
+
this.inputs.set({ resolutionScale });
|
|
796
|
+
}
|
|
797
|
+
set _resolutionX(resolutionX) {
|
|
798
|
+
this.inputs.set({ resolutionX });
|
|
799
|
+
}
|
|
800
|
+
set _resolutionY(resolutionY) {
|
|
801
|
+
this.inputs.set({ resolutionY });
|
|
802
|
+
}
|
|
803
|
+
set _width(width) {
|
|
804
|
+
this.inputs.set({ width });
|
|
805
|
+
}
|
|
806
|
+
set _height(height) {
|
|
807
|
+
this.inputs.set({ height });
|
|
808
|
+
}
|
|
809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpSSAO, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
810
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpSSAO, isStandalone: true, selector: "ngtp-SSAO", inputs: { effectRef: "effectRef", _blendFunction: ["blendFunction", "_blendFunction"], _distanceScaling: ["distanceScaling", "_distanceScaling"], _depthAwareUpsampling: ["depthAwareUpsampling", "_depthAwareUpsampling"], _normalDepthBuffer: ["normalDepthBuffer", "_normalDepthBuffer"], _samples: ["samples", "_samples"], _rings: ["rings", "_rings"], _worldDistanceThreshold: ["worldDistanceThreshold", "_worldDistanceThreshold"], _worldDistanceFalloff: ["worldDistanceFalloff", "_worldDistanceFalloff"], _worldProximityThreshold: ["worldProximityThreshold", "_worldProximityThreshold"], _worldProximityFalloff: ["worldProximityFalloff", "_worldProximityFalloff"], _distanceThreshold: ["distanceThreshold", "_distanceThreshold"], _distanceFalloff: ["distanceFalloff", "_distanceFalloff"], _rangeThreshold: ["rangeThreshold", "_rangeThreshold"], _rangeFalloff: ["rangeFalloff", "_rangeFalloff"], _minRadiusScale: ["minRadiusScale", "_minRadiusScale"], _luminanceInfluence: ["luminanceInfluence", "_luminanceInfluence"], _radius: ["radius", "_radius"], _intensity: ["intensity", "_intensity"], _bias: ["bias", "_bias"], _fade: ["fade", "_fade"], _color: ["color", "_color"], _resolutionScale: ["resolutionScale", "_resolutionScale"], _resolutionX: ["resolutionX", "_resolutionX"], _resolutionY: ["resolutionY", "_resolutionY"], _width: ["width", "_width"], _height: ["height", "_height"] }, ngImport: i0, template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
811
|
+
}
|
|
812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpSSAO, decorators: [{
|
|
813
|
+
type: Component,
|
|
814
|
+
args: [{
|
|
815
|
+
selector: 'ngtp-SSAO',
|
|
816
|
+
standalone: true,
|
|
817
|
+
template: ` <ngt-primitive *args="[effect()]" [ref]="effectRef" /> `,
|
|
818
|
+
imports: [NgtArgs],
|
|
819
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
820
|
+
}]
|
|
821
|
+
}], propDecorators: { effectRef: [{
|
|
314
822
|
type: Input
|
|
823
|
+
}], _blendFunction: [{
|
|
824
|
+
type: Input,
|
|
825
|
+
args: [{ alias: 'blendFunction' }]
|
|
826
|
+
}], _distanceScaling: [{
|
|
827
|
+
type: Input,
|
|
828
|
+
args: [{ alias: 'distanceScaling' }]
|
|
829
|
+
}], _depthAwareUpsampling: [{
|
|
830
|
+
type: Input,
|
|
831
|
+
args: [{ alias: 'depthAwareUpsampling' }]
|
|
832
|
+
}], _normalDepthBuffer: [{
|
|
833
|
+
type: Input,
|
|
834
|
+
args: [{ alias: 'normalDepthBuffer' }]
|
|
835
|
+
}], _samples: [{
|
|
836
|
+
type: Input,
|
|
837
|
+
args: [{ alias: 'samples' }]
|
|
838
|
+
}], _rings: [{
|
|
839
|
+
type: Input,
|
|
840
|
+
args: [{ alias: 'rings' }]
|
|
841
|
+
}], _worldDistanceThreshold: [{
|
|
842
|
+
type: Input,
|
|
843
|
+
args: [{ alias: 'worldDistanceThreshold' }]
|
|
844
|
+
}], _worldDistanceFalloff: [{
|
|
845
|
+
type: Input,
|
|
846
|
+
args: [{ alias: 'worldDistanceFalloff' }]
|
|
847
|
+
}], _worldProximityThreshold: [{
|
|
848
|
+
type: Input,
|
|
849
|
+
args: [{ alias: 'worldProximityThreshold' }]
|
|
850
|
+
}], _worldProximityFalloff: [{
|
|
851
|
+
type: Input,
|
|
852
|
+
args: [{ alias: 'worldProximityFalloff' }]
|
|
853
|
+
}], _distanceThreshold: [{
|
|
854
|
+
type: Input,
|
|
855
|
+
args: [{ alias: 'distanceThreshold' }]
|
|
856
|
+
}], _distanceFalloff: [{
|
|
857
|
+
type: Input,
|
|
858
|
+
args: [{ alias: 'distanceFalloff' }]
|
|
859
|
+
}], _rangeThreshold: [{
|
|
860
|
+
type: Input,
|
|
861
|
+
args: [{ alias: 'rangeThreshold' }]
|
|
862
|
+
}], _rangeFalloff: [{
|
|
863
|
+
type: Input,
|
|
864
|
+
args: [{ alias: 'rangeFalloff' }]
|
|
865
|
+
}], _minRadiusScale: [{
|
|
866
|
+
type: Input,
|
|
867
|
+
args: [{ alias: 'minRadiusScale' }]
|
|
868
|
+
}], _luminanceInfluence: [{
|
|
869
|
+
type: Input,
|
|
870
|
+
args: [{ alias: 'luminanceInfluence' }]
|
|
871
|
+
}], _radius: [{
|
|
872
|
+
type: Input,
|
|
873
|
+
args: [{ alias: 'radius' }]
|
|
874
|
+
}], _intensity: [{
|
|
875
|
+
type: Input,
|
|
876
|
+
args: [{ alias: 'intensity' }]
|
|
877
|
+
}], _bias: [{
|
|
878
|
+
type: Input,
|
|
879
|
+
args: [{ alias: 'bias' }]
|
|
880
|
+
}], _fade: [{
|
|
881
|
+
type: Input,
|
|
882
|
+
args: [{ alias: 'fade' }]
|
|
883
|
+
}], _color: [{
|
|
884
|
+
type: Input,
|
|
885
|
+
args: [{ alias: 'color' }]
|
|
886
|
+
}], _resolutionScale: [{
|
|
887
|
+
type: Input,
|
|
888
|
+
args: [{ alias: 'resolutionScale' }]
|
|
889
|
+
}], _resolutionX: [{
|
|
890
|
+
type: Input,
|
|
891
|
+
args: [{ alias: 'resolutionX' }]
|
|
892
|
+
}], _resolutionY: [{
|
|
893
|
+
type: Input,
|
|
894
|
+
args: [{ alias: 'resolutionY' }]
|
|
895
|
+
}], _width: [{
|
|
896
|
+
type: Input,
|
|
897
|
+
args: [{ alias: 'width' }]
|
|
898
|
+
}], _height: [{
|
|
899
|
+
type: Input,
|
|
900
|
+
args: [{ alias: 'height' }]
|
|
315
901
|
}] } });
|
|
316
902
|
|
|
903
|
+
extend({ TiltShiftEffect });
|
|
904
|
+
class NgtpTiltShift extends NgtpEffect {
|
|
905
|
+
constructor() {
|
|
906
|
+
super(...arguments);
|
|
907
|
+
this.defaultBlendFunction = BlendFunction.ADD;
|
|
908
|
+
}
|
|
909
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpTiltShift, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpTiltShift, isStandalone: true, selector: "ngtp-tilt-shift", usesInheritance: true, ngImport: i0, template: `
|
|
911
|
+
<ngt-tilt-shift-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
912
|
+
<ng-content />
|
|
913
|
+
</ngt-tilt-shift-effect>
|
|
914
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
915
|
+
}
|
|
916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpTiltShift, decorators: [{
|
|
917
|
+
type: Component,
|
|
918
|
+
args: [{
|
|
919
|
+
selector: 'ngtp-tilt-shift',
|
|
920
|
+
standalone: true,
|
|
921
|
+
template: `
|
|
922
|
+
<ngt-tilt-shift-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
923
|
+
<ng-content />
|
|
924
|
+
</ngt-tilt-shift-effect>
|
|
925
|
+
`,
|
|
926
|
+
imports: [NgtArgs],
|
|
927
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
928
|
+
}]
|
|
929
|
+
}] });
|
|
930
|
+
|
|
931
|
+
extend({ ToneMappingEffect });
|
|
932
|
+
class NgtpToneMapping extends NgtpEffect {
|
|
933
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpToneMapping, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
934
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpToneMapping, isStandalone: true, selector: "ngtp-tone-mapping", usesInheritance: true, ngImport: i0, template: `
|
|
935
|
+
<ngt-tone-mapping-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
936
|
+
<ng-content />
|
|
937
|
+
</ngt-tone-mapping-effect>
|
|
938
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
939
|
+
}
|
|
940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpToneMapping, decorators: [{
|
|
941
|
+
type: Component,
|
|
942
|
+
args: [{
|
|
943
|
+
selector: 'ngtp-tone-mapping',
|
|
944
|
+
standalone: true,
|
|
945
|
+
template: `
|
|
946
|
+
<ngt-tone-mapping-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
947
|
+
<ng-content />
|
|
948
|
+
</ngt-tone-mapping-effect>
|
|
949
|
+
`,
|
|
950
|
+
imports: [NgtArgs],
|
|
951
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
952
|
+
}]
|
|
953
|
+
}] });
|
|
954
|
+
|
|
955
|
+
extend({ VignetteEffect });
|
|
956
|
+
class NgtpVignette extends NgtpEffect {
|
|
957
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpVignette, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
958
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: NgtpVignette, isStandalone: true, selector: "ngtp-vignette", usesInheritance: true, ngImport: i0, template: `
|
|
959
|
+
<ngt-vignette-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
960
|
+
<ng-content />
|
|
961
|
+
</ngt-vignette-effect>
|
|
962
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }] }); }
|
|
963
|
+
}
|
|
964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: NgtpVignette, decorators: [{
|
|
965
|
+
type: Component,
|
|
966
|
+
args: [{
|
|
967
|
+
selector: 'ngtp-vignette',
|
|
968
|
+
standalone: true,
|
|
969
|
+
template: `
|
|
970
|
+
<ngt-vignette-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
|
|
971
|
+
<ng-content />
|
|
972
|
+
</ngt-vignette-effect>
|
|
973
|
+
`,
|
|
974
|
+
imports: [NgtArgs],
|
|
975
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
976
|
+
}]
|
|
977
|
+
}] });
|
|
978
|
+
|
|
317
979
|
/**
|
|
318
980
|
* Generated bundle index. Do not edit.
|
|
319
981
|
*/
|
|
320
982
|
|
|
321
|
-
export {
|
|
983
|
+
export { NgtpBloom, NgtpBrightnessContrast, NgtpColorDepth, NgtpDepth, NgtpDotScreen, NgtpEffect, NgtpEffectComposer, NgtpHueSaturation, NgtpLUT, NgtpNoise, NgtpPixelation, NgtpSMAA, NgtpSSAO, NgtpScanline, NgtpSepia, NgtpShockWave, NgtpTiltShift, NgtpToneMapping, NgtpVignette, injectNgtpEffectComposerApi, provideNgtpEffectComposerApi };
|
|
322
984
|
//# sourceMappingURL=angular-three-postprocessing.mjs.map
|