{"name":"webgl-debug","version":"1.0.1","description":"WebGL Debug Utils","main":"index.js","license":"MIT","author":{"name":"Marcin Ignac","email":"marcin.ignac@gmail.com","url":"https://github.com/vorg"},"dependencies":{},"devDependencies":{},"scripts":{"test":"node test.js"},"keywords":["webgl,","debugging"],"repository":{"type":"git","url":"git://github.com/vorg/webgl-debug.git"},"homepage":"https://github.com/vorg/webgl-debug","bugs":{"url":"https://github.com/vorg/webgl-debug/issues"},"gitHead":"2f2b6316565c569a30ce567344acc51daa48ea68","_id":"webgl-debug@1.0.1","_shasum":"10514d7591a24a8041bce77cd5dea901bb31265d","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"vorg","email":"marcin.ignac@gmail.com"},"maintainers":[{"name":"vorg","email":"marcin.ignac@gmail.com"}],"dist":{"shasum":"10514d7591a24a8041bce77cd5dea901bb31265d","tarball":"http://registry-npm.ywwl.com/webgl-debug/download/webgl-debug-1.0.1.tgz","integrity":"sha512-oTEolGP10T0SB7XCUvEq89rPi0xI69bW1RVJRqoueZJNWeyN5xLj5euzPk//GqZjTqFV7LxW3CqHUGHxSE2OvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2yqtG1XHYeg8234cl3jF512uNriKH4U3uh9CWuLGeaAiAYizIoFgYwZiX8lnqOn0oCxEeSQotam7AfA4OyEByK3w=="}],"size":8419,"noattachment":false,"key":"/webgl-debug/-/webgl-debug-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/webgl-debug-1.0.1.tgz_1463742599642_0.4239425393752754"},"directories":{},"readme":"# webgl-debug\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nWebGL Debug Utils. This is a node port of [WebGLDeveloperTools](https://github.com/KhronosGroup/WebGLDeveloperTools) by Khronos Group.\n\n## Usage\n\n[![NPM](https://nodei.co/npm/webgl-debug.png)](https://www.npmjs.com/package/webgl-debug)\n\n`var WebGLDebugUtil = require('webgl-debug');`\n\n## Examples\n\nGet error code string representation.\n\n```javascript\nvar WebGLDebugUtil = require('webgl-debug');\n\nvar str = WebGLDebugUtil.glEnumToString(gl.getError());\n```\n\nCreate debug context that will throw error on invalid WebGL operation.\n\n```javascript\nvar WebGLDebugUtil = require('webgl-debug');\n\nfunction throwOnGLError(err, funcName, args) {\n   throw WebGLDebugUtils.glEnumToString(err) \n   + \"was caused by call to \" \n   + funcName;\n};\n\n\ngl = WebGLDebugUtils.makeDebugContext(gl, throwOnGLError);\n```\n\n## Tutorial\n\n[WebGL Wiki: Debugging](https://www.khronos.org/webgl/wiki/Debugging)\n\n## API\n\n#### init()\nInitializes this module. Safe to call more than once.\n\n#### mightBeEnum(value)\nReturns true or false if value matches any WebGL enum\n\n#### glEnumToString(value)\nGets an string version of an WebGL enum.\n\n#### glFunctionArgToString(functionName, numArgs, argumentIndx, value)\nConverts the argument of a WebGL function to a string\n\n#### glFunctionArgsToString(functionName, args)\nConverts the arguments of a WebGL function to a string.\n\n#### makeDebugContext(ctx, onErrorCb, onFuncCallCb)\nreturns a wrapped context that calls gl.getError after every command and calls a function if the result is not NO_ERROR\n\n#### makeLostContextSimulatingCanvas(canvas)\nreturns a wrapped canvas element that will simulate lost context\n\n#### resetToInitialState(gl)\nResets a context to the initial state\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/vorg/webgl-debug/blob/master/LICENSE.md) for details.\n","publish_time":1463742602920,"_cnpm_publish_time":1463742602920,"dist-tags":{"latest":"2.0.1"}}