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
GLConfig | default | description |
---|
el: Element | | canvas element |
fs: string | more | fragment shader |
vs: string | more | vertex shader |
frag: string | more | fragment shader |
vert: string | more | vertex shader |
fragment: string | more | fragment shader |
vertex: string | more | vertex shader |
size: [number, number] | [1, 1] | init window resolution values |
mouse: [number, number] | [0, 0] | init mouse position values |
count: number | 6 | vertex count number |