Spaces:
Running
Running
move over butter
Browse files- config.js +2 -1
- index.html +2 -3
config.js
CHANGED
@@ -6,5 +6,6 @@ export const config = {
|
|
6 |
glyphHeight: 40,
|
7 |
maxGlyphs: 100,
|
8 |
vertsPerGlyph: 6,
|
9 |
-
floatsPerVertex: 8
|
|
|
10 |
};
|
|
|
6 |
glyphHeight: 40,
|
7 |
maxGlyphs: 100,
|
8 |
vertsPerGlyph: 6,
|
9 |
+
floatsPerVertex: 8,
|
10 |
+
uniformBufferSize: 64
|
11 |
};
|
index.html
CHANGED
@@ -170,13 +170,12 @@
|
|
170 |
magFilter: 'linear'
|
171 |
});
|
172 |
|
173 |
-
const uniformBufferSize = 16 * 4; //f32
|
174 |
const uniformBuffer = device.createBuffer({
|
175 |
label: 'uniforms for quad',
|
176 |
-
size: uniformBufferSize,
|
177 |
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
|
178 |
});
|
179 |
-
const uniformValues = new Float32Array(uniformBufferSize / 4);
|
180 |
const matrix = uniformValues.subarray(0, 16);
|
181 |
|
182 |
const bindGroup = device.createBindGroup({
|
|
|
170 |
magFilter: 'linear'
|
171 |
});
|
172 |
|
|
|
173 |
const uniformBuffer = device.createBuffer({
|
174 |
label: 'uniforms for quad',
|
175 |
+
size: config.uniformBufferSize,
|
176 |
usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
|
177 |
});
|
178 |
+
const uniformValues = new Float32Array(config.uniformBufferSize / 4);
|
179 |
const matrix = uniformValues.subarray(0, 16);
|
180 |
|
181 |
const bindGroup = device.createBindGroup({
|