p3nGu1nZz commited on
Commit
2c0108d
1 Parent(s): 86b32d8

move over butter

Browse files
Files changed (2) hide show
  1. index.html +1 -7
  2. utility.js +5 -1
index.html CHANGED
@@ -11,7 +11,7 @@
11
  <canvas></canvas>
12
  <script type="module">
13
  import { mat4 } from 'https://webgpufundamentals.org/3rdparty/wgpu-matrix.module.js';
14
- import * as utils from './utility.js';
15
  const glyphWidth = 32;
16
  const glyphHeight = 40;
17
  const glyphsAcrossTexture = 16;
@@ -47,12 +47,6 @@
47
  format: presentationFormat,
48
  });
49
 
50
- // Fetch shader code from external file
51
- async function fetchShaderCode(url) {
52
- const response = await fetch(url);
53
- return await response.text();
54
- }
55
-
56
  const shaderCode = await fetchShaderCode('shaders.wgsl');
57
  const module = device.createShaderModule({
58
  label: 'textured quad shaders',
 
11
  <canvas></canvas>
12
  <script type="module">
13
  import { mat4 } from 'https://webgpufundamentals.org/3rdparty/wgpu-matrix.module.js';
14
+ import { fetchShaderCode } from './utility.js';
15
  const glyphWidth = 32;
16
  const glyphHeight = 40;
17
  const glyphsAcrossTexture = 16;
 
47
  format: presentationFormat,
48
  });
49
 
 
 
 
 
 
 
50
  const shaderCode = await fetchShaderCode('shaders.wgsl');
51
  const module = device.createShaderModule({
52
  label: 'textured quad shaders',
utility.js CHANGED
@@ -1,2 +1,6 @@
1
  // utility.js
2
- // Empty for now, will populate with functions later
 
 
 
 
 
1
  // utility.js
2
+
3
+ export async function fetchShaderCode(url) {
4
+ const response = await fetch(url);
5
+ return await response.text();
6
+ }