Capítulo 795 de 859
Three.js exposes hundreds of named numeric/string constants on the THREE namespace (blending, texture formats, tone mapping, shadow types, animation modes, etc.). This chapter curates the ones you'll actually reach for; the full list (1000+ entries, many WebGPU/compressed-texture format edge cases) lives in the official docs' Global page.
FrontSide (default), BackSide, DoubleSide — which faces of a mesh get rendered.NoBlending, NormalBlending (default), AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending.NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping.NoColorSpace, SRGBColorSpace, LinearSRGBColorSpace.BasicShadowMap, PCFShadowMap (default), PCFSoftShadowMap, VSMShadowMap.RepeatWrapping, ClampToEdgeWrapping (default), MirroredRepeatWrapping.NearestFilter, LinearFilter (default for mag), plus the four *MipmapNearest/LinearFilter combinations for minification.Rendering & materials
| Constant group | Values |
|---|---|
| Side | FrontSide, BackSide, DoubleSide |
| Blending | NoBlending, NormalBlending, AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending |
| Blend equation | AddEquation, SubtractEquation, ReverseSubtractEquation, MinEquation, MaxEquation |
| Blend factor | ZeroFactor, OneFactor, SrcColorFactor, DstColorFactor, SrcAlphaFactor, DstAlphaFactor (+ OneMinus* variants) |
| Depth/Stencil func | NeverDepth…AlwaysDepth, NeverStencilFunc…AlwaysStencilFunc (standard comparison-function set) |
| Stencil op | KeepStencilOp, ZeroStencilOp, ReplaceStencilOp, IncrementStencilOp, DecrementStencilOp, InvertStencilOp (+ Wrap variants) |
| Combine (env map) | MultiplyOperation, MixOperation, AddOperation |
| Normal map space | TangentSpaceNormalMap, ObjectSpaceNormalMap |
| Draw mode | TrianglesDrawMode, TriangleStripDrawMode, TriangleFanDrawMode |
Textures
| Constant group | Values |
|---|---|
| Mapping | UVMapping, CubeReflectionMapping, CubeRefractionMapping, EquirectangularReflectionMapping, EquirectangularRefractionMapping, CubeUVReflectionMapping |
| Wrapping | RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping |
| Filter | NearestFilter, LinearFilter, NearestMipmapNearestFilter, NearestMipmapLinearFilter, LinearMipmapNearestFilter, LinearMipmapLinearFilter |
| Data type | UnsignedByteType, ByteType, ShortType, UnsignedShortType, IntType, UnsignedIntType, FloatType, HalfFloatType (+ packed UnsignedShort4444/5551Type, UnsignedInt101111/248/5999Type) |
| Pixel format | RGBAFormat, RedFormat, RGFormat, DepthFormat, DepthStencilFormat (+ Integer variants) |
| Compressed formats | Large family: RGB_S3TC_DXT1_Format, RGBA_ASTC_*_Format, RGB_ETC1/ETC2_Format, RGBA_BPTC_Format, RED_RGTC1_Format, etc. — pick per platform support, check renderer.capabilities. |
| Usage hints | StaticDrawUsage (default), DynamicDrawUsage, StreamDrawUsage (+ *ReadUsage, *CopyUsage) |
Rendering pipeline
| Constant group | Values |
|---|---|
| Tone mapping | NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, AgXToneMapping, NeutralToneMapping |
| Color space | NoColorSpace, SRGBColorSpace, LinearSRGBColorSpace |
| Shadow map | BasicShadowMap, PCFShadowMap, PCFSoftShadowMap, VSMShadowMap |
| Depth packing | BasicDepthPacking, RGBADepthPacking, RGBDepthPacking, RGDepthPacking |
| Coordinate system | WebGLCoordinateSystem, WebGPUCoordinateSystem |
Animation
| Constant group | Values |
|---|---|
| Loop mode | LoopOnce, LoopRepeat, LoopPingPong |
| Interpolation | InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolateBezier |
| Blend mode | NormalAnimationBlendMode, AdditiveAnimationBlendMode |
| Ending | ZeroCurvatureEnding, ZeroSlopeEnding, WrapAroundEnding |
THREE.AdditiveBlending etc., never the underlying number.renderer.capabilities / extension support before relying on ASTC/ETC2/PVRTC/S3TC/BPTC formats.THREE (e.g. THREE.AdditiveBlending), not nested per-category.FrontSide, NormalBlending, ClampToEdgeWrapping, LinearFilter, PCFShadowMap, StaticDrawUsage.ColorSpace/ToneMapping constants matter for correct HDR/color-managed rendering — mismatches are a common cause of washed-out or over-saturated scenes.