Clean up code and enable strict TS

This commit is contained in:
Andras Schmelczer 2026-05-04 10:16:28 +01:00
commit 0735dd764f
21 changed files with 124 additions and 119 deletions

View file

@ -3,7 +3,7 @@ import { vec2 } from 'gl-matrix';
import { getWorkgroupCounts } from '../../utils/graphics/get-workgroup-counts';
import { smartCompile } from '../../utils/graphics/smart-compile';
import { CommonState } from '../common-state/common-state';
import agentSchme from './agent-generation/agent-schema.wgsl?raw';
import agentSchema from './agent-generation/agent-schema.wgsl?raw';
import { AgentSettings } from './agent-settings';
import shader from './agent.wgsl?raw';
@ -32,7 +32,7 @@ export class AgentPipeline {
bindGroupLayouts: [commonState.bindGroupLayout, this.bindGroupLayout],
}),
compute: {
module: smartCompile(device, CommonState.shaderCode, agentSchme, shader),
module: smartCompile(device, CommonState.shaderCode, agentSchema, shader),
entryPoint: 'main',
},
});

View file

@ -188,7 +188,7 @@ export class BrushPipeline {
result.push(position);
}
result.push(last(points));
result.push(last(points)!);
return result;
}

View file

@ -11,7 +11,6 @@ export class DiffusionPipeline {
private readonly pipeline: GPURenderPipeline;
private readonly uniforms: GPUBuffer;
private readonly vertexBuffer: GPUBuffer;
private readonly noise: GPUTextureView;
private bindGroup?: GPUBindGroup;
private previousTrailMapIn?: GPUTextureView;