instancingAttributeInfo.d.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * Interface for attribute information associated with buffer instantiation
  3. */
  4. export interface InstancingAttributeInfo {
  5. /**
  6. * Name of the GLSL attribute
  7. * if attribute index is not specified, this is used to retrieve the index from the effect
  8. */
  9. attributeName: string;
  10. /**
  11. * Index/offset of the attribute in the vertex shader
  12. * if not specified, this will be computes from the name.
  13. */
  14. index?: number;
  15. /**
  16. * size of the attribute, 1, 2, 3 or 4
  17. */
  18. attributeSize: number;
  19. /**
  20. * Offset of the data in the Vertex Buffer acting as the instancing buffer
  21. */
  22. offset: number;
  23. /**
  24. * Modifies the rate at which generic vertex attributes advance when rendering multiple instances
  25. * default to 1
  26. */
  27. divisor?: number;
  28. /**
  29. * type of the attribute, gl.BYTE, gl.UNSIGNED_BYTE, gl.SHORT, gl.UNSIGNED_SHORT, gl.FIXED, gl.FLOAT.
  30. * default is FLOAT
  31. */
  32. attributeType?: number;
  33. /**
  34. * normalization of fixed-point data. behavior unclear, use FALSE, default is FALSE
  35. */
  36. normalized?: boolean;
  37. }