angular-three-postprocessing 4.0.10 → 4.1.1
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component, input, Directive, computed, viewChild, effect, untracked } from '@angular/core';
|
|
3
|
-
import { injectStore, pick, extend, getInstanceState, beforeRender, NgtArgs, vector2, omit, resolveRef,
|
|
2
|
+
import { inject, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component, input, Directive, computed, viewChild, effect, DestroyRef, untracked } from '@angular/core';
|
|
3
|
+
import { injectStore, pick, extend, getInstanceState, beforeRender, NgtArgs, vector3, vector2, omit, resolveRef, is, NgtSelectionApi, loaderResource } from 'angular-three';
|
|
4
4
|
import { createNoopInjectionToken } from 'ngxtension/create-injection-token';
|
|
5
5
|
import { mergeInputs } from 'ngxtension/inject-inputs';
|
|
6
|
-
import { EffectAttribute, EffectComposer, RenderPass, NormalPass, DepthDownsamplingPass, Effect, EffectPass, Pass, BloomEffect, BlendFunction, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect,
|
|
6
|
+
import { EffectAttribute, EffectComposer, RenderPass, NormalPass, DepthDownsamplingPass, Effect, EffectPass, Pass, DepthPickingPass, CopyPass, DepthOfFieldEffect, BloomEffect, BlendFunction, BrightnessContrastEffect, ChromaticAberrationEffect, ColorAverageEffect, ColorDepthEffect, DepthEffect, MaskFunction, DotScreenEffect, FXAAEffect, GlitchEffect, GlitchMode, GodRaysEffect, GridEffect, HueSaturationEffect, LUT3DEffect, NoiseEffect, OutlineEffect, PixelationEffect, ScanlineEffect, SelectiveBloomEffect, SepiaEffect, SSAOEffect, ShockWaveEffect, SMAAEffect, TextureEffect, TiltShiftEffect, ToneMappingEffect, VignetteEffect } from 'postprocessing';
|
|
7
7
|
import * as THREE from 'three';
|
|
8
8
|
import { Group } from 'three';
|
|
9
9
|
import { isWebGL2Available } from 'three-stdlib';
|
|
@@ -42,15 +42,15 @@ class NgtpEffectBlendMode {
|
|
|
42
42
|
/** Reference to the parent NgtpEffect directive, if available */
|
|
43
43
|
this.effect = inject(NgtpEffect, { optional: true });
|
|
44
44
|
}
|
|
45
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
46
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpEffectBlendMode, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: NgtpEffectBlendMode, isStandalone: true, selector: "ngtp-effect-blend-mode", ngImport: i0, template: `
|
|
47
47
|
@if (effect) {
|
|
48
48
|
<ngt-value [rawValue]="effect.blendFunction()" attach="blendMode.blendFunction" />
|
|
49
49
|
<ngt-value [rawValue]="effect.opacity()" attach="blendMode.opacity.value" />
|
|
50
50
|
}
|
|
51
51
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpEffectBlendMode, decorators: [{
|
|
54
54
|
type: Component,
|
|
55
55
|
args: [{
|
|
56
56
|
selector: 'ngtp-effect-blend-mode',
|
|
@@ -100,14 +100,14 @@ class NgtpEffect {
|
|
|
100
100
|
/** Function to invalidate the render loop, triggering a re-render */
|
|
101
101
|
this.invalidate = this.store.invalidate;
|
|
102
102
|
}
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
104
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpEffect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
104
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: NgtpEffect, isStandalone: true, inputs: { blendFunction: { classPropertyName: "blendFunction", publicName: "blendFunction", isSignal: true, isRequired: false, transformFunction: null }, opacity: { classPropertyName: "opacity", publicName: "opacity", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpEffect, decorators: [{
|
|
107
107
|
type: Directive
|
|
108
108
|
}], propDecorators: { blendFunction: [{ type: i0.Input, args: [{ isSignal: true, alias: "blendFunction", required: false }] }], opacity: [{ type: i0.Input, args: [{ isSignal: true, alias: "opacity", required: false }] }] } });
|
|
109
109
|
|
|
110
|
-
const defaultOptions$
|
|
110
|
+
const defaultOptions$6 = {
|
|
111
111
|
enabled: true,
|
|
112
112
|
renderPriority: 1,
|
|
113
113
|
autoClear: true,
|
|
@@ -153,7 +153,7 @@ class NgtpEffectComposer {
|
|
|
153
153
|
* Configuration options for the effect composer.
|
|
154
154
|
* @see NgtpEffectComposerOptions
|
|
155
155
|
*/
|
|
156
|
-
this.options = input(defaultOptions$
|
|
156
|
+
this.options = input(defaultOptions$6, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions$6) });
|
|
157
157
|
this.store = injectStore();
|
|
158
158
|
this.depthBuffer = pick(this.options, 'depthBuffer');
|
|
159
159
|
this.stencilBuffer = pick(this.options, 'stencilBuffer');
|
|
@@ -230,6 +230,8 @@ class NgtpEffectComposer {
|
|
|
230
230
|
* Can be used to access the composer directly for advanced use cases.
|
|
231
231
|
*/
|
|
232
232
|
this.effectComposer = pick(this.composerData, 'composer');
|
|
233
|
+
this.normalPass = pick(this.composerData, 'normalPass');
|
|
234
|
+
this.downSamplingPass = pick(this.composerData, 'downSamplingPass');
|
|
233
235
|
extend({ Group });
|
|
234
236
|
// NOTE: Disable tone mapping because threejs disallows tonemapping on render targets
|
|
235
237
|
effect((onCleanup) => {
|
|
@@ -315,14 +317,14 @@ class NgtpEffectComposer {
|
|
|
315
317
|
}
|
|
316
318
|
}, { priority: this.priority });
|
|
317
319
|
}
|
|
318
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
319
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
320
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpEffectComposer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
321
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpEffectComposer, isStandalone: true, selector: "ngtp-effect-composer", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "groupRef", first: true, predicate: ["group"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
320
322
|
<ngt-group #group>
|
|
321
323
|
<ng-content />
|
|
322
324
|
</ngt-group>
|
|
323
325
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
324
326
|
}
|
|
325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpEffectComposer, decorators: [{
|
|
326
328
|
type: Component,
|
|
327
329
|
args: [{
|
|
328
330
|
selector: 'ngtp-effect-composer',
|
|
@@ -447,7 +449,7 @@ class ASCIIEffect extends Effect {
|
|
|
447
449
|
return texture;
|
|
448
450
|
}
|
|
449
451
|
}
|
|
450
|
-
const defaultOptions$
|
|
452
|
+
const defaultOptions$5 = {
|
|
451
453
|
font: 'arial',
|
|
452
454
|
characters: ` .:,'-^=*+?!|0#X%WM@`,
|
|
453
455
|
fontSize: 54,
|
|
@@ -474,7 +476,7 @@ class NgtpASCII {
|
|
|
474
476
|
* Configuration options for the ASCII effect.
|
|
475
477
|
* @see ASCIIEffectOptions
|
|
476
478
|
*/
|
|
477
|
-
this.options = input(defaultOptions$
|
|
479
|
+
this.options = input(defaultOptions$5, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions$5) });
|
|
478
480
|
/** The underlying ASCIIEffect instance */
|
|
479
481
|
this.effect = computed(() => new ASCIIEffect(this.options()), ...(ngDevMode ? [{ debugName: "effect" }] : []));
|
|
480
482
|
effect((onCleanup) => {
|
|
@@ -482,12 +484,12 @@ class NgtpASCII {
|
|
|
482
484
|
onCleanup(() => effect.dispose());
|
|
483
485
|
});
|
|
484
486
|
}
|
|
485
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
486
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpASCII, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
488
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpASCII, isStandalone: true, selector: "ngtp-ascii", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
487
489
|
<ngt-primitive *args="[effect()]" />
|
|
488
490
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
489
491
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpASCII, decorators: [{
|
|
491
493
|
type: Component,
|
|
492
494
|
args: [{
|
|
493
495
|
selector: 'ngtp-ascii',
|
|
@@ -500,6 +502,139 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
500
502
|
}]
|
|
501
503
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
502
504
|
|
|
505
|
+
const defaultOptions$4 = {
|
|
506
|
+
mouse: false,
|
|
507
|
+
manual: false,
|
|
508
|
+
smoothTime: 0.25,
|
|
509
|
+
};
|
|
510
|
+
class NgtpAutofocus {
|
|
511
|
+
constructor() {
|
|
512
|
+
this.options = input(defaultOptions$4, { ...(ngDevMode ? { debugName: "options" } : {}), transform: mergeInputs(defaultOptions$4) });
|
|
513
|
+
this.effectComposer = inject(NgtpEffectComposer);
|
|
514
|
+
this.store = injectStore();
|
|
515
|
+
this.hitpoint = new THREE.Vector3(0, 0, 0);
|
|
516
|
+
this.ndc = new THREE.Vector3(0, 0, 0);
|
|
517
|
+
this.depthPickingPass = new DepthPickingPass();
|
|
518
|
+
this.copyPass = new CopyPass();
|
|
519
|
+
this.debugSize = pick(this.options, 'debug');
|
|
520
|
+
this.hitpointMeshRef = viewChild('hitpointMesh', ...(ngDevMode ? [{ debugName: "hitpointMeshRef" }] : []));
|
|
521
|
+
this.targetMeshRef = viewChild('targetMesh', ...(ngDevMode ? [{ debugName: "targetMeshRef" }] : []));
|
|
522
|
+
this.target = vector3(this.options, 'target', true);
|
|
523
|
+
this.dofEffect = computed(() => {
|
|
524
|
+
const [camera, options] = [this.effectComposer.camera(), this.options()];
|
|
525
|
+
const { target: _, mouse: __, debug: ___, manual: ____, smoothTime: _____, ...dofOptions } = options;
|
|
526
|
+
const dof = new DepthOfFieldEffect(camera, dofOptions);
|
|
527
|
+
dof.target = new THREE.Vector3().copy(this.hitpoint);
|
|
528
|
+
return dof;
|
|
529
|
+
}, ...(ngDevMode ? [{ debugName: "dofEffect" }] : []));
|
|
530
|
+
// add passes to composer
|
|
531
|
+
effect((onCleanup) => {
|
|
532
|
+
const composer = this.effectComposer.effectComposer();
|
|
533
|
+
if (!composer)
|
|
534
|
+
return;
|
|
535
|
+
composer.addPass(this.depthPickingPass);
|
|
536
|
+
composer.addPass(this.copyPass);
|
|
537
|
+
onCleanup(() => {
|
|
538
|
+
composer.removePass(this.depthPickingPass);
|
|
539
|
+
composer.removePass(this.copyPass);
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
inject(DestroyRef).onDestroy(() => {
|
|
543
|
+
this.depthPickingPass.dispose();
|
|
544
|
+
this.copyPass.dispose();
|
|
545
|
+
});
|
|
546
|
+
// cleanup dof effect
|
|
547
|
+
effect((onCleanup) => {
|
|
548
|
+
const dof = this.dofEffect();
|
|
549
|
+
onCleanup(() => dof.dispose());
|
|
550
|
+
});
|
|
551
|
+
beforeRender(({ delta }) => {
|
|
552
|
+
const dof = this.dofEffect();
|
|
553
|
+
if (!dof?.target)
|
|
554
|
+
return;
|
|
555
|
+
const { mouse: followMouse, smoothTime, manual } = this.options();
|
|
556
|
+
if (manual)
|
|
557
|
+
return;
|
|
558
|
+
const target = this.target();
|
|
559
|
+
const camera = this.effectComposer.camera();
|
|
560
|
+
if (target) {
|
|
561
|
+
this.hitpoint.copy(target);
|
|
562
|
+
}
|
|
563
|
+
else {
|
|
564
|
+
const { x, y } = followMouse ? this.store.snapshot.pointer : { x: 0, y: 0 };
|
|
565
|
+
this.ndc.x = x;
|
|
566
|
+
this.ndc.y = y;
|
|
567
|
+
this.depthPickingPass.readDepth(this.ndc).then((depth) => {
|
|
568
|
+
this.ndc.z = depth * 2.0 - 1.0;
|
|
569
|
+
const hit = 1 - this.ndc.z > 0.0000001;
|
|
570
|
+
if (hit) {
|
|
571
|
+
const unprojected = this.ndc.clone().unproject(camera);
|
|
572
|
+
this.hitpoint.copy(unprojected);
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
if (smoothTime && smoothTime > 0 && delta > 0) {
|
|
577
|
+
easing.damp3(dof.target, this.hitpoint, smoothTime, delta);
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
dof.target.copy(this.hitpoint);
|
|
581
|
+
}
|
|
582
|
+
const hitpointMesh = this.hitpointMeshRef()?.nativeElement;
|
|
583
|
+
if (hitpointMesh)
|
|
584
|
+
hitpointMesh.position.copy(this.hitpoint);
|
|
585
|
+
const targetMesh = this.targetMeshRef()?.nativeElement;
|
|
586
|
+
if (targetMesh)
|
|
587
|
+
targetMesh.position.copy(dof.target);
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpAutofocus, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
591
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: NgtpAutofocus, isStandalone: true, selector: "ngtp-autofocus", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "hitpointMeshRef", first: true, predicate: ["hitpointMesh"], descendants: true, isSignal: true }, { propertyName: "targetMeshRef", first: true, predicate: ["targetMesh"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
592
|
+
<ngt-primitive *args="[dofEffect()]" [dispose]="null" />
|
|
593
|
+
@if (debugSize(); as debugSize) {
|
|
594
|
+
<ngt-mesh #hitpointMesh>
|
|
595
|
+
<ngt-sphere-geometry *args="[debugSize, 16, 16]" />
|
|
596
|
+
<ngt-mesh-basic-material [color]="'#00ff00'" [opacity]="1" [transparent]="true" [depthWrite]="false" />
|
|
597
|
+
</ngt-mesh>
|
|
598
|
+
<ngt-mesh #targetMesh>
|
|
599
|
+
<ngt-sphere-geometry *args="[debugSize / 2, 16, 16]" />
|
|
600
|
+
<ngt-mesh-basic-material
|
|
601
|
+
[color]="'#00ff00'"
|
|
602
|
+
[opacity]="0.5"
|
|
603
|
+
[transparent]="true"
|
|
604
|
+
[depthWrite]="false"
|
|
605
|
+
/>
|
|
606
|
+
</ngt-mesh>
|
|
607
|
+
}
|
|
608
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
609
|
+
}
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpAutofocus, decorators: [{
|
|
611
|
+
type: Component,
|
|
612
|
+
args: [{
|
|
613
|
+
selector: 'ngtp-autofocus',
|
|
614
|
+
template: `
|
|
615
|
+
<ngt-primitive *args="[dofEffect()]" [dispose]="null" />
|
|
616
|
+
@if (debugSize(); as debugSize) {
|
|
617
|
+
<ngt-mesh #hitpointMesh>
|
|
618
|
+
<ngt-sphere-geometry *args="[debugSize, 16, 16]" />
|
|
619
|
+
<ngt-mesh-basic-material [color]="'#00ff00'" [opacity]="1" [transparent]="true" [depthWrite]="false" />
|
|
620
|
+
</ngt-mesh>
|
|
621
|
+
<ngt-mesh #targetMesh>
|
|
622
|
+
<ngt-sphere-geometry *args="[debugSize / 2, 16, 16]" />
|
|
623
|
+
<ngt-mesh-basic-material
|
|
624
|
+
[color]="'#00ff00'"
|
|
625
|
+
[opacity]="0.5"
|
|
626
|
+
[transparent]="true"
|
|
627
|
+
[depthWrite]="false"
|
|
628
|
+
/>
|
|
629
|
+
</ngt-mesh>
|
|
630
|
+
}
|
|
631
|
+
`,
|
|
632
|
+
imports: [NgtArgs],
|
|
633
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
634
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
635
|
+
}]
|
|
636
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], hitpointMeshRef: [{ type: i0.ViewChild, args: ['hitpointMesh', { isSignal: true }] }], targetMeshRef: [{ type: i0.ViewChild, args: ['targetMesh', { isSignal: true }] }] } });
|
|
637
|
+
|
|
503
638
|
/**
|
|
504
639
|
* Angular component that applies a bloom postprocessing effect to the scene.
|
|
505
640
|
*
|
|
@@ -537,15 +672,15 @@ class NgtpBloom {
|
|
|
537
672
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
538
673
|
extend({ BloomEffect });
|
|
539
674
|
}
|
|
540
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
541
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpBloom, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
676
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpBloom, isStandalone: true, selector: "ngtp-bloom", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.ADD })], viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
542
677
|
<ngt-bloom-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
543
678
|
<ngtp-effect-blend-mode />
|
|
544
679
|
<ng-content />
|
|
545
680
|
</ngt-bloom-effect>
|
|
546
681
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
547
682
|
}
|
|
548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpBloom, decorators: [{
|
|
549
684
|
type: Component,
|
|
550
685
|
args: [{
|
|
551
686
|
selector: 'ngtp-bloom',
|
|
@@ -588,15 +723,15 @@ class NgtpBrightnessContrast {
|
|
|
588
723
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
589
724
|
extend({ BrightnessContrastEffect });
|
|
590
725
|
}
|
|
591
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
592
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
726
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpBrightnessContrast, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
727
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpBrightnessContrast, isStandalone: true, selector: "ngtp-brightness-contrast", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
593
728
|
<ngt-brightness-contrast-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
594
729
|
<ngtp-effect-blend-mode />
|
|
595
730
|
<ng-content />
|
|
596
731
|
</ngt-brightness-contrast-effect>
|
|
597
732
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
598
733
|
}
|
|
599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpBrightnessContrast, decorators: [{
|
|
600
735
|
type: Component,
|
|
601
736
|
args: [{
|
|
602
737
|
selector: 'ngtp-brightness-contrast',
|
|
@@ -638,15 +773,15 @@ class NgtpChromaticAberration {
|
|
|
638
773
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
639
774
|
extend({ ChromaticAberrationEffect });
|
|
640
775
|
}
|
|
641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
642
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpChromaticAberration, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
777
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpChromaticAberration, isStandalone: true, selector: "ngtp-chromatic-aberration", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
643
778
|
<ngt-chromatic-aberration-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
644
779
|
<ngtp-effect-blend-mode />
|
|
645
780
|
<ng-content />
|
|
646
781
|
</ngt-chromatic-aberration-effect>
|
|
647
782
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
648
783
|
}
|
|
649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpChromaticAberration, decorators: [{
|
|
650
785
|
type: Component,
|
|
651
786
|
args: [{
|
|
652
787
|
selector: 'ngtp-chromatic-aberration',
|
|
@@ -694,14 +829,14 @@ class NgtpColorAverage {
|
|
|
694
829
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
695
830
|
extend({ ColorAverageEffect });
|
|
696
831
|
}
|
|
697
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
698
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
832
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpColorAverage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
833
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpColorAverage, isStandalone: true, selector: "ngtp-color-average", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
699
834
|
<ngt-color-average-effect #effect *args="[options().blendFunction]">
|
|
700
835
|
<ng-content />
|
|
701
836
|
</ngt-color-average-effect>
|
|
702
837
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
703
838
|
}
|
|
704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpColorAverage, decorators: [{
|
|
705
840
|
type: Component,
|
|
706
841
|
args: [{
|
|
707
842
|
selector: 'ngtp-color-average',
|
|
@@ -741,15 +876,15 @@ class NgtpColorDepth {
|
|
|
741
876
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
742
877
|
extend({ ColorDepthEffect });
|
|
743
878
|
}
|
|
744
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
745
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
879
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpColorDepth, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
880
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpColorDepth, isStandalone: true, selector: "ngtp-color-depth", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
746
881
|
<ngt-color-depth-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
747
882
|
<ngtp-effect-blend-mode />
|
|
748
883
|
<ng-content />
|
|
749
884
|
</ngt-color-depth-effect>
|
|
750
885
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
751
886
|
}
|
|
752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpColorDepth, decorators: [{
|
|
753
888
|
type: Component,
|
|
754
889
|
args: [{
|
|
755
890
|
selector: 'ngtp-color-depth',
|
|
@@ -791,15 +926,15 @@ class NgtpDepth {
|
|
|
791
926
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
792
927
|
extend({ DepthEffect });
|
|
793
928
|
}
|
|
794
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
795
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
929
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpDepth, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
930
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpDepth, isStandalone: true, selector: "ngtp-depth", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
796
931
|
<ngt-depth-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
797
932
|
<ngtp-effect-blend-mode />
|
|
798
933
|
<ng-content />
|
|
799
934
|
</ngt-depth-effect>
|
|
800
935
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
801
936
|
}
|
|
802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpDepth, decorators: [{
|
|
803
938
|
type: Component,
|
|
804
939
|
args: [{
|
|
805
940
|
selector: 'ngtp-depth',
|
|
@@ -871,12 +1006,12 @@ class NgtpDepthOfField {
|
|
|
871
1006
|
onCleanup(() => depthOfFieldEffect.dispose());
|
|
872
1007
|
});
|
|
873
1008
|
}
|
|
874
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
875
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1009
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpDepthOfField, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1010
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpDepthOfField, isStandalone: true, selector: "ngtp-depth-of-field", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
876
1011
|
<ngt-primitive *args="[effect()]" />
|
|
877
1012
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
878
1013
|
}
|
|
879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpDepthOfField, decorators: [{
|
|
880
1015
|
type: Component,
|
|
881
1016
|
args: [{
|
|
882
1017
|
selector: 'ngtp-depth-of-field',
|
|
@@ -914,15 +1049,15 @@ class NgtpDotScreen {
|
|
|
914
1049
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
915
1050
|
extend({ DotScreenEffect });
|
|
916
1051
|
}
|
|
917
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
1052
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpDotScreen, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1053
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpDotScreen, isStandalone: true, selector: "ngtp-dot-screen", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
919
1054
|
<ngt-dot-screen-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
920
1055
|
<ngtp-effect-blend-mode />
|
|
921
1056
|
<ng-content />
|
|
922
1057
|
</ngt-dot-screen-effect>
|
|
923
1058
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
924
1059
|
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpDotScreen, decorators: [{
|
|
926
1061
|
type: Component,
|
|
927
1062
|
args: [{
|
|
928
1063
|
selector: 'ngtp-dot-screen',
|
|
@@ -965,15 +1100,15 @@ class NgtpFXAA {
|
|
|
965
1100
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
966
1101
|
extend({ FXAAEffect });
|
|
967
1102
|
}
|
|
968
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
969
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
1103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpFXAA, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1104
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpFXAA, isStandalone: true, selector: "ngtp-fxaa", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
970
1105
|
<ngt-fXAA-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
971
1106
|
<ngtp-effect-blend-mode />
|
|
972
1107
|
<ng-content />
|
|
973
1108
|
</ngt-fXAA-effect>
|
|
974
1109
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
975
1110
|
}
|
|
976
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpFXAA, decorators: [{
|
|
977
1112
|
type: Component,
|
|
978
1113
|
args: [{
|
|
979
1114
|
selector: 'ngtp-fxaa',
|
|
@@ -1062,12 +1197,12 @@ class NgtpGlitch {
|
|
|
1062
1197
|
onCleanup(() => effect.dispose());
|
|
1063
1198
|
});
|
|
1064
1199
|
}
|
|
1065
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1066
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpGlitch, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpGlitch, isStandalone: true, selector: "ngtp-glitch", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1067
1202
|
<ngt-primitive *args="[effect()]" />
|
|
1068
1203
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1069
1204
|
}
|
|
1070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpGlitch, decorators: [{
|
|
1071
1206
|
type: Component,
|
|
1072
1207
|
args: [{
|
|
1073
1208
|
selector: 'ngtp-glitch',
|
|
@@ -1140,12 +1275,12 @@ class NgtpGodRays {
|
|
|
1140
1275
|
onCleanup(() => effect.dispose());
|
|
1141
1276
|
});
|
|
1142
1277
|
}
|
|
1143
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1144
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1278
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpGodRays, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpGodRays, isStandalone: true, selector: "ngtp-god-rays", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1145
1280
|
<ngt-primitive *args="[effect()]" />
|
|
1146
1281
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1147
1282
|
}
|
|
1148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpGodRays, decorators: [{
|
|
1149
1284
|
type: Component,
|
|
1150
1285
|
args: [{
|
|
1151
1286
|
selector: 'ngtp-god-rays',
|
|
@@ -1193,12 +1328,12 @@ class NgtpGrid {
|
|
|
1193
1328
|
onCleanup(() => effect.dispose());
|
|
1194
1329
|
});
|
|
1195
1330
|
}
|
|
1196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1197
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpGrid, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpGrid, isStandalone: true, selector: "ngtp-grid", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1198
1333
|
<ngt-primitive *args="[effect()]" />
|
|
1199
1334
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1200
1335
|
}
|
|
1201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpGrid, decorators: [{
|
|
1202
1337
|
type: Component,
|
|
1203
1338
|
args: [{
|
|
1204
1339
|
selector: 'ngtp-grid',
|
|
@@ -1236,15 +1371,15 @@ class NgtpHueSaturation {
|
|
|
1236
1371
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
1237
1372
|
extend({ HueSaturationEffect });
|
|
1238
1373
|
}
|
|
1239
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1240
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
1374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpHueSaturation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1375
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpHueSaturation, isStandalone: true, selector: "ngtp-hue-saturation", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
1241
1376
|
<ngt-hue-saturation-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
1242
1377
|
<ngtp-effect-blend-mode />
|
|
1243
1378
|
<ng-content />
|
|
1244
1379
|
</ngt-hue-saturation-effect>
|
|
1245
1380
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1246
1381
|
}
|
|
1247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpHueSaturation, decorators: [{
|
|
1248
1383
|
type: Component,
|
|
1249
1384
|
args: [{
|
|
1250
1385
|
selector: 'ngtp-hue-saturation',
|
|
@@ -1272,49 +1407,376 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1272
1407
|
*/
|
|
1273
1408
|
const LensFlareShader = {
|
|
1274
1409
|
fragmentShader: /* language=glsl glsl */ `
|
|
1410
|
+
uniform float time;
|
|
1411
|
+
uniform vec2 lensPosition;
|
|
1412
|
+
uniform vec2 screenRes;
|
|
1413
|
+
uniform vec3 colorGain;
|
|
1414
|
+
uniform float starPoints;
|
|
1415
|
+
uniform float glareSize;
|
|
1416
|
+
uniform float flareSize;
|
|
1417
|
+
uniform float flareSpeed;
|
|
1418
|
+
uniform float flareShape;
|
|
1419
|
+
uniform float haloScale;
|
|
1420
|
+
uniform float opacity;
|
|
1421
|
+
uniform bool animated;
|
|
1422
|
+
uniform bool anamorphic;
|
|
1423
|
+
uniform bool enabled;
|
|
1424
|
+
uniform bool secondaryGhosts;
|
|
1425
|
+
uniform bool starBurst;
|
|
1426
|
+
uniform float ghostScale;
|
|
1427
|
+
uniform bool aditionalStreaks;
|
|
1428
|
+
uniform sampler2D lensDirtTexture;
|
|
1429
|
+
vec2 vTexCoord;
|
|
1430
|
+
|
|
1431
|
+
float rand(float n){return fract(sin(n) * 43758.5453123);}
|
|
1432
|
+
|
|
1433
|
+
float noise(float p){
|
|
1434
|
+
float fl = floor(p);
|
|
1435
|
+
float fc = fract(p);
|
|
1436
|
+
return mix(rand(fl),rand(fl + 1.0), fc);
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
vec3 hsv2rgb(vec3 c)
|
|
1440
|
+
{
|
|
1441
|
+
vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
|
1442
|
+
vec3 p = abs(fract(c.xxx + k.xyz) * 6.0 - k.www);
|
|
1443
|
+
return c.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), c.y);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
float saturate(float x)
|
|
1447
|
+
{
|
|
1448
|
+
return clamp(x, 0.,1.);
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
vec2 rotateUV(vec2 uv, float rotation)
|
|
1452
|
+
{
|
|
1453
|
+
return vec2(
|
|
1454
|
+
cos(rotation) * uv.x + sin(rotation) * uv.y,
|
|
1455
|
+
cos(rotation) * uv.y - sin(rotation) * uv.x
|
|
1456
|
+
);
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
vec3 drawflare(vec2 p, float intensity, float rnd, float speed, int id)
|
|
1460
|
+
{
|
|
1461
|
+
float flarehueoffset = (1. / 32.) * float(id) * 0.1;
|
|
1462
|
+
float lingrad = distance(vec2(0.), p);
|
|
1463
|
+
float expgrad = 1. / exp(lingrad * (fract(rnd) * 0.66 + 0.33));
|
|
1464
|
+
vec3 colgrad = hsv2rgb(vec3( fract( (expgrad * 8.) + speed * flareSpeed + flarehueoffset), pow(1.-abs(expgrad*2.-1.), 0.45), 20.0 * expgrad * intensity));
|
|
1465
|
+
|
|
1466
|
+
float internalStarPoints;
|
|
1467
|
+
|
|
1468
|
+
if(anamorphic){
|
|
1469
|
+
internalStarPoints = 1.0;
|
|
1470
|
+
} else{
|
|
1471
|
+
internalStarPoints = starPoints;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
float blades = length(p * flareShape * sin(internalStarPoints * atan(p.x, p.y)));
|
|
1475
|
+
|
|
1476
|
+
float comp = pow(1.-saturate(blades), ( anamorphic ? 100. : 12.));
|
|
1477
|
+
comp += saturate(expgrad-0.9) * 3.;
|
|
1478
|
+
comp = pow(comp * expgrad, 8. + (1.-intensity) * 5.);
|
|
1479
|
+
|
|
1480
|
+
if(flareSpeed > 0.0){
|
|
1481
|
+
return vec3(comp) * colgrad;
|
|
1482
|
+
} else{
|
|
1483
|
+
return vec3(comp) * flareSize * 15.;
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
float dist(vec3 a, vec3 b) { return abs(a.x - b.x) + abs(a.y - b.y) + abs(a.z - b.z); }
|
|
1488
|
+
|
|
1489
|
+
vec3 saturate(vec3 x)
|
|
1490
|
+
{
|
|
1491
|
+
return clamp(x, vec3(0.0), vec3(1.0));
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
float glare(vec2 uv, vec2 pos, float size)
|
|
1495
|
+
{
|
|
1496
|
+
vec2 main;
|
|
1497
|
+
|
|
1498
|
+
if(animated){
|
|
1499
|
+
main = rotateUV(uv-pos, time * 0.1);
|
|
1500
|
+
} else{
|
|
1501
|
+
main = uv-pos;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
float ang = atan(main.y, main.x) * (anamorphic ? 1.0 : starPoints);
|
|
1505
|
+
float dist = length(main);
|
|
1506
|
+
dist = pow(dist, .9);
|
|
1507
|
+
|
|
1508
|
+
float f0 = 1.0/(length(uv-pos)*(1.0/size*16.0)+.2);
|
|
1509
|
+
|
|
1510
|
+
return f0+f0*(sin((ang))*.2 +.3);
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
float sdHex(vec2 p){
|
|
1514
|
+
p = abs(p);
|
|
1515
|
+
vec2 q = vec2(p.x*2.0*0.5773503, p.y + p.x*0.5773503);
|
|
1516
|
+
return dot(step(q.xy,q.yx), 1.0-q.yx);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
float fpow(float x, float k){
|
|
1520
|
+
return x > k ? pow((x-k)/(1.0-k),2.0) : 0.0;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
vec3 renderhex(vec2 uv, vec2 p, float s, vec3 col){
|
|
1524
|
+
uv -= p;
|
|
1525
|
+
if (abs(uv.x) < 0.2*s && abs(uv.y) < 0.2*s){
|
|
1526
|
+
return mix(vec3(0),mix(vec3(0),col,0.1 + fpow(length(uv/s),0.1)*10.0),smoothstep(0.0,0.1,sdHex(uv*20.0/s)));
|
|
1527
|
+
}
|
|
1528
|
+
return vec3(0);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
vec3 LensFlare(vec2 uv, vec2 pos)
|
|
1532
|
+
{
|
|
1533
|
+
vec2 main = uv-pos;
|
|
1534
|
+
vec2 uvd = uv*(length(uv));
|
|
1535
|
+
|
|
1536
|
+
float ang = atan(main.x,main.y);
|
|
1537
|
+
|
|
1538
|
+
float f0 = .3/(length(uv-pos)*16.0+1.0);
|
|
1539
|
+
|
|
1540
|
+
f0 = f0*(sin(noise(sin(ang*3.9-(animated ? time : 0.0) * 0.3) * starPoints))*.2 );
|
|
1541
|
+
|
|
1542
|
+
float f1 = max(0.01-pow(length(uv+1.2*pos),1.9),.0)*7.0;
|
|
1543
|
+
|
|
1544
|
+
float f2 = max(.9/(10.0+32.0*pow(length(uvd+0.99*pos),2.0)),.0)*0.35;
|
|
1545
|
+
float f22 = max(.9/(11.0+32.0*pow(length(uvd+0.85*pos),2.0)),.0)*0.23;
|
|
1546
|
+
float f23 = max(.9/(12.0+32.0*pow(length(uvd+0.95*pos),2.0)),.0)*0.6;
|
|
1547
|
+
|
|
1548
|
+
vec2 uvx = mix(uv,uvd, 0.1);
|
|
1549
|
+
|
|
1550
|
+
float f4 = max(0.01-pow(length(uvx+0.4*pos),2.9),.0)*4.02;
|
|
1551
|
+
float f42 = max(0.0-pow(length(uvx+0.45*pos),2.9),.0)*4.1;
|
|
1552
|
+
float f43 = max(0.01-pow(length(uvx+0.5*pos),2.9),.0)*4.6;
|
|
1553
|
+
|
|
1554
|
+
uvx = mix(uv,uvd,-.4);
|
|
1555
|
+
|
|
1556
|
+
float f5 = max(0.01-pow(length(uvx+0.1*pos),5.5),.0)*2.0;
|
|
1557
|
+
float f52 = max(0.01-pow(length(uvx+0.2*pos),5.5),.0)*2.0;
|
|
1558
|
+
float f53 = max(0.01-pow(length(uvx+0.1*pos),5.5),.0)*2.0;
|
|
1559
|
+
|
|
1560
|
+
uvx = mix(uv,uvd, 2.1);
|
|
1561
|
+
|
|
1562
|
+
float f6 = max(0.01-pow(length(uvx-0.3*pos),1.61),.0)*3.159;
|
|
1563
|
+
float f62 = max(0.01-pow(length(uvx-0.325*pos),1.614),.0)*3.14;
|
|
1564
|
+
float f63 = max(0.01-pow(length(uvx-0.389*pos),1.623),.0)*3.12;
|
|
1565
|
+
|
|
1566
|
+
vec3 c = vec3(glare(uv,pos, glareSize));
|
|
1567
|
+
|
|
1568
|
+
vec2 prot;
|
|
1569
|
+
|
|
1570
|
+
if(animated){
|
|
1571
|
+
prot = rotateUV(uv - pos, (time * 0.1));
|
|
1572
|
+
} else if(anamorphic){
|
|
1573
|
+
prot = rotateUV(uv - pos, 1.570796);
|
|
1574
|
+
} else {
|
|
1575
|
+
prot = uv - pos;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
c += drawflare(prot, (anamorphic ? flareSize * 10. : flareSize), 0.1, time, 1);
|
|
1579
|
+
|
|
1580
|
+
c.r+=f1+f2+f4+f5+f6; c.g+=f1+f22+f42+f52+f62; c.b+=f1+f23+f43+f53+f63;
|
|
1581
|
+
c = c*1.3 * vec3(length(uvd)+.09);
|
|
1582
|
+
c+=vec3(f0);
|
|
1583
|
+
|
|
1584
|
+
return c;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
vec3 cc(vec3 color, float factor,float factor2)
|
|
1588
|
+
{
|
|
1589
|
+
float w = color.x+color.y+color.z;
|
|
1590
|
+
return mix(color,vec3(w)*factor,w*factor2);
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
float rnd(vec2 p)
|
|
1594
|
+
{
|
|
1595
|
+
float f = fract(sin(dot(p, vec2(12.1234, 72.8392) )*45123.2));
|
|
1596
|
+
return f;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
float rnd(float w)
|
|
1600
|
+
{
|
|
1601
|
+
float f = fract(sin(w)*1000.);
|
|
1602
|
+
return f;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
float regShape(vec2 p, int N)
|
|
1606
|
+
{
|
|
1607
|
+
float f;
|
|
1608
|
+
|
|
1609
|
+
float a=atan(p.x,p.y)+.2;
|
|
1610
|
+
float b=6.28319/float(N);
|
|
1611
|
+
f=smoothstep(.5,.51, cos(floor(.5+a/b)*b-a)*length(p.xy)* 2.0 -ghostScale);
|
|
1612
|
+
|
|
1613
|
+
return f;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
vec3 circle(vec2 p, float size, float decay, vec3 color, vec3 color2, float dist, vec2 position)
|
|
1617
|
+
{
|
|
1618
|
+
float l = length(p + position*(dist*2.))+size/2.;
|
|
1619
|
+
float l2 = length(p + position*(dist*4.))+size/3.;
|
|
1620
|
+
|
|
1621
|
+
float c = max(0.01-pow(length(p + position*dist), size*ghostScale), 0.0)*10.;
|
|
1622
|
+
float c1 = max(0.001-pow(l-0.3, 1./40.)+sin(l*20.), 0.0)*3.;
|
|
1623
|
+
float c2 = max(0.09/pow(length(p-position*dist/.5)*1., .95), 0.0)/20.;
|
|
1624
|
+
float s = max(0.02-pow(regShape(p*5. + position*dist*5. + decay, 6) , 1.), 0.0)*1.5;
|
|
1625
|
+
|
|
1626
|
+
color = cos(vec3(0.44, .24, .2)*16. + dist/8.)*0.5+.5;
|
|
1627
|
+
vec3 f = c*color;
|
|
1628
|
+
f += c1*color;
|
|
1629
|
+
f += c2*color;
|
|
1630
|
+
f += s*color;
|
|
1631
|
+
return f;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
vec4 getLensColor(float x){
|
|
1635
|
+
return vec4(vec3(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(vec3(0., 0., 0.),
|
|
1636
|
+
vec3(0., 0., 0.), smoothstep(0.0, 0.063, x)),
|
|
1637
|
+
vec3(0., 0., 0.), smoothstep(0.063, 0.125, x)),
|
|
1638
|
+
vec3(0.0, 0., 0.), smoothstep(0.125, 0.188, x)),
|
|
1639
|
+
vec3(0.188, 0.131, 0.116), smoothstep(0.188, 0.227, x)),
|
|
1640
|
+
vec3(0.31, 0.204, 0.537), smoothstep(0.227, 0.251, x)),
|
|
1641
|
+
vec3(0.192, 0.106, 0.286), smoothstep(0.251, 0.314, x)),
|
|
1642
|
+
vec3(0.102, 0.008, 0.341), smoothstep(0.314, 0.392, x)),
|
|
1643
|
+
vec3(0.086, 0.0, 0.141), smoothstep(0.392, 0.502, x)),
|
|
1644
|
+
vec3(1.0, 0.31, 0.0), smoothstep(0.502, 0.604, x)),
|
|
1645
|
+
vec3(.1, 0.1, 0.1), smoothstep(0.604, 0.643, x)),
|
|
1646
|
+
vec3(1.0, 0.929, 0.0), smoothstep(0.643, 0.761, x)),
|
|
1647
|
+
vec3(1.0, 0.086, 0.424), smoothstep(0.761, 0.847, x)),
|
|
1648
|
+
vec3(1.0, 0.49, 0.0), smoothstep(0.847, 0.89, x)),
|
|
1649
|
+
vec3(0.945, 0.275, 0.475), smoothstep(0.89, 0.941, x)),
|
|
1650
|
+
vec3(0.251, 0.275, 0.796), smoothstep(0.941, 1.0, x))),
|
|
1651
|
+
1.0);
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
float dirtNoise(vec2 p){
|
|
1655
|
+
vec2 f = fract(p);
|
|
1656
|
+
f = (f * f) * (3.0 - (2.0 * f));
|
|
1657
|
+
float n = dot(floor(p), vec2(1.0, 157.0));
|
|
1658
|
+
vec4 a = fract(sin(vec4(n + 0.0, n + 1.0, n + 157.0, n + 158.0)) * 43758.5453123);
|
|
1659
|
+
return mix(mix(a.x, a.y, f.x), mix(a.z, a.w, f.x), f.y);
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
float fbm(vec2 p){
|
|
1663
|
+
const mat2 m = mat2(0.80, -0.60, 0.60, 0.80);
|
|
1664
|
+
float f = 0.0;
|
|
1665
|
+
f += 0.5000*dirtNoise(p); p = m*p*2.02;
|
|
1666
|
+
f += 0.2500*dirtNoise(p); p = m*p*2.03;
|
|
1667
|
+
f += 0.1250*dirtNoise(p); p = m*p*2.01;
|
|
1668
|
+
f += 0.0625*dirtNoise(p);
|
|
1669
|
+
return f/0.9375;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
vec4 getLensStar(vec2 p){
|
|
1673
|
+
vec2 pp = (p - vec2(0.5)) * 2.0;
|
|
1674
|
+
float a = atan(pp.y, pp.x);
|
|
1675
|
+
vec4 cp = vec4(sin(a * 1.0), length(pp), sin(a * 13.0), sin(a * 53.0));
|
|
1676
|
+
float d = sin(clamp(pow(length(vec2(0.5) - p) * 0.5 + haloScale /2., 5.0), 0.0, 1.0) * 3.14159);
|
|
1677
|
+
vec3 c = vec3(d) * vec3(fbm(cp.xy * 16.0) * fbm(cp.zw * 9.0) * max(max(max(max(0.5, sin(a * 1.0)), sin(a * 3.0) * 0.8), sin(a * 7.0) * 0.8), sin(a * 9.0) * 10.6));
|
|
1678
|
+
c *= vec3(mix(2.0, (sin(length(pp.xy) * 256.0) * 0.5) + 0.5, sin((clamp((length(pp.xy) - 0.875) / 0.1, 0.0, 1.0) + 0.0) * 2.0 * 3.14159) * 1.5) + 0.5) * 0.3275;
|
|
1679
|
+
return vec4(vec3(c * 1.0), d);
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
vec4 getLensDirt(vec2 p){
|
|
1683
|
+
p.xy += vec2(fbm(p.yx * 3.0), fbm(p.yx * 2.0)) * 0.0825;
|
|
1684
|
+
vec3 o = vec3(mix(0.125, 0.25, max(max(smoothstep(0.1, 0.0, length(p - vec2(0.25))),
|
|
1685
|
+
smoothstep(0.4, 0.0, length(p - vec2(0.75)))),
|
|
1686
|
+
smoothstep(0.8, 0.0, length(p - vec2(0.875, 0.125))))));
|
|
1687
|
+
o += vec3(max(fbm(p * 1.0) - 0.5, 0.0)) * 0.5;
|
|
1688
|
+
o += vec3(max(fbm(p * 2.0) - 0.5, 0.0)) * 0.5;
|
|
1689
|
+
o += vec3(max(fbm(p * 4.0) - 0.5, 0.0)) * 0.25;
|
|
1690
|
+
o += vec3(max(fbm(p * 8.0) - 0.75, 0.0)) * 1.0;
|
|
1691
|
+
o += vec3(max(fbm(p * 16.0) - 0.75, 0.0)) * 0.75;
|
|
1692
|
+
o += vec3(max(fbm(p * 64.0) - 0.75, 0.0)) * 0.5;
|
|
1693
|
+
return vec4(clamp(o, vec3(0.15), vec3(1.0)), 1.0);
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
vec4 textureLimited(sampler2D tex, vec2 texCoord){
|
|
1697
|
+
if(((texCoord.x < 0.) || (texCoord.y < 0.)) || ((texCoord.x > 1.) || (texCoord.y > 1.))){
|
|
1698
|
+
return vec4(0.0);
|
|
1699
|
+
}else{
|
|
1700
|
+
return texture(tex, texCoord);
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
vec4 textureDistorted(sampler2D tex, vec2 texCoord, vec2 direction, vec3 distortion) {
|
|
1705
|
+
return vec4(textureLimited(tex, (texCoord + (direction * distortion.r))).r,
|
|
1706
|
+
textureLimited(tex, (texCoord + (direction * distortion.g))).g,
|
|
1707
|
+
textureLimited(tex, (texCoord + (direction * distortion.b))).b,
|
|
1708
|
+
1.0);
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
vec4 getStartBurst(){
|
|
1712
|
+
vec2 aspectTexCoord = vec2(1.0) - (((vTexCoord - vec2(0.5)) * vec2(1.0)) + vec2(0.5));
|
|
1713
|
+
vec2 texCoord = vec2(1.0) - vTexCoord;
|
|
1714
|
+
vec2 ghostVec = (vec2(0.5) - texCoord) * 0.3 - lensPosition;
|
|
1715
|
+
vec2 ghostVecAspectNormalized = normalize(ghostVec * vec2(1.0)) * vec2(1.0);
|
|
1716
|
+
vec2 haloVec = normalize(ghostVec) * 0.6;
|
|
1717
|
+
vec2 haloVecAspectNormalized = ghostVecAspectNormalized * 0.6;
|
|
1718
|
+
vec2 texelSize = vec2(1.0) / vec2(screenRes.xy);
|
|
1719
|
+
vec3 distortion = vec3(-(texelSize.x * 1.5), 0.2, texelSize.x * 1.5);
|
|
1720
|
+
vec4 c = vec4(0.0);
|
|
1721
|
+
for (int i = 0; i < 8; i++) {
|
|
1722
|
+
vec2 offset = texCoord + (ghostVec * float(i));
|
|
1723
|
+
c += textureDistorted(lensDirtTexture, offset, ghostVecAspectNormalized, distortion) * pow(max(0.0, 1.0 - (length(vec2(0.5) - offset) / length(vec2(0.5)))), 10.0);
|
|
1724
|
+
}
|
|
1725
|
+
vec2 haloOffset = texCoord + haloVecAspectNormalized;
|
|
1726
|
+
return (c * getLensColor((length(vec2(0.5) - aspectTexCoord) / length(vec2(haloScale))))) +
|
|
1727
|
+
(textureDistorted(lensDirtTexture, haloOffset, ghostVecAspectNormalized, distortion) * pow(max(0.0, 1.0 - (length(vec2(0.5) - haloOffset) / length(vec2(0.5)))), 10.0));
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
void mainImage(vec4 inputColor, vec2 uv, out vec4 outputColor)
|
|
1731
|
+
{
|
|
1732
|
+
vec2 myUV = uv -0.5;
|
|
1733
|
+
myUV.y *= screenRes.y/screenRes.x;
|
|
1734
|
+
vec2 finalLensPosition = lensPosition * 0.5;
|
|
1735
|
+
finalLensPosition.y *= screenRes.y/screenRes.x;
|
|
1736
|
+
|
|
1737
|
+
vec3 finalColor = LensFlare(myUV, finalLensPosition) * 20.0 * colorGain / 256.;
|
|
1738
|
+
|
|
1739
|
+
if(aditionalStreaks){
|
|
1740
|
+
vec3 circColor = vec3(0.9, 0.2, 0.1);
|
|
1741
|
+
vec3 circColor2 = vec3(0.3, 0.1, 0.9);
|
|
1742
|
+
|
|
1743
|
+
for(float i=0.;i<10.;i++){
|
|
1744
|
+
finalColor += circle(myUV, pow(rnd(i*2000.)*2.8, .1)+1.41, 0.0, circColor+i , circColor2+i, rnd(i*20.)*3.+0.2-.5, lensPosition);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
if(secondaryGhosts){
|
|
1749
|
+
vec3 altGhosts = vec3(0);
|
|
1750
|
+
altGhosts += renderhex(myUV, -lensPosition*0.25, ghostScale * 1.4, vec3(0.25,0.35,0));
|
|
1751
|
+
altGhosts += renderhex(myUV, lensPosition*0.25, ghostScale * 0.5, vec3(1,0.5,0.5));
|
|
1752
|
+
altGhosts += renderhex(myUV, lensPosition*0.1, ghostScale * 1.6, vec3(1,1,1));
|
|
1753
|
+
altGhosts += renderhex(myUV, lensPosition*1.8, ghostScale * 2.0, vec3(0,0.5,0.75));
|
|
1754
|
+
altGhosts += renderhex(myUV, lensPosition*1.25, ghostScale * 0.8, vec3(1,1,0.5));
|
|
1755
|
+
altGhosts += renderhex(myUV, -lensPosition*1.25, ghostScale * 5.0, vec3(0.5,0.5,0.25));
|
|
1756
|
+
|
|
1757
|
+
altGhosts += fpow(1.0 - abs(distance(lensPosition*0.8,myUV) - 0.7),0.985)*colorGain / 2100.;
|
|
1758
|
+
finalColor += altGhosts;
|
|
1759
|
+
}
|
|
1275
1760
|
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
vec2 vxtC;
|
|
1296
|
-
|
|
1297
|
-
float rndf(float n){return fract(sin(n) * 43758.5453123);}float niz(float p){float fl = floor(p);float fc = fract(p);return mix(rndf(fl),rndf(fl + 1.0), fc);}
|
|
1298
|
-
vec3 hsv2rgb(vec3 c){vec4 k = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);vec3 p = abs(fract(c.xxx + k.xyz) * 6.0 - k.www);return c.z * mix(k.xxx, clamp(p - k.xxx, 0.0, 1.0), c.y);}
|
|
1299
|
-
float satU(float x){return clamp(x, 0.,1.);}vec2 rtU(vec2 naz, float rtn){return vec2(cos(rtn) * naz.x + sin(rtn) * naz.y,cos(rtn) * naz.y - sin(rtn) * naz.x);}
|
|
1300
|
-
vec3 drwF(vec2 p, float intensity, float rnd, float speed, int id){float flhos = (1. / 32.) * float(id) * 0.1;float lingrad = distance(vec2(0.), p);float expg = 1. / exp(lingrad * (fract(rnd) * 0.66 + 0.33));vec3 qzTg = hsv2rgb(vec3( fract( (expg * 8.) + speed * flareSpeed + flhos), pow(1.-abs(expg*2.-1.), 0.45), 20.0 * expg * intensity));float internalStarPoints;if(anamorphic){internalStarPoints = 1.0;} else{internalStarPoints = starPoints;}float ams = length(p * flareShape * sin(internalStarPoints * atan(p.x, p.y)));float kJhg = pow(1.-satU(ams), ( anamorphic ? 100. : 12.));kJhg += satU(expg-0.9) * 3.;kJhg = pow(kJhg * expg, 8. + (1.-intensity) * 5.);if(flareSpeed > 0.0){return vec3(kJhg) * qzTg;} else{return vec3(kJhg) * flareSize * 15.;}}
|
|
1301
|
-
float ams2(vec3 a, vec3 b) { return abs(a.x - b.x) + abs(a.y - b.y) + abs(a.z - b.z);}vec3 satU(vec3 x){return clamp(x, vec3(0.0), vec3(1.0));}
|
|
1302
|
-
float glR(vec2 naz, vec2 pos, float zsi){vec2 mni;if(animated){mni = rtU(naz-pos, iTime * 0.1);} else{mni = naz-pos;}float ang = atan(mni.y, mni.x) * (anamorphic ? 1.0 : starPoints);float ams2 = length(mni);ams2 = pow(ams2, .9);float f0 = 1.0/(length(naz-pos)*(1.0/zsi*16.0)+.2);return f0+f0*(sin((ang))*.2 +.3);}
|
|
1303
|
-
float sdHex(vec2 p){p = abs(p);vec2 q = vec2(p.x*2.0*0.5773503, p.y + p.x*0.5773503);return dot(step(q.xy,q.yx), 1.0-q.yx);}float fpow(float x, float k){return x > k ? pow((x-k)/(1.0-k),2.0) : 0.0;}
|
|
1304
|
-
vec3 rHx(vec2 naz, vec2 p, float s, vec3 col){naz -= p;if (abs(naz.x) < 0.2*s && abs(naz.y) < 0.2*s){return mix(vec3(0),mix(vec3(0),col,0.1 + fpow(length(naz/s),0.1)*10.0),smoothstep(0.0,0.1,sdHex(naz*20.0/s)));}return vec3(0);}
|
|
1305
|
-
vec3 mLs(vec2 naz, vec2 pos){vec2 mni = naz-pos;vec2 zxMp = naz*(length(naz));float ang = atan(mni.x,mni.y);float f0 = .3/(length(naz-pos)*16.0+1.0);f0 = f0*(sin(niz(sin(ang*3.9-(animated ? iTime : 0.0) * 0.3) * starPoints))*.2 );float f1 = max(0.01-pow(length(naz+1.2*pos),1.9),.0)*7.0;float f2 = max(.9/(10.0+32.0*pow(length(zxMp+0.99*pos),2.0)),.0)*0.35;float f22 = max(.9/(11.0+32.0*pow(length(zxMp+0.85*pos),2.0)),.0)*0.23;float f23 = max(.9/(12.0+32.0*pow(length(zxMp+0.95*pos),2.0)),.0)*0.6;vec2 ztX = mix(naz,zxMp, 0.1);float f4 = max(0.01-pow(length(ztX+0.4*pos),2.9),.0)*4.02;float f42 = max(0.0-pow(length(ztX+0.45*pos),2.9),.0)*4.1;float f43 = max(0.01-pow(length(ztX+0.5*pos),2.9),.0)*4.6;ztX = mix(naz,zxMp,-.4);float f5 = max(0.01-pow(length(ztX+0.1*pos),5.5),.0)*2.0;float f52 = max(0.01-pow(length(ztX+0.2*pos),5.5),.0)*2.0;float f53 = max(0.01-pow(length(ztX+0.1*pos),5.5),.0)*2.0;ztX = mix(naz,zxMp, 2.1);float f6 = max(0.01-pow(length(ztX-0.3*pos),1.61),.0)*3.159;float f62 = max(0.01-pow(length(ztX-0.325*pos),1.614),.0)*3.14;float f63 = max(0.01-pow(length(ztX-0.389*pos),1.623),.0)*3.12;vec3 c = vec3(glR(naz,pos, glareSize));vec2 prot;if(animated){prot = rtU(naz - pos, (iTime * 0.1));} else if(anamorphic){prot = rtU(naz - pos, 1.570796);} else {prot = naz - pos;}c += drwF(prot, (anamorphic ? flareSize * 10. : flareSize), 0.1, iTime, 1);c.r+=f1+f2+f4+f5+f6; c.g+=f1+f22+f42+f52+f62; c.b+=f1+f23+f43+f53+f63;c = c*1.3 * vec3(length(zxMp)+.09);c+=vec3(f0);return c;}
|
|
1306
|
-
vec3 cc(vec3 clr, float fct,float fct2){float w = clr.x+clr.y+clr.z;return mix(clr,vec3(w)*fct,w*fct2);}float rnd(vec2 p){float f = fract(sin(dot(p, vec2(12.1234, 72.8392) )*45123.2));return f;}float rnd(float w){float f = fract(sin(w)*1000.);return f;}
|
|
1307
|
-
float rShp(vec2 p, int N){float f;float a=atan(p.x,p.y)+.2;float b=6.28319/float(N);f=smoothstep(.5,.51, cos(floor(.5+a/b)*b-a)*length(p.xy)* 2.0 -ghostScale);return f;}
|
|
1308
|
-
vec3 drC(vec2 p, float zsi, float dCy, vec3 clr, vec3 clr2, float ams2, vec2 esom){float l = length(p + esom*(ams2*2.))+zsi/2.;float l2 = length(p + esom*(ams2*4.))+zsi/3.;float c = max(0.01-pow(length(p + esom*ams2), zsi*ghostScale), 0.0)*10.;float c1 = max(0.001-pow(l-0.3, 1./40.)+sin(l*20.), 0.0)*3.;float c2 = max(0.09/pow(length(p-esom*ams2/.5)*1., .95), 0.0)/20.;float s = max(0.02-pow(rShp(p*5. + esom*ams2*5. + dCy, 6) , 1.), 0.0)*1.5;clr = cos(vec3(0.44, .24, .2)*8. + ams2*4.)*0.5+.5;vec3 f = c*clr;f += c1*clr;f += c2*clr;f += s*clr;return f-0.01;}
|
|
1309
|
-
vec4 geLC(float x){return vec4(vec3(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(mix(vec3(0., 0., 0.),vec3(0., 0., 0.), smoothstep(0.0, 0.063, x)),vec3(0., 0., 0.), smoothstep(0.063, 0.125, x)),vec3(0.0, 0., 0.), smoothstep(0.125, 0.188, x)),vec3(0.188, 0.131, 0.116), smoothstep(0.188, 0.227, x)),vec3(0.31, 0.204, 0.537), smoothstep(0.227, 0.251, x)),vec3(0.192, 0.106, 0.286), smoothstep(0.251, 0.314, x)),vec3(0.102, 0.008, 0.341), smoothstep(0.314, 0.392, x)),vec3(0.086, 0.0, 0.141), smoothstep(0.392, 0.502, x)),vec3(1.0, 0.31, 0.0), smoothstep(0.502, 0.604, x)),vec3(.1, 0.1, 0.1), smoothstep(0.604, 0.643, x)),vec3(1.0, 0.929, 0.0), smoothstep(0.643, 0.761, x)),vec3(1.0, 0.086, 0.424), smoothstep(0.761, 0.847, x)),vec3(1.0, 0.49, 0.0), smoothstep(0.847, 0.89, x)),vec3(0.945, 0.275, 0.475), smoothstep(0.89, 0.941, x)),vec3(0.251, 0.275, 0.796), smoothstep(0.941, 1.0, x))),1.0);}
|
|
1310
|
-
float diTN(vec2 p){vec2 f = fract(p);f = (f * f) * (3.0 - (2.0 * f));float n = dot(floor(p), vec2(1.0, 157.0));vec4 a = fract(sin(vec4(n + 0.0, n + 1.0, n + 157.0, n + 158.0)) * 43758.5453123);return mix(mix(a.x, a.y, f.x), mix(a.z, a.w, f.x), f.y);}
|
|
1311
|
-
float fbm(vec2 p){const mat2 m = mat2(0.80, -0.60, 0.60, 0.80);float f = 0.0;f += 0.5000*diTN(p); p = m*p*2.02;f += 0.2500*diTN(p); p = m*p*2.03;f += 0.1250*diTN(p); p = m*p*2.01;f += 0.0625*diTN(p);return f/0.9375;}
|
|
1312
|
-
vec4 geLS(vec2 p){vec2 pp = (p - vec2(0.5)) * 2.0;float a = atan(pp.y, pp.x);vec4 cp = vec4(sin(a * 1.0), length(pp), sin(a * 13.0), sin(a * 53.0));float d = sin(clamp(pow(length(vec2(0.5) - p) * 0.5 + haloScale /2., 5.0), 0.0, 1.0) * 3.14159);vec3 c = vec3(d) * vec3(fbm(cp.xy * 16.0) * fbm(cp.zw * 9.0) * max(max(max(max(0.5, sin(a * 1.0)), sin(a * 3.0) * 0.8), sin(a * 7.0) * 0.8), sin(a * 9.0) * 10.6));c *= vec3(mix(2.0, (sin(length(pp.xy) * 256.0) * 0.5) + 0.5, sin((clamp((length(pp.xy) - 0.875) / 0.1, 0.0, 1.0) + 0.0) * 2.0 * 3.14159) * 1.5) + 0.5) * 0.3275;return vec4(vec3(c * 1.0), d);}
|
|
1313
|
-
vec4 geLD(vec2 p){p.xy += vec2(fbm(p.yx * 3.0), fbm(p.yx * 2.0)) * 0.0825;vec3 o = vec3(mix(0.125, 0.25, max(max(smoothstep(0.1, 0.0, length(p - vec2(0.25))),smoothstep(0.4, 0.0, length(p - vec2(0.75)))),smoothstep(0.8, 0.0, length(p - vec2(0.875, 0.125))))));o += vec3(max(fbm(p * 1.0) - 0.5, 0.0)) * 0.5;o += vec3(max(fbm(p * 2.0) - 0.5, 0.0)) * 0.5;o += vec3(max(fbm(p * 4.0) - 0.5, 0.0)) * 0.25;o += vec3(max(fbm(p * 8.0) - 0.75, 0.0)) * 1.0;o += vec3(max(fbm(p * 16.0) - 0.75, 0.0)) * 0.75;o += vec3(max(fbm(p * 64.0) - 0.75, 0.0)) * 0.5;return vec4(clamp(o, vec3(0.15), vec3(1.0)), 1.0);}
|
|
1314
|
-
vec4 txL(sampler2D tex, vec2 xtC){if(((xtC.x < 0.) || (xtC.y < 0.)) || ((xtC.x > 1.) || (xtC.y > 1.))){return vec4(0.0);}else{return texture(tex, xtC); }}
|
|
1315
|
-
vec4 txD(sampler2D tex, vec2 xtC, vec2 dir, vec3 ditn) {return vec4(txL(tex, (xtC + (dir * ditn.r))).r,txL(tex, (xtC + (dir * ditn.g))).g,txL(tex, (xtC + (dir * ditn.b))).b,1.0);}
|
|
1316
|
-
vec4 strB(){vec2 aspXtc = vec2(1.0) - (((vxtC - vec2(0.5)) * vec2(1.0)) + vec2(0.5)); vec2 xtC = vec2(1.0) - vxtC; vec2 ghvc = (vec2(0.5) - xtC) * 0.3 - lensPosition; vec2 ghNm = normalize(ghvc * vec2(1.0)) * vec2(1.0);vec2 haloVec = normalize(ghvc) * 0.6;vec2 hlNm = ghNm * 0.6;vec2 texelSize = vec2(1.0) / vec2(iResolution.xy);vec3 ditn = vec3(-(texelSize.x * 1.5), 0.2, texelSize.x * 1.5);vec4 c = vec4(0.0);for (int i = 0; i < 8; i++) {vec2 offset = xtC + (ghvc * float(i));c += txD(lensDirtTexture, offset, ghNm, ditn) * pow(max(0.0, 1.0 - (length(vec2(0.5) - offset) / length(vec2(0.5)))), 10.0);}vec2 uyTrz = xtC + hlNm; return (c * geLC((length(vec2(0.5) - aspXtc) / length(vec2(haloScale))))) +(txD(lensDirtTexture, uyTrz, ghNm, ditn) * pow(max(0.0, 1.0 - (length(vec2(0.5) - uyTrz) / length(vec2(0.5)))), 10.0));}
|
|
1317
|
-
void mainImage(vec4 v,vec2 r,out vec4 i){vec2 g=r-.5;g.y*=iResolution.y/iResolution.x;vec2 l=lensPosition*.5;l.y*=iResolution.y/iResolution.x;vec3 f=mLs(g,l)*20.*colorGain/256.;if(aditionalStreaks){vec3 o=vec3(.9,.2,.1),p=vec3(.3,.1,.9);for(float n=0.;n<10.;n++)f+=drC(g,pow(rnd(n*2e3)*2.8,.1)+1.41,0.,o+n,p+n,rnd(n*20.)*3.+.2-.5,lensPosition);}if(secondaryGhosts){vec3 n=vec3(0);n+=rHx(g,-lensPosition*.25,ghostScale*1.4,vec3(.25,.35,0));n+=rHx(g,lensPosition*.25,ghostScale*.5,vec3(1,.5,.5));n+=rHx(g,lensPosition*.1,ghostScale*1.6,vec3(1));n+=rHx(g,lensPosition*1.8,ghostScale*2.,vec3(0,.5,.75));n+=rHx(g,lensPosition*1.25,ghostScale*.8,vec3(1,1,.5));n+=rHx(g,-lensPosition*1.25,ghostScale*5.,vec3(.5,.5,.25));n+=fpow(1.-abs(distance(lensPosition*.8,g)-.7),.985)*colorGain/2100.;f+=n;}if(starBurst){vxtC=g+.5;vec4 n=geLD(g);float o=1.-clamp(0.5,0.,.5)*2.;n+=mix(n,pow(n*2.,vec4(2))*.5,o);float s=(g.x+g.y)*(1./6.);vec2 d=mat2(cos(s),-sin(s),sin(s),cos(s))*vxtC;n+=geLS(d)*2.;f+=clamp(n.xyz*strB().xyz,.01,1.);}i=enabled?vec4(mix(f,vec3(0),opacity)+v.xyz,v.w):vec4(v);}
|
|
1761
|
+
if(starBurst){
|
|
1762
|
+
vTexCoord = myUV + 0.5;
|
|
1763
|
+
vec4 lensMod = getLensDirt(myUV);
|
|
1764
|
+
float tooBright = 1.0 - (clamp(0.5, 0.0, 0.5) * 2.0);
|
|
1765
|
+
float tooDark = clamp(0.5 - 0.5, 0.0, 0.5) * 2.0;
|
|
1766
|
+
lensMod += mix(lensMod, pow(lensMod * 2.0, vec4(2.0)) * 0.5, tooBright);
|
|
1767
|
+
float lensStarRotationAngle = ((myUV.x + myUV.y)) * (1.0 / 6.0);
|
|
1768
|
+
vec2 lensStarTexCoord = (mat2(cos(lensStarRotationAngle), -sin(lensStarRotationAngle), sin(lensStarRotationAngle), cos(lensStarRotationAngle)) * vTexCoord);
|
|
1769
|
+
lensMod += getLensStar(lensStarTexCoord) * 2.;
|
|
1770
|
+
|
|
1771
|
+
finalColor += clamp((lensMod.rgb * getStartBurst().rgb ), 0.01, 1.0);
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
if(enabled){
|
|
1775
|
+
outputColor = vec4(mix(finalColor, vec3(.0), opacity) + inputColor.rgb, inputColor.a);
|
|
1776
|
+
} else {
|
|
1777
|
+
outputColor = vec4(inputColor);
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1318
1780
|
`,
|
|
1319
1781
|
};
|
|
1320
1782
|
/**
|
|
@@ -1341,7 +1803,7 @@ class LensFlareEffect extends Effect {
|
|
|
1341
1803
|
* @param options.enabled - Whether the effect is enabled
|
|
1342
1804
|
* @param options.glareSize - Size of the glare
|
|
1343
1805
|
* @param options.lensPosition - Position of the lens on screen
|
|
1344
|
-
* @param options.
|
|
1806
|
+
* @param options.screenRes - Resolution of the effect
|
|
1345
1807
|
* @param options.starPoints - Number of points in the star pattern
|
|
1346
1808
|
* @param options.flareSize - Size of individual flares
|
|
1347
1809
|
* @param options.flareSpeed - Animation speed of flares
|
|
@@ -1357,15 +1819,15 @@ class LensFlareEffect extends Effect {
|
|
|
1357
1819
|
* @param options.opacity - Opacity of the effect
|
|
1358
1820
|
* @param options.starBurst - Enable star burst effect
|
|
1359
1821
|
*/
|
|
1360
|
-
constructor({ blendFunction = BlendFunction.NORMAL, enabled = true, glareSize = 0.2, lensPosition = [0.01, 0.01],
|
|
1822
|
+
constructor({ blendFunction = BlendFunction.NORMAL, enabled = true, glareSize = 0.2, lensPosition = [0.01, 0.01], screenRes = [0, 0], starPoints = 6, flareSize = 0.01, flareSpeed = 0.01, flareShape = 0.01, animated = true, anamorphic = false, colorGain = new THREE.Color(20, 20, 20), lensDirtTexture = null, haloScale = 0.5, secondaryGhosts = true, aditionalStreaks = true, ghostScale = 0.0, opacity = 1.0, starBurst = false, } = {}) {
|
|
1361
1823
|
super('LensFlareEffect', LensFlareShader.fragmentShader, {
|
|
1362
1824
|
blendFunction,
|
|
1363
1825
|
uniforms: new Map([
|
|
1364
1826
|
['enabled', new THREE.Uniform(enabled)],
|
|
1365
1827
|
['glareSize', new THREE.Uniform(glareSize)],
|
|
1366
1828
|
['lensPosition', new THREE.Uniform(lensPosition)],
|
|
1367
|
-
['
|
|
1368
|
-
['
|
|
1829
|
+
['time', new THREE.Uniform(0)],
|
|
1830
|
+
['screenRes', new THREE.Uniform(screenRes)],
|
|
1369
1831
|
['starPoints', new THREE.Uniform(starPoints)],
|
|
1370
1832
|
['flareSize', new THREE.Uniform(flareSize)],
|
|
1371
1833
|
['flareSpeed', new THREE.Uniform(flareSpeed)],
|
|
@@ -1391,9 +1853,9 @@ class LensFlareEffect extends Effect {
|
|
|
1391
1853
|
* @param deltaTime - Time elapsed since last frame
|
|
1392
1854
|
*/
|
|
1393
1855
|
update(_renderer, _inputBuffer, deltaTime) {
|
|
1394
|
-
const
|
|
1395
|
-
if (
|
|
1396
|
-
|
|
1856
|
+
const time = this.uniforms.get('time');
|
|
1857
|
+
if (time) {
|
|
1858
|
+
time.value += deltaTime;
|
|
1397
1859
|
}
|
|
1398
1860
|
}
|
|
1399
1861
|
}
|
|
@@ -1447,10 +1909,10 @@ class NgtpLensFlare {
|
|
|
1447
1909
|
this.store.viewport.width(),
|
|
1448
1910
|
this.store.viewport.height(),
|
|
1449
1911
|
];
|
|
1450
|
-
const
|
|
1451
|
-
if (
|
|
1452
|
-
|
|
1453
|
-
|
|
1912
|
+
const screenRes = lensFlareEffect.uniforms.get('screenRes');
|
|
1913
|
+
if (screenRes) {
|
|
1914
|
+
screenRes.value.x = width;
|
|
1915
|
+
screenRes.value.y = height;
|
|
1454
1916
|
}
|
|
1455
1917
|
});
|
|
1456
1918
|
effect((onCleanup) => {
|
|
@@ -1514,12 +1976,12 @@ class NgtpLensFlare {
|
|
|
1514
1976
|
easing.damp(uOpacity, 'value', target, smoothTime, delta);
|
|
1515
1977
|
});
|
|
1516
1978
|
}
|
|
1517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
1979
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpLensFlare, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1980
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpLensFlare, isStandalone: true, selector: "ngtp-lens-flare", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1519
1981
|
<ngt-primitive *args="[effect()]" [parameters]="{ dispose: null }" />
|
|
1520
1982
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1521
1983
|
}
|
|
1522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1984
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpLensFlare, decorators: [{
|
|
1523
1985
|
type: Component,
|
|
1524
1986
|
args: [{
|
|
1525
1987
|
selector: 'ngtp-lens-flare',
|
|
@@ -1584,12 +2046,12 @@ class NgtpLUT {
|
|
|
1584
2046
|
onCleanup(() => effect.dispose());
|
|
1585
2047
|
});
|
|
1586
2048
|
}
|
|
1587
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1588
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
2049
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpLUT, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2050
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpLUT, isStandalone: true, selector: "ngtp-lut", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1589
2051
|
<ngt-primitive *args="[effect()]" [dispose]="null" />
|
|
1590
2052
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1591
2053
|
}
|
|
1592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2054
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpLUT, decorators: [{
|
|
1593
2055
|
type: Component,
|
|
1594
2056
|
args: [{
|
|
1595
2057
|
selector: 'ngtp-lut',
|
|
@@ -1627,15 +2089,15 @@ class NgtpNoise {
|
|
|
1627
2089
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
1628
2090
|
extend({ NoiseEffect });
|
|
1629
2091
|
}
|
|
1630
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1631
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
2092
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpNoise, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2093
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpNoise, isStandalone: true, selector: "ngtp-noise", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.COLOR_DODGE })], viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
1632
2094
|
<ngt-noise-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
1633
2095
|
<ngtp-effect-blend-mode />
|
|
1634
2096
|
<ng-content />
|
|
1635
2097
|
</ngt-noise-effect>
|
|
1636
2098
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1637
2099
|
}
|
|
1638
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpNoise, decorators: [{
|
|
1639
2101
|
type: Component,
|
|
1640
2102
|
args: [{
|
|
1641
2103
|
selector: 'ngtp-noise',
|
|
@@ -1820,12 +2282,12 @@ class NgtpOutline {
|
|
|
1820
2282
|
invalidate();
|
|
1821
2283
|
};
|
|
1822
2284
|
}
|
|
1823
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1824
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
2285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpOutline, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2286
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpOutline, isStandalone: true, selector: "ngtp-outline", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1825
2287
|
<ngt-primitive *args="[effect()]" />
|
|
1826
2288
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1827
2289
|
}
|
|
1828
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpOutline, decorators: [{
|
|
1829
2291
|
type: Component,
|
|
1830
2292
|
args: [{
|
|
1831
2293
|
selector: 'ngtp-outline',
|
|
@@ -1867,12 +2329,12 @@ class NgtpPixelation {
|
|
|
1867
2329
|
onCleanup(() => effect.dispose());
|
|
1868
2330
|
});
|
|
1869
2331
|
}
|
|
1870
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1871
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
2332
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpPixelation, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2333
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpPixelation, isStandalone: true, selector: "ngtp-pixelation", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1872
2334
|
<ngt-primitive *args="[effect()]" />
|
|
1873
2335
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1874
2336
|
}
|
|
1875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpPixelation, decorators: [{
|
|
1876
2338
|
type: Component,
|
|
1877
2339
|
args: [{
|
|
1878
2340
|
selector: 'ngtp-pixelation',
|
|
@@ -1885,6 +2347,125 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1885
2347
|
}]
|
|
1886
2348
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
1887
2349
|
|
|
2350
|
+
const RampShader = {
|
|
2351
|
+
fragmentShader: /* language=glsl glsl */ `
|
|
2352
|
+
uniform int rampType;
|
|
2353
|
+
|
|
2354
|
+
uniform vec2 rampStart;
|
|
2355
|
+
uniform vec2 rampEnd;
|
|
2356
|
+
|
|
2357
|
+
uniform vec4 startColor;
|
|
2358
|
+
uniform vec4 endColor;
|
|
2359
|
+
|
|
2360
|
+
uniform float rampBias;
|
|
2361
|
+
uniform float rampGain;
|
|
2362
|
+
|
|
2363
|
+
uniform bool rampMask;
|
|
2364
|
+
uniform bool rampInvert;
|
|
2365
|
+
|
|
2366
|
+
float getBias(float time, float bias) {
|
|
2367
|
+
return time / (((1.0 / bias) - 2.0) * (1.0 - time) + 1.0);
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
float getGain(float time, float gain) {
|
|
2371
|
+
if (time < 0.5)
|
|
2372
|
+
return getBias(time * 2.0, gain) / 2.0;
|
|
2373
|
+
else
|
|
2374
|
+
return getBias(time * 2.0 - 1.0, 1.0 - gain) / 2.0 + 0.5;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
|
|
2378
|
+
vec2 centerPixel = uv * resolution;
|
|
2379
|
+
vec2 startPixel = rampStart * resolution;
|
|
2380
|
+
vec2 endPixel = rampEnd * resolution;
|
|
2381
|
+
|
|
2382
|
+
float rampAlpha;
|
|
2383
|
+
|
|
2384
|
+
if (rampType == 1) {
|
|
2385
|
+
vec2 fuv = centerPixel / resolution.y;
|
|
2386
|
+
vec2 suv = startPixel / resolution.y;
|
|
2387
|
+
vec2 euv = endPixel / resolution.y;
|
|
2388
|
+
|
|
2389
|
+
float radius = length(suv - euv);
|
|
2390
|
+
float falloff = length(fuv - suv);
|
|
2391
|
+
rampAlpha = smoothstep(0.0, radius, falloff);
|
|
2392
|
+
} else {
|
|
2393
|
+
float radius = length(startPixel - endPixel);
|
|
2394
|
+
vec2 direction = normalize(vec2(endPixel.x - startPixel.x, -(startPixel.y - endPixel.y)));
|
|
2395
|
+
|
|
2396
|
+
float fade = dot(centerPixel - startPixel, direction);
|
|
2397
|
+
if (rampType == 2) fade = abs(fade);
|
|
2398
|
+
|
|
2399
|
+
rampAlpha = smoothstep(0.0, 1.0, fade / radius);
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
rampAlpha = abs((rampInvert ? 1.0 : 0.0) - getBias(rampAlpha, rampBias) * getGain(rampAlpha, rampGain));
|
|
2403
|
+
|
|
2404
|
+
if (rampMask) {
|
|
2405
|
+
vec4 inputBuff = texture2D(inputBuffer, uv);
|
|
2406
|
+
outputColor = mix(inputBuff, inputColor, rampAlpha);
|
|
2407
|
+
} else {
|
|
2408
|
+
outputColor = mix(startColor, endColor, rampAlpha);
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
`,
|
|
2412
|
+
};
|
|
2413
|
+
var RampType;
|
|
2414
|
+
(function (RampType) {
|
|
2415
|
+
RampType[RampType["Linear"] = 0] = "Linear";
|
|
2416
|
+
RampType[RampType["Radial"] = 1] = "Radial";
|
|
2417
|
+
RampType[RampType["MirroredLinear"] = 2] = "MirroredLinear";
|
|
2418
|
+
})(RampType || (RampType = {}));
|
|
2419
|
+
class RampEffect extends Effect {
|
|
2420
|
+
constructor({ rampType = RampType.Linear, rampStart = [0.5, 0.5], rampEnd = [1, 1], startColor = [0, 0, 0, 1], endColor = [1, 1, 1, 1], rampBias = 0.5, rampGain = 0.5, rampMask = false, rampInvert = false, ...params } = {}) {
|
|
2421
|
+
super('RampEffect', RampShader.fragmentShader, {
|
|
2422
|
+
...params,
|
|
2423
|
+
uniforms: new Map([
|
|
2424
|
+
['rampType', new THREE.Uniform(rampType)],
|
|
2425
|
+
['rampStart', new THREE.Uniform(rampStart)],
|
|
2426
|
+
['rampEnd', new THREE.Uniform(rampEnd)],
|
|
2427
|
+
['startColor', new THREE.Uniform(startColor)],
|
|
2428
|
+
['endColor', new THREE.Uniform(endColor)],
|
|
2429
|
+
['rampBias', new THREE.Uniform(rampBias)],
|
|
2430
|
+
['rampGain', new THREE.Uniform(rampGain)],
|
|
2431
|
+
['rampMask', new THREE.Uniform(rampMask)],
|
|
2432
|
+
['rampInvert', new THREE.Uniform(rampInvert)],
|
|
2433
|
+
]),
|
|
2434
|
+
});
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
extend({ RampEffect });
|
|
2438
|
+
class NgtpRamp {
|
|
2439
|
+
constructor() {
|
|
2440
|
+
this.options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
2441
|
+
this.hostEffect = inject(NgtpEffect, { host: true });
|
|
2442
|
+
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2443
|
+
}
|
|
2444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpRamp, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpRamp, isStandalone: true, selector: "ngtp-ramp", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2446
|
+
<ngt-ramp-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2447
|
+
<ngtp-effect-blend-mode />
|
|
2448
|
+
<ng-content />
|
|
2449
|
+
</ngt-ramp-effect>
|
|
2450
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2451
|
+
}
|
|
2452
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpRamp, decorators: [{
|
|
2453
|
+
type: Component,
|
|
2454
|
+
args: [{
|
|
2455
|
+
selector: 'ngtp-ramp',
|
|
2456
|
+
template: `
|
|
2457
|
+
<ngt-ramp-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2458
|
+
<ngtp-effect-blend-mode />
|
|
2459
|
+
<ng-content />
|
|
2460
|
+
</ngt-ramp-effect>
|
|
2461
|
+
`,
|
|
2462
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
2463
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2464
|
+
imports: [NgtArgs, NgtpEffectBlendMode],
|
|
2465
|
+
hostDirectives: [{ directive: NgtpEffect, inputs: ['blendFunction', 'opacity'] }],
|
|
2466
|
+
}]
|
|
2467
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], effectRef: [{ type: i0.ViewChild, args: ['effect', { isSignal: true }] }] } });
|
|
2468
|
+
|
|
1888
2469
|
const defaultOptions$1 = {
|
|
1889
2470
|
density: 1.25,
|
|
1890
2471
|
};
|
|
@@ -1914,15 +2495,15 @@ class NgtpScanline {
|
|
|
1914
2495
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
1915
2496
|
extend({ ScanlineEffect });
|
|
1916
2497
|
}
|
|
1917
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
2498
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpScanline, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2499
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpScanline, isStandalone: true, selector: "ngtp-scanline", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.OVERLAY })], viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
1919
2500
|
<ngt-scanline-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
1920
2501
|
<ngtp-effect-blend-mode />
|
|
1921
2502
|
<ng-content />
|
|
1922
2503
|
</ngt-scanline-effect>
|
|
1923
2504
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1924
2505
|
}
|
|
1925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpScanline, decorators: [{
|
|
1926
2507
|
type: Component,
|
|
1927
2508
|
args: [{
|
|
1928
2509
|
selector: 'ngtp-scanline',
|
|
@@ -2108,12 +2689,12 @@ class NgtpSelectiveBloom {
|
|
|
2108
2689
|
removeLight(effect, light) {
|
|
2109
2690
|
light.layers.disable(effect.selection.layer);
|
|
2110
2691
|
}
|
|
2111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2112
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
2692
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSelectiveBloom, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2693
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpSelectiveBloom, isStandalone: true, selector: "ngtp-selective-bloom", inputs: { lights: { classPropertyName: "lights", publicName: "lights", isSignal: true, isRequired: true, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2113
2694
|
<ngt-primitive *args="[effect()]" [dispose]="null" />
|
|
2114
2695
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2115
2696
|
}
|
|
2116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSelectiveBloom, decorators: [{
|
|
2117
2698
|
type: Component,
|
|
2118
2699
|
args: [{
|
|
2119
2700
|
selector: 'ngtp-selective-bloom',
|
|
@@ -2151,15 +2732,15 @@ class NgtpSepia {
|
|
|
2151
2732
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2152
2733
|
extend({ SepiaEffect });
|
|
2153
2734
|
}
|
|
2154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2155
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
2735
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSepia, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2736
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpSepia, isStandalone: true, selector: "ngtp-sepia", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2156
2737
|
<ngt-sepia-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2157
2738
|
<ngtp-effect-blend-mode />
|
|
2158
2739
|
<ng-content />
|
|
2159
2740
|
</ngt-sepia-effect>
|
|
2160
2741
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2161
2742
|
}
|
|
2162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSepia, decorators: [{
|
|
2163
2744
|
type: Component,
|
|
2164
2745
|
args: [{
|
|
2165
2746
|
selector: 'ngtp-sepia',
|
|
@@ -2176,6 +2757,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2176
2757
|
}]
|
|
2177
2758
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], effectRef: [{ type: i0.ViewChild, args: ['effect', { isSignal: true }] }] } });
|
|
2178
2759
|
|
|
2760
|
+
class NgtpSSAO {
|
|
2761
|
+
constructor() {
|
|
2762
|
+
this.options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
2763
|
+
this.effectComposer = inject(NgtpEffectComposer);
|
|
2764
|
+
this.effect = computed(() => {
|
|
2765
|
+
const [normalPass, downSamplingPass] = [
|
|
2766
|
+
this.effectComposer.normalPass(),
|
|
2767
|
+
this.effectComposer.downSamplingPass(),
|
|
2768
|
+
];
|
|
2769
|
+
if (normalPass === null && downSamplingPass === null) {
|
|
2770
|
+
console.error('[NGT Postprocessing] Please enable the NormalPass in the EffectComposer in order to use SSAO.');
|
|
2771
|
+
return null;
|
|
2772
|
+
}
|
|
2773
|
+
const [camera, options] = [this.effectComposer.camera(), this.options()];
|
|
2774
|
+
return new SSAOEffect(camera, normalPass && !downSamplingPass ? normalPass.texture : null, {
|
|
2775
|
+
blendFunction: BlendFunction.MULTIPLY,
|
|
2776
|
+
samples: 30,
|
|
2777
|
+
rings: 4,
|
|
2778
|
+
distanceThreshold: 1.0,
|
|
2779
|
+
distanceFalloff: 0.0,
|
|
2780
|
+
rangeThreshold: 0.5,
|
|
2781
|
+
rangeFalloff: 0.1,
|
|
2782
|
+
luminanceInfluence: 0.9,
|
|
2783
|
+
radius: 20,
|
|
2784
|
+
bias: 0.5,
|
|
2785
|
+
intensity: 1.0,
|
|
2786
|
+
color: undefined,
|
|
2787
|
+
// @ts-expect-error - normalDepthBuffer is not in the types but is supported
|
|
2788
|
+
normalDepthBuffer: downSamplingPass ? downSamplingPass.texture : null,
|
|
2789
|
+
resolutionScale: 1,
|
|
2790
|
+
depthAwareUpsampling: true,
|
|
2791
|
+
...options,
|
|
2792
|
+
});
|
|
2793
|
+
}, ...(ngDevMode ? [{ debugName: "effect" }] : []));
|
|
2794
|
+
effect((onCleanup) => {
|
|
2795
|
+
const ssaoEffect = this.effect();
|
|
2796
|
+
if (!ssaoEffect)
|
|
2797
|
+
return;
|
|
2798
|
+
onCleanup(() => ssaoEffect.dispose());
|
|
2799
|
+
});
|
|
2800
|
+
}
|
|
2801
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSSAO, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2802
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpSSAO, isStandalone: true, selector: "ngtp-ssao", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2803
|
+
<ngt-primitive *args="[effect()]" [dispose]="null" />
|
|
2804
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2805
|
+
}
|
|
2806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSSAO, decorators: [{
|
|
2807
|
+
type: Component,
|
|
2808
|
+
args: [{
|
|
2809
|
+
selector: 'ngtp-ssao',
|
|
2810
|
+
template: `
|
|
2811
|
+
<ngt-primitive *args="[effect()]" [dispose]="null" />
|
|
2812
|
+
`,
|
|
2813
|
+
imports: [NgtArgs],
|
|
2814
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
2815
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2816
|
+
}]
|
|
2817
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
2818
|
+
|
|
2179
2819
|
/**
|
|
2180
2820
|
* Angular component that applies a shock wave distortion effect.
|
|
2181
2821
|
*
|
|
@@ -2203,15 +2843,15 @@ class NgtpShockWave {
|
|
|
2203
2843
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2204
2844
|
extend({ ShockWaveEffect });
|
|
2205
2845
|
}
|
|
2206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2207
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
2846
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpShockWave, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2847
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpShockWave, isStandalone: true, selector: "ngtp-shock-wave", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2208
2848
|
<ngt-shock-wave-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2209
2849
|
<ngtp-effect-blend-mode />
|
|
2210
2850
|
<ng-content />
|
|
2211
2851
|
</ngt-shock-wave-effect>
|
|
2212
2852
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2213
2853
|
}
|
|
2214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpShockWave, decorators: [{
|
|
2215
2855
|
type: Component,
|
|
2216
2856
|
args: [{
|
|
2217
2857
|
selector: 'ngtp-shock-wave',
|
|
@@ -2262,15 +2902,15 @@ class NgtpSMAA {
|
|
|
2262
2902
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2263
2903
|
extend({ SMAAEffect });
|
|
2264
2904
|
}
|
|
2265
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2266
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
2905
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSMAA, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2906
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpSMAA, isStandalone: true, selector: "ngtp-smaa", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2267
2907
|
<ngt-sMAA-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2268
2908
|
<ngtp-effect-blend-mode />
|
|
2269
2909
|
<ng-content />
|
|
2270
2910
|
</ngt-sMAA-effect>
|
|
2271
2911
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2272
2912
|
}
|
|
2273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
2913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpSMAA, decorators: [{
|
|
2274
2914
|
type: Component,
|
|
2275
2915
|
args: [{
|
|
2276
2916
|
selector: 'ngtp-smaa',
|
|
@@ -2287,6 +2927,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2287
2927
|
}]
|
|
2288
2928
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], effectRef: [{ type: i0.ViewChild, args: ['effect', { isSignal: true }] }] } });
|
|
2289
2929
|
|
|
2930
|
+
class NgtpTexture {
|
|
2931
|
+
constructor() {
|
|
2932
|
+
this.options = input({}, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
2933
|
+
this.textureSrc = pick(this.options, 'textureSrc');
|
|
2934
|
+
this.texture = pick(this.options, 'texture');
|
|
2935
|
+
this.opacity = pick(this.options, 'opacity');
|
|
2936
|
+
this.store = injectStore();
|
|
2937
|
+
this.loadedTexture = loaderResource(() => THREE.TextureLoader, () => this.textureSrc() || '', {
|
|
2938
|
+
onLoad: (texture) => {
|
|
2939
|
+
texture.colorSpace = THREE.SRGBColorSpace;
|
|
2940
|
+
texture.wrapS = texture.wrapT = THREE.RepeatWrapping;
|
|
2941
|
+
},
|
|
2942
|
+
});
|
|
2943
|
+
this.effect = computed(() => {
|
|
2944
|
+
const { textureSrc: _, texture, opacity: __, ...options } = this.options();
|
|
2945
|
+
const loaded = this.loadedTexture.value();
|
|
2946
|
+
const t = loaded || texture;
|
|
2947
|
+
if (!t)
|
|
2948
|
+
return null;
|
|
2949
|
+
return new TextureEffect({ ...options, texture: t });
|
|
2950
|
+
}, ...(ngDevMode ? [{ debugName: "effect" }] : []));
|
|
2951
|
+
effect(() => {
|
|
2952
|
+
const effect = this.effect();
|
|
2953
|
+
if (!effect)
|
|
2954
|
+
return;
|
|
2955
|
+
const opacity = this.opacity();
|
|
2956
|
+
if (opacity === undefined)
|
|
2957
|
+
return;
|
|
2958
|
+
const invalidate = this.store.invalidate();
|
|
2959
|
+
effect.blendMode.opacity.value = opacity;
|
|
2960
|
+
invalidate();
|
|
2961
|
+
});
|
|
2962
|
+
effect(() => {
|
|
2963
|
+
const effect = this.effect();
|
|
2964
|
+
if (!effect)
|
|
2965
|
+
return;
|
|
2966
|
+
const texture = this.texture();
|
|
2967
|
+
if (!texture)
|
|
2968
|
+
return;
|
|
2969
|
+
const invalidate = this.store.invalidate();
|
|
2970
|
+
effect.texture = texture;
|
|
2971
|
+
invalidate();
|
|
2972
|
+
});
|
|
2973
|
+
effect((onCleanup) => {
|
|
2974
|
+
const effect = this.effect();
|
|
2975
|
+
if (!effect)
|
|
2976
|
+
return;
|
|
2977
|
+
onCleanup(() => effect.dispose());
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2980
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpTexture, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2981
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: NgtpTexture, isStandalone: true, selector: "ngtp-texture", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2982
|
+
<ngt-primitive *args="[effect()]" [dispose]="null" />
|
|
2983
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2984
|
+
}
|
|
2985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpTexture, decorators: [{
|
|
2986
|
+
type: Component,
|
|
2987
|
+
args: [{
|
|
2988
|
+
selector: 'ngtp-texture',
|
|
2989
|
+
template: `
|
|
2990
|
+
<ngt-primitive *args="[effect()]" [dispose]="null" />
|
|
2991
|
+
`,
|
|
2992
|
+
imports: [NgtArgs],
|
|
2993
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
2994
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2995
|
+
}]
|
|
2996
|
+
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
2997
|
+
|
|
2290
2998
|
/**
|
|
2291
2999
|
* Angular component that applies a tilt-shift blur effect.
|
|
2292
3000
|
*
|
|
@@ -2317,15 +3025,15 @@ class NgtpTiltShift {
|
|
|
2317
3025
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2318
3026
|
extend({ TiltShiftEffect });
|
|
2319
3027
|
}
|
|
2320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2321
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
3028
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpTiltShift, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3029
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpTiltShift, isStandalone: true, selector: "ngtp-tilt-shift", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.ADD })], viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2322
3030
|
<ngt-tilt-shift-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2323
3031
|
<ngtp-effect-blend-mode />
|
|
2324
3032
|
<ng-content />
|
|
2325
3033
|
</ngt-tilt-shift-effect>
|
|
2326
3034
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2327
3035
|
}
|
|
2328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpTiltShift, decorators: [{
|
|
2329
3037
|
type: Component,
|
|
2330
3038
|
args: [{
|
|
2331
3039
|
selector: 'ngtp-tilt-shift',
|
|
@@ -2484,15 +3192,15 @@ class NgtpTiltShift2 {
|
|
|
2484
3192
|
this.hostEffect = inject(NgtpEffect, { host: true });
|
|
2485
3193
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2486
3194
|
}
|
|
2487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2488
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
3195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpTiltShift2, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3196
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpTiltShift2, isStandalone: true, selector: "ngtp-tilt-shift2", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.NORMAL })], viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2489
3197
|
<ngt-tilt-shift2-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2490
3198
|
<ngtp-effect-blend-mode />
|
|
2491
3199
|
<ng-content />
|
|
2492
3200
|
</ngt-tilt-shift2-effect>
|
|
2493
3201
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2494
3202
|
}
|
|
2495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpTiltShift2, decorators: [{
|
|
2496
3204
|
type: Component,
|
|
2497
3205
|
args: [{
|
|
2498
3206
|
selector: 'ngtp-tilt-shift2',
|
|
@@ -2539,15 +3247,15 @@ class NgtpToneMapping {
|
|
|
2539
3247
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2540
3248
|
extend({ ToneMappingEffect });
|
|
2541
3249
|
}
|
|
2542
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
3250
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpToneMapping, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3251
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpToneMapping, isStandalone: true, selector: "ngtp-tone-mapping", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2544
3252
|
<ngt-tone-mapping-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2545
3253
|
<ngtp-effect-blend-mode />
|
|
2546
3254
|
<ng-content />
|
|
2547
3255
|
</ngt-tone-mapping-effect>
|
|
2548
3256
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2549
3257
|
}
|
|
2550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpToneMapping, decorators: [{
|
|
2551
3259
|
type: Component,
|
|
2552
3260
|
args: [{
|
|
2553
3261
|
selector: 'ngtp-tone-mapping',
|
|
@@ -2590,15 +3298,15 @@ class NgtpVignette {
|
|
|
2590
3298
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2591
3299
|
extend({ VignetteEffect });
|
|
2592
3300
|
}
|
|
2593
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2594
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
3301
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpVignette, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3302
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpVignette, isStandalone: true, selector: "ngtp-vignette", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2595
3303
|
<ngt-vignette-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2596
3304
|
<ngtp-effect-blend-mode />
|
|
2597
3305
|
<ng-content />
|
|
2598
3306
|
</ngt-vignette-effect>
|
|
2599
3307
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2600
3308
|
}
|
|
2601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpVignette, decorators: [{
|
|
2602
3310
|
type: Component,
|
|
2603
3311
|
args: [{
|
|
2604
3312
|
selector: 'ngtp-vignette',
|
|
@@ -2686,15 +3394,15 @@ class NgtpWater {
|
|
|
2686
3394
|
this.effectRef = viewChild('effect', ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
2687
3395
|
extend({ WaterEffect });
|
|
2688
3396
|
}
|
|
2689
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
2690
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.
|
|
3397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpWater, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3398
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: NgtpWater, isStandalone: true, selector: "ngtp-water", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideDefaultEffectOptions({ blendFunction: BlendFunction.NORMAL })], viewQueries: [{ propertyName: "effectRef", first: true, predicate: ["effect"], descendants: true, isSignal: true }], hostDirectives: [{ directive: NgtpEffect, inputs: ["blendFunction", "blendFunction", "opacity", "opacity"] }], ngImport: i0, template: `
|
|
2691
3399
|
<ngt-water-effect #effect *args="[options()]" [camera]="hostEffect.camera()">
|
|
2692
3400
|
<ngtp-effect-blend-mode />
|
|
2693
3401
|
<ng-content />
|
|
2694
3402
|
</ngt-water-effect>
|
|
2695
3403
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgtArgs, selector: "ng-template[args]", inputs: ["args"] }, { kind: "component", type: NgtpEffectBlendMode, selector: "ngtp-effect-blend-mode" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2696
3404
|
}
|
|
2697
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: NgtpWater, decorators: [{
|
|
2698
3406
|
type: Component,
|
|
2699
3407
|
args: [{
|
|
2700
3408
|
selector: 'ngtp-water',
|
|
@@ -2716,5 +3424,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2716
3424
|
* Generated bundle index. Do not edit.
|
|
2717
3425
|
*/
|
|
2718
3426
|
|
|
2719
|
-
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 };
|
|
3427
|
+
export { ASCIIEffect, LensFlareEffect, NgtpASCII, NgtpAutofocus, NgtpBloom, NgtpBrightnessContrast, NgtpChromaticAberration, NgtpColorAverage, NgtpColorDepth, NgtpDepth, NgtpDepthOfField, NgtpDotScreen, NgtpEffect, NgtpEffectBlendMode, NgtpEffectComposer, NgtpFXAA, NgtpGlitch, NgtpGodRays, NgtpGrid, NgtpHueSaturation, NgtpLUT, NgtpLensFlare, NgtpNoise, NgtpOutline, NgtpPixelation, NgtpRamp, NgtpSMAA, NgtpSSAO, NgtpScanline, NgtpSelectiveBloom, NgtpSepia, NgtpShockWave, NgtpTexture, NgtpTiltShift, NgtpTiltShift2, NgtpToneMapping, NgtpVignette, NgtpWater, RampEffect, RampType, TiltShift2Effect, WaterEffect, injectDefaultEffectOptions, provideDefaultEffectOptions };
|
|
2720
3428
|
//# sourceMappingURL=angular-three-postprocessing.mjs.map
|