Skip to content

Commit e1187c6

Browse files
authored
fix: Missing onCleanup, update gravity test (#1821)
1 parent 6e6b659 commit e1187c6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

apps/typegpu-docs/src/examples/tests/copy-error/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,11 @@ if (!table) {
101101
table.innerText = (input.getUint32(12) === result.getUint32(12))
102102
? 'The bug DOES NOT occur on this device.'
103103
: 'The bug DOES occur on this device.';
104+
105+
// #region Example controls and cleanup
106+
107+
export function onCleanup() {
108+
device?.destroy();
109+
}
110+
111+
// #endregion

packages/typegpu/tests/examples/individual/gravity.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ describe('gravity example', () => {
149149
}
150150
151151
struct Camera_2 {
152-
position: vec3f,
152+
position: vec4f,
153+
targetPos: vec4f,
153154
view: mat4x4f,
154155
projection: mat4x4f,
155156
}
@@ -201,7 +202,8 @@ describe('gravity example', () => {
201202
}
202203
203204
struct Camera_5 {
204-
position: vec3f,
205+
position: vec4f,
206+
targetPos: vec4f,
205207
view: mat4x4f,
206208
projection: mat4x4f,
207209
}

0 commit comments

Comments
 (0)