constants.d.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. export const REVISION: string;
  2. // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.button
  3. export enum MOUSE {
  4. LEFT,
  5. MIDDLE,
  6. RIGHT,
  7. ROTATE,
  8. DOLLY,
  9. PAN,
  10. }
  11. export enum TOUCH {
  12. ROTATE,
  13. PAN,
  14. DOLLY_PAN,
  15. DOLLY_ROTATE,
  16. }
  17. // GL STATE CONSTANTS
  18. export enum CullFace {}
  19. export const CullFaceNone: CullFace;
  20. export const CullFaceBack: CullFace;
  21. export const CullFaceFront: CullFace;
  22. export const CullFaceFrontBack: CullFace;
  23. export enum FrontFaceDirection {}
  24. export const FrontFaceDirectionCW: FrontFaceDirection;
  25. export const FrontFaceDirectionCCW: FrontFaceDirection;
  26. // Shadowing Type
  27. export enum ShadowMapType {}
  28. export const BasicShadowMap: ShadowMapType;
  29. export const PCFShadowMap: ShadowMapType;
  30. export const PCFSoftShadowMap: ShadowMapType;
  31. export const VSMShadowMap: ShadowMapType;
  32. // MATERIAL CONSTANTS
  33. // side
  34. export enum Side {}
  35. export const FrontSide: Side;
  36. export const BackSide: Side;
  37. export const DoubleSide: Side;
  38. // shading
  39. export enum Shading {}
  40. export const FlatShading: Shading;
  41. export const SmoothShading: Shading;
  42. // blending modes
  43. export enum Blending {}
  44. export const NoBlending: Blending;
  45. export const NormalBlending: Blending;
  46. export const AdditiveBlending: Blending;
  47. export const SubtractiveBlending: Blending;
  48. export const MultiplyBlending: Blending;
  49. export const CustomBlending: Blending;
  50. // custom blending equations
  51. // (numbers start from 100 not to clash with other
  52. // mappings to OpenGL constants defined in Texture.js)
  53. export enum BlendingEquation {}
  54. export const AddEquation: BlendingEquation;
  55. export const SubtractEquation: BlendingEquation;
  56. export const ReverseSubtractEquation: BlendingEquation;
  57. export const MinEquation: BlendingEquation;
  58. export const MaxEquation: BlendingEquation;
  59. // custom blending destination factors
  60. export enum BlendingDstFactor {}
  61. export const ZeroFactor: BlendingDstFactor;
  62. export const OneFactor: BlendingDstFactor;
  63. export const SrcColorFactor: BlendingDstFactor;
  64. export const OneMinusSrcColorFactor: BlendingDstFactor;
  65. export const SrcAlphaFactor: BlendingDstFactor;
  66. export const OneMinusSrcAlphaFactor: BlendingDstFactor;
  67. export const DstAlphaFactor: BlendingDstFactor;
  68. export const OneMinusDstAlphaFactor: BlendingDstFactor;
  69. export const DstColorFactor: BlendingDstFactor;
  70. export const OneMinusDstColorFactor: BlendingDstFactor;
  71. // custom blending src factors
  72. export enum BlendingSrcFactor {}
  73. export const SrcAlphaSaturateFactor: BlendingSrcFactor;
  74. // depth modes
  75. export enum DepthModes {}
  76. export const NeverDepth: DepthModes;
  77. export const AlwaysDepth: DepthModes;
  78. export const LessDepth: DepthModes;
  79. export const LessEqualDepth: DepthModes;
  80. export const EqualDepth: DepthModes;
  81. export const GreaterEqualDepth: DepthModes;
  82. export const GreaterDepth: DepthModes;
  83. export const NotEqualDepth: DepthModes;
  84. // TEXTURE CONSTANTS
  85. // Operations
  86. export enum Combine {}
  87. export const MultiplyOperation: Combine;
  88. export const MixOperation: Combine;
  89. export const AddOperation: Combine;
  90. // Tone Mapping modes
  91. export enum ToneMapping {}
  92. export const NoToneMapping: ToneMapping;
  93. export const LinearToneMapping: ToneMapping;
  94. export const ReinhardToneMapping: ToneMapping;
  95. export const Uncharted2ToneMapping: ToneMapping;
  96. export const CineonToneMapping: ToneMapping;
  97. export const ACESFilmicToneMapping: ToneMapping;
  98. // Mapping modes
  99. export enum Mapping {}
  100. export const UVMapping: Mapping;
  101. export const CubeReflectionMapping: Mapping;
  102. export const CubeRefractionMapping: Mapping;
  103. export const EquirectangularReflectionMapping: Mapping;
  104. export const EquirectangularRefractionMapping: Mapping;
  105. export const SphericalReflectionMapping: Mapping;
  106. export const CubeUVReflectionMapping: Mapping;
  107. export const CubeUVRefractionMapping: Mapping;
  108. // Wrapping modes
  109. export enum Wrapping {}
  110. export const RepeatWrapping: Wrapping;
  111. export const ClampToEdgeWrapping: Wrapping;
  112. export const MirroredRepeatWrapping: Wrapping;
  113. // Filters
  114. export enum TextureFilter {}
  115. export const NearestFilter: TextureFilter;
  116. export const NearestMipmapNearestFilter: TextureFilter;
  117. export const NearestMipMapNearestFilter: TextureFilter;
  118. export const NearestMipmapLinearFilter: TextureFilter;
  119. export const NearestMipMapLinearFilter: TextureFilter;
  120. export const LinearFilter: TextureFilter;
  121. export const LinearMipmapNearestFilter: TextureFilter;
  122. export const LinearMipMapNearestFilter: TextureFilter;
  123. export const LinearMipmapLinearFilter: TextureFilter;
  124. export const LinearMipMapLinearFilter: TextureFilter;
  125. // Data types
  126. export enum TextureDataType {}
  127. export const UnsignedByteType: TextureDataType;
  128. export const ByteType: TextureDataType;
  129. export const ShortType: TextureDataType;
  130. export const UnsignedShortType: TextureDataType;
  131. export const IntType: TextureDataType;
  132. export const UnsignedIntType: TextureDataType;
  133. export const FloatType: TextureDataType;
  134. export const HalfFloatType: TextureDataType;
  135. export const UnsignedShort4444Type: TextureDataType;
  136. export const UnsignedShort5551Type: TextureDataType;
  137. export const UnsignedShort565Type: TextureDataType;
  138. export const UnsignedInt248Type: TextureDataType;
  139. // Pixel formats
  140. export enum PixelFormat {}
  141. export const AlphaFormat: PixelFormat;
  142. export const RGBFormat: PixelFormat;
  143. export const RGBAFormat: PixelFormat;
  144. export const LuminanceFormat: PixelFormat;
  145. export const LuminanceAlphaFormat: PixelFormat;
  146. export const RGBEFormat: PixelFormat;
  147. export const DepthFormat: PixelFormat;
  148. export const DepthStencilFormat: PixelFormat;
  149. export const RedFormat: PixelFormat;
  150. export const RedIntegerFormat: PixelFormat;
  151. export const RGFormat: PixelFormat;
  152. export const RGIntegerFormat: PixelFormat;
  153. export const RGBIntegerFormat: PixelFormat;
  154. export const RGBAIntegerFormat: PixelFormat;
  155. // Internal Pixel Formats
  156. export type PixelFormatGPU =
  157. 'ALPHA'
  158. | 'RGB'
  159. | 'RGBA'
  160. | 'LUMINANCE'
  161. | 'LUMINANCE_ALPHA'
  162. | 'RED_INTEGER'
  163. | 'R8'
  164. | 'R8_SNORM'
  165. | 'R8I'
  166. | 'R8UI'
  167. | 'R16I'
  168. | 'R16UI'
  169. | 'R16F'
  170. | 'R32I'
  171. | 'R32UI'
  172. | 'R32F'
  173. | 'RG8'
  174. | 'RG8_SNORM'
  175. | 'RG8I'
  176. | 'RG8UI'
  177. | 'RG16I'
  178. | 'RG16UI'
  179. | 'RG16F'
  180. | 'RG32I'
  181. | 'RG32UI'
  182. | 'RG32F'
  183. | 'RGB565'
  184. | 'RGB8'
  185. | 'RGB8_SNORM'
  186. | 'RGB8I'
  187. | 'RGB8UI'
  188. | 'RGB16I'
  189. | 'RGB16UI'
  190. | 'RGB16F'
  191. | 'RGB32I'
  192. | 'RGB32UI'
  193. | 'RGB32F'
  194. | 'RGB9_E5'
  195. | 'SRGB8'
  196. | 'R11F_G11F_B10F'
  197. | 'RGBA4'
  198. | 'RGBA8'
  199. | 'RGBA8_SNORM'
  200. | 'RGBA8I'
  201. | 'RGBA8UI'
  202. | 'RGBA16I'
  203. | 'RGBA16UI'
  204. | 'RGBA16F'
  205. | 'RGBA32I'
  206. | 'RGBA32UI'
  207. | 'RGBA32F'
  208. | 'RGB5_A1'
  209. | 'RGB10_A2'
  210. | 'RGB10_A2UI'
  211. | 'SRGB8_ALPHA8'
  212. | 'DEPTH_COMPONENT16'
  213. | 'DEPTH_COMPONENT24'
  214. | 'DEPTH_COMPONENT32F'
  215. | 'DEPTH24_STENCIL8'
  216. | 'DEPTH32F_STENCIL8';
  217. // Compressed texture formats
  218. // DDS / ST3C Compressed texture formats
  219. export enum CompressedPixelFormat {}
  220. export const RGB_S3TC_DXT1_Format: CompressedPixelFormat;
  221. export const RGBA_S3TC_DXT1_Format: CompressedPixelFormat;
  222. export const RGBA_S3TC_DXT3_Format: CompressedPixelFormat;
  223. export const RGBA_S3TC_DXT5_Format: CompressedPixelFormat;
  224. // PVRTC compressed './texture formats
  225. export const RGB_PVRTC_4BPPV1_Format: CompressedPixelFormat;
  226. export const RGB_PVRTC_2BPPV1_Format: CompressedPixelFormat;
  227. export const RGBA_PVRTC_4BPPV1_Format: CompressedPixelFormat;
  228. export const RGBA_PVRTC_2BPPV1_Format: CompressedPixelFormat;
  229. // ETC compressed texture formats
  230. export const RGB_ETC1_Format: CompressedPixelFormat;
  231. // ASTC compressed texture formats
  232. export const RGBA_ASTC_4x4_Format: CompressedPixelFormat;
  233. export const RGBA_ASTC_5x4_Format: CompressedPixelFormat;
  234. export const RGBA_ASTC_5x5_Format: CompressedPixelFormat;
  235. export const RGBA_ASTC_6x5_Format: CompressedPixelFormat;
  236. export const RGBA_ASTC_6x6_Format: CompressedPixelFormat;
  237. export const RGBA_ASTC_8x5_Format: CompressedPixelFormat;
  238. export const RGBA_ASTC_8x6_Format: CompressedPixelFormat;
  239. export const RGBA_ASTC_8x8_Format: CompressedPixelFormat;
  240. export const RGBA_ASTC_10x5_Format: CompressedPixelFormat;
  241. export const RGBA_ASTC_10x6_Format: CompressedPixelFormat;
  242. export const RGBA_ASTC_10x8_Format: CompressedPixelFormat;
  243. export const RGBA_ASTC_10x10_Format: CompressedPixelFormat;
  244. export const RGBA_ASTC_12x10_Format: CompressedPixelFormat;
  245. export const RGBA_ASTC_12x12_Format: CompressedPixelFormat;
  246. // Loop styles for AnimationAction
  247. export enum AnimationActionLoopStyles {}
  248. export const LoopOnce: AnimationActionLoopStyles;
  249. export const LoopRepeat: AnimationActionLoopStyles;
  250. export const LoopPingPong: AnimationActionLoopStyles;
  251. // Interpolation
  252. export enum InterpolationModes {}
  253. export const InterpolateDiscrete: InterpolationModes;
  254. export const InterpolateLinear: InterpolationModes;
  255. export const InterpolateSmooth: InterpolationModes;
  256. // Interpolant ending modes
  257. export enum InterpolationEndingModes {}
  258. export const ZeroCurvatureEnding: InterpolationEndingModes;
  259. export const ZeroSlopeEnding: InterpolationEndingModes;
  260. export const WrapAroundEnding: InterpolationEndingModes;
  261. // Triangle Draw modes
  262. export enum TrianglesDrawModes {}
  263. export const TrianglesDrawMode: TrianglesDrawModes;
  264. export const TriangleStripDrawMode: TrianglesDrawModes;
  265. export const TriangleFanDrawMode: TrianglesDrawModes;
  266. // Texture Encodings
  267. export enum TextureEncoding {}
  268. export const LinearEncoding: TextureEncoding;
  269. export const sRGBEncoding: TextureEncoding;
  270. export const GammaEncoding: TextureEncoding;
  271. export const RGBEEncoding: TextureEncoding;
  272. export const LogLuvEncoding: TextureEncoding;
  273. export const RGBM7Encoding: TextureEncoding;
  274. export const RGBM16Encoding: TextureEncoding;
  275. export const RGBDEncoding: TextureEncoding;
  276. // Depth packing strategies
  277. export enum DepthPackingStrategies {}
  278. export const BasicDepthPacking: DepthPackingStrategies;
  279. export const RGBADepthPacking: DepthPackingStrategies;
  280. // Normal Map types
  281. export enum NormalMapTypes {}
  282. export const TangentSpaceNormalMap: NormalMapTypes;
  283. export const ObjectSpaceNormalMap: NormalMapTypes;
  284. // Stencil Op types
  285. export enum StencilOp {}
  286. export const ZeroStencilOp: StencilOp;
  287. export const KeepStencilOp: StencilOp;
  288. export const ReplaceStencilOp: StencilOp;
  289. export const IncrementStencilOp: StencilOp;
  290. export const DecrementStencilOp: StencilOp;
  291. export const IncrementWrapStencilOp: StencilOp;
  292. export const DecrementWrapStencilOp: StencilOp;
  293. export const InvertStencilOp: StencilOp;
  294. // Stencil Func types
  295. export enum StencilFunc {}
  296. export const NeverStencilFunc: StencilFunc;
  297. export const LessStencilFunc: StencilFunc;
  298. export const EqualStencilFunc: StencilFunc;
  299. export const LessEqualStencilFunc: StencilFunc;
  300. export const GreaterStencilFunc: StencilFunc;
  301. export const NotEqualStencilFunc: StencilFunc;
  302. export const GreaterEqualStencilFunc: StencilFunc;
  303. export const AlwaysStencilFunc: StencilFunc;
  304. // usage types
  305. export enum Usage {}
  306. export const StaticDrawUsage: Usage;
  307. export const DynamicDrawUsage: Usage;
  308. export const StreamDrawUsage: Usage;
  309. export const StaticReadUsage: Usage;
  310. export const DynamicReadUsage: Usage;
  311. export const StreamReadUsage: Usage;
  312. export const StaticCopyUsage: Usage;
  313. export const DynamicCopyUsage: Usage;
  314. export const StreamCopyUsage: Usage;