deepEqual
deepEqual(
a,b):boolean
Performs a deep comparison of two TypeGPU data schemas.
Parameters
Section titled “Parameters”The first data schema to compare.
The second data schema to compare.
Returns
Section titled “Returns”boolean
true if the schemas are deeply equal, false otherwise.
Example
Section titled “Example”import { vec3f, struct, deepEqual } from 'typegpu/data';
const schema1 = struct({ a: vec3f });const schema2 = struct({ a: vec3f });const schema3 = struct({ b: vec3f });
console.log(deepEqual(schema1, schema2)); // trueconsole.log(deepEqual(schema1, schema3)); // false