{"_id":"webgl-debug","_rev":"9-d75162c13e0cf626b4291ac7e3807693","name":"webgl-debug","time":{"modified":"2022-06-28T23:22:19.069Z","created":"2016-05-20T11:02:35.367Z","1.0.0":"2016-05-20T11:02:35.367Z","1.0.1":"2016-05-20T11:10:02.920Z","1.0.2":"2016-05-20T11:15:28.040Z","2.0.0":"2018-01-05T11:50:07.339Z","2.0.1":"2018-01-23T09:33:43.474Z"},"maintainers":[{"name":"vorg","email":"marcin.ignac@gmail.com"}],"dist-tags":{"latest":"2.0.1"},"description":"WebGL Debug Utils","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","versions":{"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","tarball":"https://registry.npmjs.org/webgl-debug/-/webgl-debug-1.0.1.tgz","integrity":"sha512-oTEolGP10T0SB7XCUvEq89rPi0xI69bW1RVJRqoueZJNWeyN5xLj5euzPk//GqZjTqFV7LxW3CqHUGHxSE2OvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH2yqtG1XHYeg8234cl3jF512uNriKH4U3uh9CWuLGeaAiAYizIoFgYwZiX8lnqOn0oCxEeSQotam7AfA4OyEByK3w=="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/webgl-debug-1.0.1.tgz_1463742599642_0.4239425393752754"}},"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","tarball":"https://registry.npmjs.org/webgl-debug/-/webgl-debug-1.0.2.tgz","integrity":"sha512-Ws3WzxgHuWFb5VRTq+f+Tc3+534yT6sUZQ7eWKptkWEHKTWcI5FmGR3dh77kbjxFGv2SMpmn47eC4IKO2ilQsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCECGNGSQxWkF8aD9QYJM6jKjggyLa+uFhGP+Aksu9oggIhANB1fC3qHivkZptfLgSIpcgA/CCMu7EIi93jnXGG8vLE"}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/webgl-debug-1.0.2.tgz_1463742925503_0.19234075350686908"}},"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":{"integrity":"sha512-xcl1FOv8JwWfVyahJRh2zU1AYcM/3jWhW2tRVhRbWhkQkF51/gIb7nJPHQRohym3m6fr9USJElDS7xhEm5aa0g==","shasum":"8c5e1d416b58f226230b244321db9d00f0fdef01","tarball":"https://registry.npmjs.org/webgl-debug/-/webgl-debug-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDX69uBPE3pPxH9Ue1tU3RXOvHAC1bRc8AjfrSd1wTuXAIgb98ZSTyuYfYQ9DfglTMtMI4CEuwcG/hP/GpYV8VE2Y0="}]},"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"}},"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":{"integrity":"sha512-G7BOpMmqdc31X1nb3eqwVxw/v1MNV/ulgw7Bs+7+a/sn+fC0d0OiMkerA55C6+3BL2vULyJ3kZLPcEL5GbXzhw==","shasum":"dc11bea3d947764bce061fdb5a23109c13787c95","tarball":"https://registry.npmjs.org/webgl-debug/-/webgl-debug-2.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGiFDC504A1xkKG6+iEmHKalIeypa3jT3F6a+PMJvmsWAiEAojj6QaxNNOhCQkXO4hDMXSiFM+S5jwN8+xiTrrA9/vE="}]},"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"}}},"homepage":"https://github.com/vorg/webgl-debug","keywords":["webgl,","debugging"],"repository":{"type":"git","url":"git://github.com/vorg/webgl-debug.git"},"author":{"name":"Marcin Ignac","email":"marcin.ignac@gmail.com","url":"https://github.com/vorg"},"bugs":{"url":"https://github.com/vorg/webgl-debug/issues"},"license":"MIT","readmeFilename":"README.md"}