How to use the regl/dist/regl.unchecked function in regl

To help you get started, we’ve selected a few regl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vcync / modV / src / modv / webgl / index.js View on Github external
function setupWebGl(modV) {
  const canvas = document.createElement('canvas')
  const gl = canvas.getContext('webgl2', {
    premultipliedAlpha: false,
    antialias: true
  })

  const regl = createREGL({
    gl,
    attributes: {
      antialias: true
    }
  })

  const env = { gl, canvas, regl }

  Object.defineProperty(env, 'defaultShader', {
    get: () => defaultShader
  })

  modV.webgl = env

  env.resize = (widthIn, heightIn, dpr = 1) => {
    const width = widthIn * dpr

regl

regl is a fast functional WebGL framework.

MIT
Latest version published 4 years ago

Package Health Score

64 / 100
Full package analysis

Popular regl functions