Skip to content

Commit e0b5cc7

Browse files
committed
🦕
1 parent b3e979e commit e0b5cc7

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

apps/typegpu-docs/src/examples/simulation/gravity/helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { OBJLoader } from '@loaders.gl/obj';
33
import type { TgpuRoot } from 'typegpu';
44
import * as d from 'typegpu/data';
55
import { sphereTextureNames } from './enums.ts';
6-
import { CelestialBody, renderVertexLayout, SkyBoxVertex } from './schemas.ts';
6+
import {
7+
type CelestialBody,
8+
renderVertexLayout,
9+
SkyBoxVertex,
10+
} from './schemas.ts';
711

812
function vert(
913
position: [number, number, number],

packages/typegpu/src/data/ptr.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { $internal } from '../shared/symbols.ts';
2-
import { Origin, OriginToPtrParams, originToPtrParams } from './snippet.ts';
2+
import {
3+
type Origin,
4+
type OriginToPtrParams,
5+
originToPtrParams,
6+
} from './snippet.ts';
37
import type { Access, AddressSpace, Ptr, StorableData } from './wgslTypes.ts';
48

59
export function ptrFn<T extends StorableData>(

packages/typegpu/src/tgsl/conversion.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
type I32,
1111
isMat,
1212
isVec,
13-
Ptr,
13+
type Ptr,
1414
type U32,
1515
type WgslStruct,
1616
} from '../data/wgslTypes.ts';
@@ -186,16 +186,15 @@ function findBestType(
186186
if (!bestResult) {
187187
return undefined;
188188
}
189-
const actions: ConversionResultAction[] = bestResult.details.map((
190-
detail,
191-
index,
192-
) => ({
193-
sourceIndex: index,
194-
action: detail.action,
195-
...(detail.action === 'cast' && {
196-
targetType: detail.targetType as U32 | F32 | I32 | F16,
189+
const actions: ConversionResultAction[] = bestResult.details.map(
190+
(detail, index) => ({
191+
sourceIndex: index,
192+
action: detail.action,
193+
...(detail.action === 'cast' && {
194+
targetType: detail.targetType as U32 | F32 | I32 | F16,
195+
}),
197196
}),
198-
}));
197+
);
199198

200199
return {
201200
targetType: bestResult.type,

packages/typegpu/tests/tgsl/argumentOrigin.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect } from 'vitest';
22
import * as d from '../../src/data/index.ts';
3-
import { it } from '../utils/extendedIt';
4-
import { asWgsl } from '../utils/parseResolved';
3+
import { it } from '../utils/extendedIt.ts';
4+
import { asWgsl } from '../utils/parseResolved.ts';
55

66
describe('function argument origin tracking', () => {
77
it('should allow mutation of primitive arguments', () => {

0 commit comments

Comments
 (0)