Skip to content

Commit fe96a8c

Browse files
committed
chore(postprocessing): pass linting
1 parent 4a83b1f commit fe96a8c

File tree

5 files changed

+39
-45
lines changed

5 files changed

+39
-45
lines changed

libs/cannon/.eslintrc.json

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"rules": {
99
"@angular-eslint/directive-class-suffix": "off",
1010
"@angular-eslint/component-class-suffix": "off",
11-
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }]
11+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }]
1212
}
1313
},
1414
{
@@ -20,17 +20,20 @@
2020
"files": ["*.json"],
2121
"parser": "jsonc-eslint-parser",
2222
"rules": {
23-
"@nx/dependency-checks": ["error", {
24-
"ignoredDependencies": [
25-
"angular-three",
26-
"ngxtension",
27-
"@analogjs/vite-plugin-angular",
28-
"@nx/vite",
29-
"vite",
30-
"@angular/common",
31-
"tslib"
32-
]
33-
}]
23+
"@nx/dependency-checks": [
24+
"error",
25+
{
26+
"ignoredDependencies": [
27+
"@analogjs/vite-plugin-angular",
28+
"@angular/common",
29+
"@nx/vite",
30+
"angular-three",
31+
"ngxtension",
32+
"tslib",
33+
"vite"
34+
]
35+
}
36+
]
3437
}
3538
}
3639
]

libs/postprocessing/.eslintrc.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,9 @@
66
"files": ["*.ts"],
77
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
88
"rules": {
9-
"@angular-eslint/directive-selector": [
10-
"error",
11-
{
12-
"type": "attribute",
13-
"prefix": "lib",
14-
"style": "camelCase"
15-
}
16-
],
17-
"@angular-eslint/component-selector": [
18-
"error",
19-
{
20-
"type": "element",
21-
"prefix": "lib",
22-
"style": "kebab-case"
23-
}
24-
]
9+
"@angular-eslint/directive-class-suffix": "off",
10+
"@angular-eslint/component-class-suffix": "off",
11+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }]
2512
}
2613
},
2714
{
@@ -33,7 +20,20 @@
3320
"files": ["*.json"],
3421
"parser": "jsonc-eslint-parser",
3522
"rules": {
36-
"@nx/dependency-checks": "error"
23+
"@nx/dependency-checks": [
24+
"error",
25+
{
26+
"ignoredDependencies": [
27+
"@analogjs/vite-plugin-angular",
28+
"@angular/common",
29+
"@nx/vite",
30+
"angular-three",
31+
"ngxtension",
32+
"tslib",
33+
"vite"
34+
]
35+
}
36+
]
3737
}
3838
}
3939
]

libs/postprocessing/src/lib/effects/depth-of-field.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,14 @@ import {
77
inject,
88
input,
99
} from '@angular/core';
10-
import { NgtArgs, NgtVector3 } from 'angular-three';
10+
import { NgtAnyRecord, NgtArgs, NgtVector3 } from 'angular-three';
1111
import { injectAutoEffect } from 'ngxtension/auto-effect';
1212
import { DepthOfFieldEffect, MaskFunction } from 'postprocessing';
1313
import { DepthPackingStrategies, Texture, Vector3 } from 'three';
1414
import { NgtpEffectComposer } from '../effect-composer';
1515

1616
type DOFOptions = NonNullable<ConstructorParameters<typeof DepthOfFieldEffect>[1]> &
17-
Partial<{
18-
target: NgtVector3;
19-
depthTexture: {
20-
texture: Texture;
21-
// TODO: narrow to DepthPackingStrategies
22-
packing: number;
23-
};
24-
}>;
17+
Partial<{ target: NgtVector3; depthTexture: { texture: Texture; packing: DepthPackingStrategies } }>;
2518

2619
@Component({
2720
selector: 'ngtp-depth-of-field',
@@ -53,7 +46,7 @@ export class NgtpDepthOfField {
5346
effect.setDepthTexture(options.depthTexture.texture, options.depthTexture.packing as DepthPackingStrategies);
5447
}
5548
// Temporary fix that restores DOF 6.21.3 behavior, everything since then lets shapes leak through the blur
56-
const maskPass = (effect as any).maskPass;
49+
const maskPass = (effect as NgtAnyRecord)['maskPass'];
5750
maskPass.maskFunction = MaskFunction.MULTIPLY_RGB_SET_ALPHA;
5851

5952
return effect;

libs/postprocessing/src/lib/effects/grid.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
computed,
77
input,
88
} from '@angular/core';
9-
import { NgtArgs, injectStore, pick } from 'angular-three';
9+
import { NgtArgs, pick } from 'angular-three';
1010
import { injectAutoEffect } from 'ngxtension/auto-effect';
1111
import { GridEffect } from 'postprocessing';
1212

@@ -25,8 +25,6 @@ type GridOptions = NonNullable<ConstructorParameters<typeof GridEffect>[0]> &
2525
})
2626
export class NgtpGrid {
2727
private autoEffect = injectAutoEffect();
28-
private store = injectStore();
29-
private invalidate = this.store.select('invalidate');
3028

3129
options = input({} as GridOptions);
3230
private size = pick(this.options, 'size');

libs/postprocessing/src/lib/effects/lens-flare.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { easing } from 'maath';
1515
import { injectAutoEffect } from 'ngxtension/auto-effect';
1616
import { mergeInputs } from 'ngxtension/inject-inputs';
1717
import { BlendFunction, Effect } from 'postprocessing';
18-
import { Color, Mesh, Texture, Uniform, Vector2, Vector3 } from 'three';
18+
import { Color, Mesh, Texture, Uniform, Vector2, Vector3, WebGLRenderTarget, WebGLRenderer } from 'three';
1919
import { NgtpEffectComposer } from '../effect-composer';
2020

2121
const LensFlareShader = {
@@ -114,7 +114,7 @@ export class LensFlareEffect extends Effect {
114114
});
115115
}
116116

117-
override update(_renderer: any, _inputBuffer: any, deltaTime: number) {
117+
override update(_renderer: WebGLRenderer, _inputBuffer: WebGLRenderTarget, deltaTime: number) {
118118
const iTime = this.uniforms.get('iTime');
119119
if (iTime) {
120120
iTime.value += deltaTime;
@@ -138,7 +138,7 @@ const defaultOptions: LensFlareOptions = {
138138
selector: 'ngtp-lens-flare',
139139
standalone: true,
140140
template: `
141-
<ngt-primitive *args="[effect()]" [dispose]="null" />
141+
<ngt-primitive *args="[effect()]" [parameters]="{ dispose: null }" />
142142
`,
143143
imports: [NgtArgs],
144144
schemas: [CUSTOM_ELEMENTS_SCHEMA],

0 commit comments

Comments
 (0)