Skip to content

Commit b7bc953

Browse files
committed
Cleanup
1 parent ff570bd commit b7bc953

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

apps/typegpu-docs/src/components/translator/lib/constants.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ fn fs_main() -> @location(0) vec4<f32> {
2323

2424
export const DEFAULT_TGSL = `import tgpu from 'typegpu';
2525
import * as d from 'typegpu/data';
26-
import * as std from 'typegpu/std';
2726
2827
const Particle = d.struct({
2928
position: d.vec3f,
@@ -42,14 +41,9 @@ const layout = tgpu.bindGroupLayout({
4241
4342
export const updateParicle = tgpu.fn([Particle, d.vec3f, d.f32], Particle)(
4443
(particle, gravity, deltaTime) => {
45-
const newVelocity = std.mul(
46-
particle.velocity,
47-
std.mul(gravity, deltaTime),
48-
);
49-
const newPosition = std.add(
50-
particle.position,
51-
std.mul(newVelocity, deltaTime),
52-
);
44+
const newVelocity = particle.velocity.mul(gravity).mul(deltaTime);
45+
const newPosition = particle.position.add(newVelocity.mul(deltaTime));
46+
5347
return Particle({
5448
position: newPosition,
5549
velocity: newVelocity,

apps/typegpu-docs/src/components/translator/lib/rolldown.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ export async function bundle(
4646
{
4747
name: 'virtual-fs',
4848
resolveId(source, importer) {
49-
if (source.includes('typegpu') || importer?.includes('typegpu')) {
50-
debug = true;
51-
}
52-
5349
const id = source[0] === '.'
5450
? join(importer || '/', '..', source)
5551
: source;

0 commit comments

Comments
 (0)