Core Constants — Soft8Soft
Description: List of core constants used in Verge3D.

# Core Constants

These constants define generic rendering and controls features.

## Revision Number

`v3d.REVISION`

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.

## Mouse Buttons

`v3d.MOUSE.LEFT v3d.MOUSE.MIDDLE v3d.MOUSE.RIGHT v3d.MOUSE.ROTATE v3d.MOUSE.DOLLY v3d.MOUSE.PAN`

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

`v3d.TOUCH.ROTATE v3d.TOUCH.PAN v3d.TOUCH.DOLLY_PAN v3d.TOUCH.DOLLY_ROTATE`

## IBL Environment Modes

`v3d.IBLEnvironmentPMREM v3d.IBLEnvironmentProbe v3d.IBLEnvironmentNone`

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

## Buffer Attribute Usage Constants

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

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);`

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

## Source

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