Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove any from samples #307

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sample/animometer/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
const renderPassDescriptor = {
colorAttachments: [
{
view: undefined as any, // Assigned later
view: undefined as GPUTextureView, // Assigned later
clearValue: { r: 0.0, g: 0.0, b: 0.0, a: 1.0 },
loadOp: 'clear' as const,
storeOp: 'store' as const,
Expand Down
18 changes: 9 additions & 9 deletions src/sample/bitonicSort/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
): BindGroupsObjectsAndLayout => {
const layoutEntries: GPUBindGroupLayoutEntry[] = [];
for (let i = 0; i < bindings.length; i++) {
const layoutEntry: any = {};
layoutEntry.binding = bindings[i];
layoutEntry.visibility = visibilities[i % visibilities.length];
layoutEntry[resourceTypes[i]] = resourceLayouts[i];
layoutEntries.push(layoutEntry);
layoutEntries.push({
binding: bindings[i],
visibility: visibilities[i % visibilities.length],
[resourceTypes[i]]: resourceLayouts[i],
});
}

const bindGroupLayout = device.createBindGroupLayout({
Expand All @@ -58,10 +58,10 @@
for (let i = 0; i < resources.length; i++) {
const groupEntries: GPUBindGroupEntry[] = [];
for (let j = 0; j < resources[0].length; j++) {
const groupEntry: any = {};
groupEntry.binding = j;
groupEntry.resource = resources[i][j];
groupEntries.push(groupEntry);
groupEntries.push({
binding: j,
resource: resources[i][j],
});
}
const newBindGroup = device.createBindGroup({
label: `${label}.bindGroup${i}`,
Expand Down Expand Up @@ -137,7 +137,7 @@

export abstract class Base2DRendererClass {
abstract switchBindGroup(name: string): void;
abstract startRun(commandEncoder: GPUCommandEncoder, ...args: any[]): void;

Check warning on line 140 in src/sample/bitonicSort/utils.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
renderPassDescriptor: GPURenderPassDescriptor;
pipeline: GPURenderPipeline;
bindGroupMap: Record<string, GPUBindGroup>;
Expand Down
2 changes: 1 addition & 1 deletion src/sample/computeBoids/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const init: SampleInit = async ({ canvas, pageState, gui }) => {
const renderPassDescriptor = {
colorAttachments: [
{
view: undefined as any, // Assigned later
view: undefined as GPUTextureView, // Assigned later
clearValue: { r: 0.0, g: 0.0, b: 0.0, a: 1.0 },
loadOp: 'clear' as const,
storeOp: 'store' as const,
Expand Down
Loading