max-mapper / requirebin

write browser JavaScript programs using modules from NPM
requirebin.com
391 stars 80 forks source link

Debug mode #121

Open realazthat opened 7 years ago

realazthat commented 7 years ago

requirebin seems to use browserify without --debug, it would be nice if requirebin turned debug mode on.

Example using regl (working requirebin):


const quad = require('glsl-quad');
const regl = require('regl')();

let frag = `
    THIS IS AN OBVIOUSLY BAD SHADER.

  IT SHOULD THROW AN ERROR.

  BUT REGL ONLY THROWS AN ERROR IN DEBUG MODE.

  WHICH MEANS WE WILL ONLY SEE A WARNING. (CHECK
  THE CONSOLE).

             CAN WE GET REQUIREBIN
              TO USE DEBUG MODE?
`;

let draw = regl({
  vert: quad.shader.vert,
  frag: frag,
  attributes: {
    a_position: quad.verts,
    a_uv: quad.uvs
  },
  elements: quad.indices,
  uniforms: {
    u_clip_y: 1
  }
});

draw();