Namespace constants

xeokit Constants


The full enum vocabulary the SDK uses across modules — texture wrapping, mip filters, primitive types, encoding spaces, media types, projection modes, navigation modes, key codes, and more.


Constants live in one place so loaders, exporters, the renderer, and viewer wire-format all agree on the same integer codes. The GL ↔ xeokit mapping is handled inside the WebGL renderer; the external integer values exposed here are stable across SDK versions and form part of the wire format for XGF / DataModel payloads.


  • Texture wrappingRepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping.
  • Texture filterNearestFilter, LinearFilter, and the *MipMap* variants.
  • Texture format / encodingRGBAFormat, RGBA_S3TC_DXT*_Format, sRGBEncoding, LinearEncoding.
  • Primitive typesTrianglesPrimitive, LinesPrimitive, PointsPrimitive, SolidPrimitive, SurfacePrimitive.
  • Media typesPNGMediaType, JPEGMediaType, KTX2MediaType, etc.
  • Projection / navigationPerspectiveProjectionType, OrthoProjectionType, OrbitNavigationMode, etc.
  • Key codes + layoutsKEY_A..KEY_Z, KEY_NUM_*, QWERTYLayout, AZERTYLayout.

  • Single source of truth — every SDK module reads constants from here; loaders / exporters / the renderer never disagree on a numeric code.
  • Stable across versions — values are pinned and form part of the wire format. Reordering or renumbering breaks compatibility with persisted XGF / DataModel payloads.
  • GL-mapped at the boundary — host code never passes raw GLenums; pass these constants and the renderer converts.
  • Layout-aware key codesQWERTYLayout / AZERTYLayout ship with the viewController defaults, plus the underlying KEY_* codes for custom maps.

Installation

npm install @xeokit/sdk

Usage

import {
ClampToEdgeWrapping,
TrianglesPrimitive,
sRGBEncoding,
LinearFilter
} from "@xeokit/sdk/base/constants";

Variables

AlphaFormat
AZERTYLayout
ByteType
CentimetersUnit
ClampToEdgeWrapping
CustomProjectionType
DepthFormat
DepthStencilFormat
DetailedRender
DynamicDraw
FeetUnit
FirstPersonNavigationMode
FloatType
FrustumProjectionType
GaussianSplatsPrimitive
GIFMediaType
HalfFloatType
InchesUnit
IntType
JPEGMediaType
LinearEncoding
LinearFilter
LinearMipmapLinearFilter
LinearMipMapLinearFilter
LinearMipmapNearestFilter
LinearMipMapNearestFilter
LinesPrimitive
LuminanceAlphaFormat
LuminanceFormat
MetersUnit
MillimetersUnit
MirroredRepeatWrapping
NavigationRender
NearestFilter
NearestMipmapLinearFilter
NearestMipMapLinearFilter
NearestMipmapNearestFilter
NearestMipMapNearestFilter
OrbitNavigationMode
OrthoProjectionType
PerspectiveProjectionType
PlanViewNavigationMode
PNGMediaType
PointsPrimitive
QWERTYLayout
RealisticRender
RedFormat
RedIntegerFormat
RepeatWrapping
RGB_ETC1_Format
RGB_ETC2_Format
RGB_PVRTC_2BPPV1_Format
RGB_PVRTC_4BPPV1_Format
RGB_S3TC_DXT1_Format
RGBA_ASTC_10x10_Format
RGBA_ASTC_10x5_Format
RGBA_ASTC_10x6_Format
RGBA_ASTC_10x8_Format
RGBA_ASTC_12x10_Format
RGBA_ASTC_12x12_Format
RGBA_ASTC_4x4_Format
RGBA_ASTC_5x4_Format
RGBA_ASTC_5x5_Format
RGBA_ASTC_6x5_Format
RGBA_ASTC_6x6_Format
RGBA_ASTC_8x5_Format
RGBA_ASTC_8x6_Format
RGBA_ASTC_8x8_Format
RGBA_BPTC_Format
RGBA_ETC2_EAC_Format
RGBA_PVRTC_2BPPV1_Format
RGBA_PVRTC_4BPPV1_Format
RGBA_S3TC_DXT1_Format
RGBA_S3TC_DXT3_Format
RGBA_S3TC_DXT5_Format
RGBAFormat
RGBAIntegerFormat
RGBFormat
RGFormat
RGIntegerFormat
ShortType
SolidPrimitive
sRGBEncoding
StaticDraw
SurfacePrimitive
TrianglesPrimitive
UnsignedByteType
UnsignedInt248Type
UnsignedIntType
UnsignedShort4444Type
UnsignedShort5551Type
UnsignedShortType
YardsUnit