plasma-arc / wgpu-state.js
p3nGu1nZz's picture
store time in state`
2a49d93
raw
history blame
448 Bytes
// 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,
};
}