Skip to content

Commit 7cc706b

Browse files
Chau TranChau Tran
Chau Tran
authored and
Chau Tran
committed
feat(postprocessing): migrate all simple effects
1 parent f0818e8 commit 7cc706b

File tree

12 files changed

+224
-0
lines changed

12 files changed

+224
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { BrightnessContrastEffect } from 'postprocessing';
5+
6+
extend({ BrightnessContrastEffect });
7+
8+
@Component({
9+
selector: 'ngtp-brightness-contrast',
10+
standalone: true,
11+
template: `
12+
<ngt-brightness-contrast-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-brightness-contrast-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpBrightnessContrast extends NgtpEffect<BrightnessContrastEffect> {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { ColorDepthEffect } from 'postprocessing';
5+
6+
extend({ ColorDepthEffect });
7+
8+
@Component({
9+
selector: 'ngtp-color-depth',
10+
standalone: true,
11+
template: `
12+
<ngt-color-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-color-depth-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpColorDepth extends NgtpEffect<ColorDepthEffect> {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { DepthEffect } from 'postprocessing';
5+
6+
extend({ DepthEffect });
7+
8+
@Component({
9+
selector: 'ngtp-depth',
10+
standalone: true,
11+
template: `
12+
<ngt-depth-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-depth-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpDepth extends NgtpEffect<DepthEffect> {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { HueSaturationEffect } from 'postprocessing';
5+
6+
extend({ HueSaturationEffect });
7+
8+
@Component({
9+
selector: 'ngtp-hue-saturation',
10+
standalone: true,
11+
template: `
12+
<ngt-hue-saturation-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-hue-saturation-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpHueSaturation extends NgtpEffect<HueSaturationEffect> {}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
export * from './bloom/bloom';
2+
export * from './brightness-contrast/brightness-contrast';
3+
export * from './color-depth/color-depth';
4+
export * from './depth/depth';
25
export * from './dot-screen/dot-screen';
6+
export * from './hue-saturation/hue-saturation';
7+
export * from './noise/noise';
38
export * from './scanline/scanline';
9+
export * from './sepia/sepia';
10+
export * from './shock-wave/shock-wave';
11+
export * from './smaa/smaa';
12+
export * from './tilt-shift/tilt-shift';
13+
export * from './tone-mapping/tone-mapping';
14+
export * from './vignette/vignette';
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { BlendFunction, NoiseEffect } from 'postprocessing';
5+
6+
extend({ NoiseEffect });
7+
8+
@Component({
9+
selector: 'ngtp-noise',
10+
standalone: true,
11+
template: `
12+
<ngt-noise-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-noise-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpNoise extends NgtpEffect<NoiseEffect> {
20+
override defaultBlendFunction = BlendFunction.COLOR_DODGE;
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { SepiaEffect } from 'postprocessing';
5+
6+
extend({ SepiaEffect });
7+
8+
@Component({
9+
selector: 'ngtp-sepia',
10+
standalone: true,
11+
template: `
12+
<ngt-sepia-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-sepia-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpSepia extends NgtpEffect<SepiaEffect> {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { ShockWaveEffect } from 'postprocessing';
5+
6+
extend({ ShockWaveEffect });
7+
8+
@Component({
9+
selector: 'ngtp-noise',
10+
standalone: true,
11+
template: `
12+
<ngt-shock-wave-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-shock-wave-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpShockWave extends NgtpEffect<ShockWaveEffect> {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { SMAAEffect } from 'postprocessing';
5+
6+
extend({ SMAAEffect });
7+
8+
@Component({
9+
selector: 'ngtp-SMAA',
10+
standalone: true,
11+
template: `
12+
<ngt-SMAA-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-SMAA-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpSMAA extends NgtpEffect<SMAAEffect> {}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { BlendFunction, TiltShiftEffect } from 'postprocessing';
5+
6+
extend({ TiltShiftEffect });
7+
8+
@Component({
9+
selector: 'ngtp-tilt-shift',
10+
standalone: true,
11+
template: `
12+
<ngt-tilt-shift-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-tilt-shift-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpTiltShift extends NgtpEffect<TiltShiftEffect> {
20+
override defaultBlendFunction = BlendFunction.ADD;
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { ToneMappingEffect } from 'postprocessing';
5+
6+
extend({ ToneMappingEffect });
7+
8+
@Component({
9+
selector: 'ngtp-tone-mapping',
10+
standalone: true,
11+
template: `
12+
<ngt-tone-mapping-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-tone-mapping-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpToneMapping extends NgtpEffect<ToneMappingEffect> {}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
2+
import { NgtArgs, extend } from 'angular-three';
3+
import { NgtpEffect } from 'angular-three-postprocessing';
4+
import { VignetteEffect } from 'postprocessing';
5+
6+
extend({ VignetteEffect });
7+
8+
@Component({
9+
selector: 'ngtp-vignette',
10+
standalone: true,
11+
template: `
12+
<ngt-vignette-effect ngtCompound *args="args()" [camera]="camera()" [ref]="effectRef">
13+
<ng-content />
14+
</ngt-vignette-effect>
15+
`,
16+
imports: [NgtArgs],
17+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
18+
})
19+
export class NgtpVignette extends NgtpEffect<VignetteEffect> {}

0 commit comments

Comments
 (0)