{"name":"webgl-debug","version":"2.0.0","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":"1d671bf230462b31b2da8291614e3a6e99f1ebda","_id":"webgl-debug@2.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"vorg","email":"marcin.ignac@gmail.com"},"dist":{"integrity":"sha512-xcl1FOv8JwWfVyahJRh2zU1AYcM/3jWhW2tRVhRbWhkQkF51/gIb7nJPHQRohym3m6fr9USJElDS7xhEm5aa0g==","shasum":"8c5e1d416b58f226230b244321db9d00f0fdef01","tarball":"http://registry-npm.ywwl.com/webgl-debug/download/webgl-debug-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDX69uBPE3pPxH9Ue1tU3RXOvHAC1bRc8AjfrSd1wTuXAIgb98ZSTyuYfYQ9DfglTMtMI4CEuwcG/hP/GpYV8VE2Y0="}],"size":10742,"noattachment":false,"key":"/webgl-debug/-/webgl-debug-2.0.0.tgz"},"maintainers":[{"name":"vorg","email":"marcin.ignac@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webgl-debug-2.0.0.tgz_1515153006409_0.7352836444042623"},"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":1515153007339,"_cnpm_publish_time":1515153007339,"dist-tags":{"latest":"2.0.1"}}