Spaces:
Running
Running
rename filenames
Browse files- index.js +3 -2
- wgpu-devices.js → wgpu-device.js +0 -0
- wgpu-shader.js +6 -0
- wgpu-shaders.js +0 -1
- wgpu-utility.js +0 -5
index.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import { mat4 } from 'https://webgpufundamentals.org/3rdparty/wgpu-matrix.module.js';
|
2 |
-
import { initializeWebGPU } from './wgpu-
|
3 |
import { createState } from './wgpu-state.js';
|
4 |
-
import {
|
5 |
import { createPipeline } from './wgpu-pipeline.js';
|
|
|
6 |
import { generateGlyphVerticesForText } from './wgpu-text.js';
|
7 |
import { config } from './wgpu-config.js';
|
8 |
import { CANVAS, CTX, COLORS, RENDER_PASS_DESCRIPTOR } from './wgpu-constants.js';
|
|
|
1 |
import { mat4 } from 'https://webgpufundamentals.org/3rdparty/wgpu-matrix.module.js';
|
2 |
+
import { initializeWebGPU } from './wgpu-device.js';
|
3 |
import { createState } from './wgpu-state.js';
|
4 |
+
import { generateGlyphTextureAtlas, createTextureFromSource } from './wgpu-utility.js';
|
5 |
import { createPipeline } from './wgpu-pipeline.js';
|
6 |
+
import { fetchShaderCode } from './wgpu-shader.js';
|
7 |
import { generateGlyphVerticesForText } from './wgpu-text.js';
|
8 |
import { config } from './wgpu-config.js';
|
9 |
import { CANVAS, CTX, COLORS, RENDER_PASS_DESCRIPTOR } from './wgpu-constants.js';
|
wgpu-devices.js → wgpu-device.js
RENAMED
File without changes
|
wgpu-shader.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// wgpu-shaders.js
|
2 |
+
|
3 |
+
export async function fetchShaderCode(url) {
|
4 |
+
const response = await fetch(url);
|
5 |
+
return await response.text();
|
6 |
+
}
|
wgpu-shaders.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
// wgpu-shaders.js
|
|
|
|
wgpu-utility.js
CHANGED
@@ -1,10 +1,5 @@
|
|
1 |
// utility.js
|
2 |
|
3 |
-
export async function fetchShaderCode(url) {
|
4 |
-
const response = await fetch(url);
|
5 |
-
return await response.text();
|
6 |
-
}
|
7 |
-
|
8 |
export function generateGlyphTextureAtlas(canvas, ctx, config) {
|
9 |
canvas.width = config.canvas.width;
|
10 |
canvas.height = config.canvas.height;
|
|
|
1 |
// utility.js
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
export function generateGlyphTextureAtlas(canvas, ctx, config) {
|
4 |
canvas.width = config.canvas.width;
|
5 |
canvas.height = config.canvas.height;
|