Skip to content

Commit

Permalink
remove any from samples
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Oct 26, 2023
1 parent 20a26d2 commit 19c5ebf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
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 @@ export const createBindGroupDescriptor = (
): 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 @@ export const createBindGroupDescriptor = (
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
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

0 comments on commit 19c5ebf

Please sign in to comment.