Skip to content

Commit 129f28e

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/wgpu-matrix-3.4.0
2 parents 7b7ac64 + 0de5398 commit 129f28e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

apps/typegpu-docs/src/components/stackblitz/openInStackBlitz.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const openInStackBlitz = (example: Example) => {
3333
template: 'node',
3434
title: example.metadata.title,
3535
files: {
36-
'index.ts': index.slice('// @ts-ignore\n'.length),
36+
'index.ts': index.replaceAll(/\/\/\s*@ts-ignore\s*\n/g, ''),
3737
...tsFiles,
3838
'index.html': `\
3939
<!DOCTYPE html>

apps/typegpu-docs/src/components/stackblitz/stackBlitzIndex.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// @ts-ignore
2-
import * as example from './src/index.ts';
3-
41
const body = document.querySelector('body') as HTMLBodyElement;
52
body.style.display = 'flex';
63
body.style.flexDirection = 'column';
@@ -67,6 +64,10 @@ if (body.firstChild) {
6764
body.appendChild(controlsPanel);
6865
}
6966

67+
// Execute example
68+
// @ts-ignore
69+
const example = import('./src/index.ts');
70+
7071
// Create example controls
7172
for (const controls of Object.values(example)) {
7273
if (typeof controls === 'function') {

apps/typegpu-docs/src/content/examples/simulation/fluid-with-atomics/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const fragment = tgpu['~unstable']
328328
}
329329

330330
const res = 1 / (1 + std.exp(-(normalized - 0.2) * 10));
331-
return d.vec4f(0, 0, std.max(0.5, res), res);
331+
return d.vec4f(0, 0, res, res);
332332
});
333333

334334
const vertexInstanceLayout = tgpu.vertexLayout(

0 commit comments

Comments
 (0)