Skip to main content

Hooks API

// initialize gl
useGL(config: GLConfig): GL

// Schedule an update
useFrame(() => {})

// Start an update loop
useFrame(() => true)

// set vertex
useVertex(vertex: Record<string, number[]>): GL


// set uniform
useUniform(uniform: Record<string, number | number[]>): GL

// set texture
useTexture(texture: Record<string, string>): GL

// set attribute
useAttribute(attribute: Record<string, number[]>): GL