function generateAttributesFromContext(context) {
  /**
   * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}
   */
  const attributes = {};

  // Define attributes with their callback for each property used in the vertex shader
  for (const propName in context.properties) {
    const property = context.properties[propName];
    const callback = (feature) => {
      const value = feature.get(property.name);
      if (property.type === ColorType) {
        return packColor([...asArray(value || '#eee')]);
      }
      if (typeof value === 'string') {
        return getStringNumberEquivalent(value);
      }
      if (typeof value === 'boolean') {
        return value ? 1 : 0;
      }
      return value;
    };

    attributes[`prop_${property.name}`] = {
      size: getGlslSizeFromType(property.type),
      callback,
    };
  }
  return attributes;
}
Generates a set of attributes from properties collected in a compilation context,
to be fed to a WebGLHelper instance
@param {import("../../expr/gpu.js").CompilationContext} context Compilation context
@return {import('./VectorStyleRenderer.js').AttributeDefinitions} Attributes