Skip to main content

API

Set gl config

import { gl, createGL } from 'glre'
import { useGL } from 'glre/react'

gl({ count: 6 }) // or

useGL({ count: 6 }) // or

createGL({ count: 6 })

Configuration

GLConfigdefaultdescription
el: Elementcanvas element
fs: stringmorefragment shader
vs: stringmorevertex shader
frag: stringmorefragment shader
vert: stringmorevertex shader
fragment: stringmorefragment shader
vertex: stringmorevertex shader
size: [number, number][1, 1]init window resolution values
mouse: [number, number][0, 0]init mouse position values
count: number6vertex count number