@adobe/data - v0.10.30
    Preparing search index...

    Function wgslStructFields

    • Generates WGSL struct field declarations from a JSON Schema object type.

      Maps each property to the appropriate WGSL type (f32, vec3f, mat4x4f, etc.) using the same schema that drives host-side TypedBuffer layout — so the host struct and the WGSL struct are guaranteed to agree on field order and types.

      Usage:

      const source = `
      struct MyUniforms {
      ${wgslStructFields(MyUniforms.schema)}
      }`;

      Parameters

      Returns string