Skip to content

Commit d2c2ee4

Browse files
committed
move root to index.ts
1 parent 2ce6e6c commit d2c2ee4

File tree

2 files changed

+3
-4
lines changed
  • apps/typegpu-docs/src/examples/simple/rotating-triangle-tiles

2 files changed

+3
-4
lines changed

apps/typegpu-docs/src/examples/simple/rotating-triangle-tiles/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { colors } from './geometry.ts';
22
import { createBezier } from './bezier.ts';
3-
import { root } from './root.ts';
43
import {
54
backgroundFragment,
65
backgroundVertex,
@@ -33,13 +32,16 @@ import {
3332
shiftedColorsAccess,
3433
stepRotationAccess,
3534
} from './buffers.ts';
35+
import tgpu from 'typegpu';
3636

3737
const presentationFormat = navigator.gpu.getPreferredCanvasFormat();
3838
const canvas = document.querySelector('canvas') as HTMLCanvasElement;
3939
const context = canvas.getContext('webgpu') as GPUCanvasContext;
4040

4141
let ease = createBezier(getCubicBezierControlPoints());
4242

43+
export const root = await tgpu.init();
44+
4345
const {
4446
aspectRatioBuffer,
4547
animationProgressUniform,

apps/typegpu-docs/src/examples/simple/rotating-triangle-tiles/root.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)