Skip to content

Commit 54af90b

Browse files
committed
Review changes
1 parent d6b8995 commit 54af90b

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

  • apps/typegpu-docs/src/examples/algorithms/probability

apps/typegpu-docs/src/examples/algorithms/probability/index.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,19 @@ export const controls = {
120120
},
121121
'Test Resolution': import.meta.env.DEV && {
122122
onButtonClick() {
123-
c.distributions
124-
.flatMap((dist) =>
125-
c.generators.map((gen) =>
126-
tgpu.resolve({
127-
externals: {
128-
p: executor.pipelineCacheGet(
129-
getPRNG(dist).prng,
130-
getGenerator(gen),
131-
),
132-
},
133-
})
134-
)
135-
)
136-
.map((r) => root.device.createShaderModule({ code: r }));
123+
for (const dist of c.distributions) {
124+
for (const gen of c.generators) {
125+
const code = tgpu.resolve({
126+
externals: {
127+
p: executor.pipelineCacheGet(
128+
getPRNG(dist).prng,
129+
getGenerator(gen),
130+
),
131+
},
132+
});
133+
root.device.createShaderModule({ code });
134+
}
135+
}
137136
},
138137
},
139138
};

0 commit comments

Comments
 (0)