Core Constants

These constants define generic rendering and controls features.

Revision Number


The current Verge3D revision number. See this page for more info on how to interpret this value.

Color Spaces

v3d.NoColorSpace v3d.SRGBColorSpace v3d.LinearSRGBColorSpace

NoColorSpace defines no specific color space.

SRGBColorSpace (“sRGB”) refers to the color space defined by the Rec. 709 primaries, D65 white point, and nonlinear sRGB transfer functions. sRGB is the default color space in CSS, and is often found in color palettes and color pickers. Colors expressed in hexadecimal or CSS notation are typically in the sRGB color space.

LinearSRGBColorSpace (“Linear-sRGB”) refers to the sRGB color space (above) with linear transfer functions. Linear-sRGB is the working color space in Verge3D, used throughout most of the rendering process. RGB components found in Verge3D materials and shaders are in the Linear-sRGB color space.

For further background and usage, see Color management.

Mouse Buttons


The constants LEFT and ROTATE have the same underlying value. The constants MIDDLE and DOLLY have the same underlying value. The constants RIGHT and PAN have the same underlying value.

Touch Actions


IBL Environment Modes

v3d.IBLEnvironmentPMREM v3d.IBLEnvironmentProbeCubemap v3d.IBLEnvironmentProbe v3d.IBLEnvironmentNone

Type of image-based lighting: PMREM, Light Probe + Cubemap, Light Probe only, or none.

Buffer Attribute Usage Constants

The usage constants can be used to provide a hint to the API regarding how the geometry buffer attribute will be used in order to optimize performance.

Code Example

const geometry = new v3d.BufferGeometry(); const positionAttribute = new v3d.BufferAttribute(array, 3 , false); positionAttribute.setUsage(v3d.DynamicDrawUsage); geometry.setAttribute('position', positionAttribute);


materials / buffergeometry / drawrange

Geometry Usage

v3d.StaticDrawUsage v3d.DynamicDrawUsage v3d.StreamDrawUsage v3d.StaticReadUsage v3d.DynamicReadUsage v3d.StreamReadUsage v3d.StaticCopyUsage v3d.DynamicCopyUsage v3d.StreamCopyUsage

For more detailed information on each of these constants see this OpenGL documentation.


For more info on how to obtain the source code of this module see this page.