HTML5 Canvas 2D Library
 

taccgl™ Library Options

The following options can be used to customize taccgl™. Options (except taccgl_debug) currently need to be set before the first call to taccgl™. In future it may however be required for some options to be set before the script tag including the library.

Options are in fact javaScript variables set to a selected value.

var taccgl_debug = false If enabled taccgl™ is running in debug mode and displaying debug output and error messages. If disabled, canvas 3D is silently disabled upon errors. This option does only work in the uncompressed version of the library and there it is disabled default. In the compressed version debug code has been deleted. This option needs to be enabled before loading the library.
var taccgl_errcheck = true If enabled taccgl™ performs detailed WebGL™ error checking when setting up animations. This option does only work in the uncompressed version of the library and there it is enabled by default. In the compressed version debug code has been deleted.
var taccgl_looperrcheck = false If enabled taccgl™ performs detailed WebGL™ error checking while animations are running. This has a high performance impact. This option does only work in the uncompressed version of the library and there it is disabled by default. In the compressed version debug code has been deleted. In the compressed version and When disabled taccgl™ checks for errors once per frame.
var taccgl_debugButtons = true Embeds links for debugging into the HTML page, e.g. to show the texture canvas.
var taccgl_showShader = true Shows the shader source code. Useful when developing shaders.
var taccgl_texCanWidth = 1200;
var taccgl_texCanHeight= 1424;
Defines the size of the Texture Canvas. Only HTML elements fitting on the Texture Canvas can be painted and can appear in animations. The size of the texture canvas is relevant for performance and memory consumption in some browsers. Especially in Chrome a large texture canvas increases the time needed for starting an animation.
var taccgl_vertexMem = 500000 Memory initially allocated for each of the vertex buffers. Buffers are meanwhile automatically enlarged when needed, so there actually is no reason any more to use this option.
var taccgl_epwarning Defines the text of the epilepsy warning.
var taccgl_immediateStop = 5 Defines a minimal frame rate. If the frame rate drops below, taccgl™ deactivates itself. This avoids that very slow animations can interfere with the normal operation of a page.
var taccgl_TM = true Can be set to false in order to disable the TM in the standard shader. If disabled, the value of the TM is ignored and the shader is slightly faster.
var taccgl_shadowFactor Controls darkness of the shadows. A factor of 0 does not show any shadows (although it still internally calculates the shadows). A factor of 1 draws shaded surfaces using ambient lighting only. A factor of 0.8 (which is the default) still uses 20% of diffuse lighting for the shaded surfaces.
var taccgl_parallax = true may be true or false, default is true. If enabled adjusting the eye position is done using uniform variables (otherwise it is compiled into the shader) and so becomes drastically faster at the expense of a slight general performance penalty. For pages using a fixed eye position disabeling this option might lead to a small performance gain.
var taccgl_qmix = true may be true or false, default is true. If enabled shaders use more efficient but less general code to mix both textures. This works fine if at most one texture is blended in, which is often the case. If you have problems with blending disable this option.
var taccgl_3d = true Can be set to false to disable 3D mode. This is useful to test pages in 2d mode.
var taccgl_2d = true Can be set to false to disable 2D mode. This is useful for testing.

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:Identifier Usage
Previous Page: Info Boxes