From 33ca81c0423c1d88516f4a7182f0a458827eff41 Mon Sep 17 00:00:00 2001 From: Brandon Leigh-Bennett Date: Mon, 4 Dec 2023 15:19:15 -0500 Subject: [PATCH] Fix incorrect variable name --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b1e0eb4..ba13d94 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ const myUniformValues = makeStructuredView(defs.uniforms.myUniforms); // create the correct sized buffer const uniformBuffer = device.createBuffer({ - size: myUniformBuffer.arrayBuffer.byteLength, + size: myUniformValues.arrayBuffer.byteLength, usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST, }); @@ -246,7 +246,7 @@ The reason it's this way is it's common to make large arrays of `f32`, `u32`, `vec2f`, `vec3f`, `vec4f` etc. We wouldn't want every element of an array to have its own typedarray view. -You can configure this per type by calling `setIntrinsicsToView`. +You can configure this per type by calling `setIntrinsicsToView`. The configuration is global. Given th example above ```js @@ -355,4 +355,3 @@ Super thanks to Brendan Duncan for [wgsl-reflect](https://github.com/brendan-dun ## License [MIT](LICENSE.md) -