webgl-debug

WebJar for webgl-debug

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

webgl-debug
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

webgl-debug
WebJar for webgl-debug
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/vorg/webgl-debug

Скачать webgl-debug

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/webgl-debug/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>webgl-debug</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/webgl-debug/
implementation 'org.webjars.npm:webgl-debug:1.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/webgl-debug/
implementation ("org.webjars.npm:webgl-debug:1.0.2")
'org.webjars.npm:webgl-debug:jar:1.0.2'
<dependency org="org.webjars.npm" name="webgl-debug" rev="1.0.2">
  <artifact name="webgl-debug" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='webgl-debug', version='1.0.2')
)
libraryDependencies += "org.webjars.npm" % "webgl-debug" % "1.0.2"
[org.webjars.npm/webgl-debug "1.0.2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

webgl-debug

stable

WebGL Debug Utils. This is a node port of WebGLDeveloperTools by Khronos Group.

Usage

NPM

var WebGLDebugUtil = require('webgl-debug');

Examples

Get error code string representation.

var WebGLDebugUtil = require('webgl-debug');

var str = WebGLDebugUtil.glEnumToString(gl.getError());

Create debug context that will throw error on invalid WebGL operation.

var WebGLDebugUtil = require('webgl-debug');

function throwOnGLError(err, funcName, args) {
   throw WebGLDebugUtils.glEnumToString(err) 
   + "was caused by call to " 
   + funcName;
};


gl = WebGLDebugUtils.makeDebugContext(gl, throwOnGLError);

Tutorial

WebGL Wiki: Debugging

API

init()

Initializes this module. Safe to call more than once.

mightBeEnum(value)

Returns true or false if value matches any WebGL enum

glEnumToString(value)

Gets an string version of an WebGL enum.

glFunctionArgToString(functionName, numArgs, argumentIndx, value)

Converts the argument of a WebGL function to a string

glFunctionArgsToString(functionName, args)

Converts the arguments of a WebGL function to a string.

makeDebugContext(ctx, onErrorCb, onFuncCallCb)

returns a wrapped context that calls gl.getError after every command and calls a function if the result is not NO_ERROR

makeLostContextSimulatingCanvas(canvas)

returns a wrapped canvas element that will simulate lost context

resetToInitialState(gl)

Resets a context to the initial state

License

MIT, see LICENSE.md for details.

Версии библиотеки

Версия
1.0.2