The ANGLE_instanced_arrays.vertexAttribDivisorANGLE() method of the WebGL API modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawArraysInstancedANGLE() and ext.drawElementsInstancedANGLE().
Note: When using WebGL2, this method is available as gl.vertexAttribDivisor() by default.
vertexAttribDivisorANGLE(index, divisor)indexA GLuint specifying the index of the generic vertex attributes.
divisorA GLuint specifying the number of instances that will pass between updates of the generic attribute.
None (undefined).
const ext = gl.getExtension("ANGLE_instanced_arrays");
ext.vertexAttribDivisorANGLE(0, 2);