{"_id":"webgl-debug","_rev":"392441","name":"webgl-debug","description":"WebGL Debug Utils","dist-tags":{"latest":"2.0.1"},"maintainers":[{"name":"vorg","email":"marcin.ignac@gmail.com"}],"time":{"modified":"2021-08-04T03:58:55.000Z","created":"2016-05-20T11:10:02.920Z","2.0.1":"2018-01-23T09:33:43.474Z","2.0.0":"2018-01-05T11:50:07.339Z","1.0.2":"2016-05-20T11:15:28.040Z","1.0.1":"2016-05-20T11:10:02.920Z"},"users":{},"author":{"name":"Marcin Ignac","email":"marcin.ignac@gmail.com","url":"https://github.com/vorg"},"repository":{"type":"git","url":"git://github.com/vorg/webgl-debug.git"},"versions":{"2.0.1":{"name":"webgl-debug","version":"2.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":"a0b141f64a9150d02f2e1714aad40e798fc5b124","_id":"webgl-debug@2.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"vorg","email":"marcin.ignac@gmail.com"},"dist":{"shasum":"dc11bea3d947764bce061fdb5a23109c13787c95","size":10751,"noattachment":false,"key":"/webgl-debug/-/webgl-debug-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/webgl-debug/download/webgl-debug-2.0.1.tgz"},"maintainers":[{"name":"vorg","email":"marcin.ignac@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webgl-debug-2.0.1.tgz_1516700023407_0.49806428235024214"},"directories":{},"publish_time":1516700023474,"_hasShrinkwrap":false,"_cnpm_publish_time":1516700023474},"2.0.0":{"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":{"shasum":"8c5e1d416b58f226230b244321db9d00f0fdef01","size":10742,"noattachment":false,"key":"/webgl-debug/-/webgl-debug-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/webgl-debug/download/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":{},"publish_time":1515153007339,"_hasShrinkwrap":false,"_cnpm_publish_time":1515153007339},"1.0.2":{"name":"webgl-debug","version":"1.0.2","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":"2ff8430e9425a00091928a377de0ba78b8804d22","_id":"webgl-debug@1.0.2","_shasum":"93bac5aed181343a136ad34f249920d3b9ccc69a","_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":"93bac5aed181343a136ad34f249920d3b9ccc69a","size":8436,"noattachment":false,"key":"/webgl-debug/-/webgl-debug-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/webgl-debug/download/webgl-debug-1.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/webgl-debug-1.0.2.tgz_1463742925503_0.19234075350686908"},"directories":{},"publish_time":1463742928040,"_cnpm_publish_time":1463742928040,"_hasShrinkwrap":false},"1.0.1":{"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","size":8419,"noattachment":false,"key":"/webgl-debug/-/webgl-debug-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/webgl-debug/download/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":{},"publish_time":1463742602920,"_cnpm_publish_time":1463742602920,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":"https://github.com/vorg/webgl-debug","bugs":{"url":"https://github.com/vorg/webgl-debug/issues"},"license":"MIT"}