isUnstruct
isUnstruct(
schema):schema is Unstruct<Record<string, BaseData>>
Checks whether passed in value is a unstruct schema, as opposed to, e.g., a struct schema.
Struct schemas can be used to describe uniform and storage buffers, whereas unstruct schemas cannot. Unstructs are useful for defining vertex buffers instead.
Parameters
Section titled “Parameters”schema
Section titled “schema”unknown
Returns
Section titled “Returns”schema is Unstruct<Record<string, BaseData>>
Example
Section titled “Example”isUnstruct(d.struct({ a: d.u32 })) // falseisUnstruct(d.unstruct({ a: d.u32 })) // trueisUnstruct(d.vec3f) // false