Skip to content

Commit

Permalink
pairing vec2 type handlers
Browse files Browse the repository at this point in the history
vec2s containing int32, uint32, and f32 were using one another's designated Views
  • Loading branch information
danielgamage authored and greggman committed Nov 16, 2023
1 parent 55d24f4 commit 485ce91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/buffer-views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ const b: Record<string, TypeDef> = {
const typeInfo: Record<string, TypeDef> = {
...b,

'vec2<i32>': b.vec2f,
'vec2<u32>': b.vec2i,
'vec2<f32>': b.vec2u,
'vec2<i32>': b.vec2i,
'vec2<u32>': b.vec2u,
'vec2<f32>': b.vec2f,
'vec2<f16>': b.vec2h,
'vec3<i32>': b.vec3i,
'vec3<u32>': b.vec3u,
Expand Down Expand Up @@ -478,4 +478,4 @@ export function setTypedValues(typeDef: TypeDefinition, data: any, arrayBuffer:
*/
export function setStructuredValues(varDef: VariableDefinition, data: any, arrayBuffer: ArrayBuffer, offset = 0) {
setTypedValues(varDef.typeDefinition, data, arrayBuffer, offset);
}
}

0 comments on commit 485ce91

Please sign in to comment.