File size: 448 Bytes
d13e19f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2a49d93
 
d13e19f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// wgpu-state.js

export function createState(config) {
    return {
        device: null,
        pipeline: null,
        vertexBuffer: null,
        indexBuffer: null,
        uniformBuffer: null,
        texture: null,
        sampler: null,
        bindGroup: null,
        uniformValues: new Float32Array(config.uniformBufferSize / 4),
        matrix: null,
        numGlyphs: 0,
        width: 0,
        height: 0,
        time: 0,
    };
}