constants.js 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675
  1. export const REVISION = '180dev';
  2. /**
  3. * Represents mouse buttons and interaction types in context of controls.
  4. *
  5. * @type {ConstantsMouse}
  6. * @constant
  7. */
  8. export const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
  9. /**
  10. * Represents touch interaction types in context of controls.
  11. *
  12. * @type {ConstantsTouch}
  13. * @constant
  14. */
  15. export const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
  16. /**
  17. * Disables face culling.
  18. *
  19. * @type {number}
  20. * @constant
  21. */
  22. export const CullFaceNone = 0;
  23. /**
  24. * Culls back faces.
  25. *
  26. * @type {number}
  27. * @constant
  28. */
  29. export const CullFaceBack = 1;
  30. /**
  31. * Culls front faces.
  32. *
  33. * @type {number}
  34. * @constant
  35. */
  36. export const CullFaceFront = 2;
  37. /**
  38. * Culls both front and back faces.
  39. *
  40. * @type {number}
  41. * @constant
  42. */
  43. export const CullFaceFrontBack = 3;
  44. /**
  45. * Gives unfiltered shadow maps - fastest, but lowest quality.
  46. *
  47. * @type {number}
  48. * @constant
  49. */
  50. export const BasicShadowMap = 0;
  51. /**
  52. * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm.
  53. *
  54. * @type {number}
  55. * @constant
  56. */
  57. export const PCFShadowMap = 1;
  58. /**
  59. * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm with
  60. * better soft shadows especially when using low-resolution shadow maps.
  61. *
  62. * @type {number}
  63. * @constant
  64. */
  65. export const PCFSoftShadowMap = 2;
  66. /**
  67. * Filters shadow maps using the Variance Shadow Map (VSM) algorithm.
  68. * When using VSMShadowMap all shadow receivers will also cast shadows.
  69. *
  70. * @type {number}
  71. * @constant
  72. */
  73. export const VSMShadowMap = 3;
  74. /**
  75. * Only front faces are rendered.
  76. *
  77. * @type {number}
  78. * @constant
  79. */
  80. export const FrontSide = 0;
  81. /**
  82. * Only back faces are rendered.
  83. *
  84. * @type {number}
  85. * @constant
  86. */
  87. export const BackSide = 1;
  88. /**
  89. * Both front and back faces are rendered.
  90. *
  91. * @type {number}
  92. * @constant
  93. */
  94. export const DoubleSide = 2;
  95. /**
  96. * No blending is performed which effectively disables
  97. * alpha transparency.
  98. *
  99. * @type {number}
  100. * @constant
  101. */
  102. export const NoBlending = 0;
  103. /**
  104. * The default blending.
  105. *
  106. * @type {number}
  107. * @constant
  108. */
  109. export const NormalBlending = 1;
  110. /**
  111. * Represents additive blending.
  112. *
  113. * @type {number}
  114. * @constant
  115. */
  116. export const AdditiveBlending = 2;
  117. /**
  118. * Represents subtractive blending.
  119. *
  120. * @type {number}
  121. * @constant
  122. */
  123. export const SubtractiveBlending = 3;
  124. /**
  125. * Represents multiply blending.
  126. *
  127. * @type {number}
  128. * @constant
  129. */
  130. export const MultiplyBlending = 4;
  131. /**
  132. * Represents custom blending.
  133. *
  134. * @type {number}
  135. * @constant
  136. */
  137. export const CustomBlending = 5;
  138. /**
  139. * A `source + destination` blending equation.
  140. *
  141. * @type {number}
  142. * @constant
  143. */
  144. export const AddEquation = 100;
  145. /**
  146. * A `source - destination` blending equation.
  147. *
  148. * @type {number}
  149. * @constant
  150. */
  151. export const SubtractEquation = 101;
  152. /**
  153. * A `destination - source` blending equation.
  154. *
  155. * @type {number}
  156. * @constant
  157. */
  158. export const ReverseSubtractEquation = 102;
  159. /**
  160. * A blend equation that uses the minimum of source and destination.
  161. *
  162. * @type {number}
  163. * @constant
  164. */
  165. export const MinEquation = 103;
  166. /**
  167. * A blend equation that uses the maximum of source and destination.
  168. *
  169. * @type {number}
  170. * @constant
  171. */
  172. export const MaxEquation = 104;
  173. /**
  174. * Multiplies all colors by `0`.
  175. *
  176. * @type {number}
  177. * @constant
  178. */
  179. export const ZeroFactor = 200;
  180. /**
  181. * Multiplies all colors by `1`.
  182. *
  183. * @type {number}
  184. * @constant
  185. */
  186. export const OneFactor = 201;
  187. /**
  188. * Multiplies all colors by the source colors.
  189. *
  190. * @type {number}
  191. * @constant
  192. */
  193. export const SrcColorFactor = 202;
  194. /**
  195. * Multiplies all colors by `1` minus each source color.
  196. *
  197. * @type {number}
  198. * @constant
  199. */
  200. export const OneMinusSrcColorFactor = 203;
  201. /**
  202. * Multiplies all colors by the source alpha value.
  203. *
  204. * @type {number}
  205. * @constant
  206. */
  207. export const SrcAlphaFactor = 204;
  208. /**
  209. * Multiplies all colors by 1 minus the source alpha value.
  210. *
  211. * @type {number}
  212. * @constant
  213. */
  214. export const OneMinusSrcAlphaFactor = 205;
  215. /**
  216. * Multiplies all colors by the destination alpha value.
  217. *
  218. * @type {number}
  219. * @constant
  220. */
  221. export const DstAlphaFactor = 206;
  222. /**
  223. * Multiplies all colors by `1` minus the destination alpha value.
  224. *
  225. * @type {number}
  226. * @constant
  227. */
  228. export const OneMinusDstAlphaFactor = 207;
  229. /**
  230. * Multiplies all colors by the destination color.
  231. *
  232. * @type {number}
  233. * @constant
  234. */
  235. export const DstColorFactor = 208;
  236. /**
  237. * Multiplies all colors by `1` minus each destination color.
  238. *
  239. * @type {number}
  240. * @constant
  241. */
  242. export const OneMinusDstColorFactor = 209;
  243. /**
  244. * Multiplies the RGB colors by the smaller of either the source alpha
  245. * value or the value of `1` minus the destination alpha value. The alpha
  246. * value is multiplied by `1`.
  247. *
  248. * @type {number}
  249. * @constant
  250. */
  251. export const SrcAlphaSaturateFactor = 210;
  252. /**
  253. * Multiplies all colors by a constant color.
  254. *
  255. * @type {number}
  256. * @constant
  257. */
  258. export const ConstantColorFactor = 211;
  259. /**
  260. * Multiplies all colors by `1` minus a constant color.
  261. *
  262. * @type {number}
  263. * @constant
  264. */
  265. export const OneMinusConstantColorFactor = 212;
  266. /**
  267. * Multiplies all colors by a constant alpha value.
  268. *
  269. * @type {number}
  270. * @constant
  271. */
  272. export const ConstantAlphaFactor = 213;
  273. /**
  274. * Multiplies all colors by 1 minus a constant alpha value.
  275. *
  276. * @type {number}
  277. * @constant
  278. */
  279. export const OneMinusConstantAlphaFactor = 214;
  280. /**
  281. * Never pass.
  282. *
  283. * @type {number}
  284. * @constant
  285. */
  286. export const NeverDepth = 0;
  287. /**
  288. * Always pass.
  289. *
  290. * @type {number}
  291. * @constant
  292. */
  293. export const AlwaysDepth = 1;
  294. /**
  295. * Pass if the incoming value is less than the depth buffer value.
  296. *
  297. * @type {number}
  298. * @constant
  299. */
  300. export const LessDepth = 2;
  301. /**
  302. * Pass if the incoming value is less than or equal to the depth buffer value.
  303. *
  304. * @type {number}
  305. * @constant
  306. */
  307. export const LessEqualDepth = 3;
  308. /**
  309. * Pass if the incoming value equals the depth buffer value.
  310. *
  311. * @type {number}
  312. * @constant
  313. */
  314. export const EqualDepth = 4;
  315. /**
  316. * Pass if the incoming value is greater than or equal to the depth buffer value.
  317. *
  318. * @type {number}
  319. * @constant
  320. */
  321. export const GreaterEqualDepth = 5;
  322. /**
  323. * Pass if the incoming value is greater than the depth buffer value.
  324. *
  325. * @type {number}
  326. * @constant
  327. */
  328. export const GreaterDepth = 6;
  329. /**
  330. * Pass if the incoming value is not equal to the depth buffer value.
  331. *
  332. * @type {number}
  333. * @constant
  334. */
  335. export const NotEqualDepth = 7;
  336. /**
  337. * Multiplies the environment map color with the surface color.
  338. *
  339. * @type {number}
  340. * @constant
  341. */
  342. export const MultiplyOperation = 0;
  343. /**
  344. * Uses reflectivity to blend between the two colors.
  345. *
  346. * @type {number}
  347. * @constant
  348. */
  349. export const MixOperation = 1;
  350. /**
  351. * Adds the two colors.
  352. *
  353. * @type {number}
  354. * @constant
  355. */
  356. export const AddOperation = 2;
  357. /**
  358. * No tone mapping is applied.
  359. *
  360. * @type {number}
  361. * @constant
  362. */
  363. export const NoToneMapping = 0;
  364. /**
  365. * Linear tone mapping.
  366. *
  367. * @type {number}
  368. * @constant
  369. */
  370. export const LinearToneMapping = 1;
  371. /**
  372. * Reinhard tone mapping.
  373. *
  374. * @type {number}
  375. * @constant
  376. */
  377. export const ReinhardToneMapping = 2;
  378. /**
  379. * Cineon tone mapping.
  380. *
  381. * @type {number}
  382. * @constant
  383. */
  384. export const CineonToneMapping = 3;
  385. /**
  386. * ACES Filmic tone mapping.
  387. *
  388. * @type {number}
  389. * @constant
  390. */
  391. export const ACESFilmicToneMapping = 4;
  392. /**
  393. * Custom tone mapping.
  394. *
  395. * Expects a custom implementation by modifying shader code of the material's fragment shader.
  396. *
  397. * @type {number}
  398. * @constant
  399. */
  400. export const CustomToneMapping = 5;
  401. /**
  402. * AgX tone mapping.
  403. *
  404. * @type {number}
  405. * @constant
  406. */
  407. export const AgXToneMapping = 6;
  408. /**
  409. * Neutral tone mapping.
  410. *
  411. * Implementation based on the Khronos 3D Commerce Group standard tone mapping.
  412. *
  413. * @type {number}
  414. * @constant
  415. */
  416. export const NeutralToneMapping = 7;
  417. /**
  418. * The skinned mesh shares the same world space as the skeleton.
  419. *
  420. * @type {string}
  421. * @constant
  422. */
  423. export const AttachedBindMode = 'attached';
  424. /**
  425. * The skinned mesh does not share the same world space as the skeleton.
  426. * This is useful when a skeleton is shared across multiple skinned meshes.
  427. *
  428. * @type {string}
  429. * @constant
  430. */
  431. export const DetachedBindMode = 'detached';
  432. /**
  433. * Maps textures using the geometry's UV coordinates.
  434. *
  435. * @type {number}
  436. * @constant
  437. */
  438. export const UVMapping = 300;
  439. /**
  440. * Reflection mapping for cube textures.
  441. *
  442. * @type {number}
  443. * @constant
  444. */
  445. export const CubeReflectionMapping = 301;
  446. /**
  447. * Refraction mapping for cube textures.
  448. *
  449. * @type {number}
  450. * @constant
  451. */
  452. export const CubeRefractionMapping = 302;
  453. /**
  454. * Reflection mapping for equirectangular textures.
  455. *
  456. * @type {number}
  457. * @constant
  458. */
  459. export const EquirectangularReflectionMapping = 303;
  460. /**
  461. * Refraction mapping for equirectangular textures.
  462. *
  463. * @type {number}
  464. * @constant
  465. */
  466. export const EquirectangularRefractionMapping = 304;
  467. /**
  468. * Reflection mapping for PMREM textures.
  469. *
  470. * @type {number}
  471. * @constant
  472. */
  473. export const CubeUVReflectionMapping = 306;
  474. /**
  475. * The texture will simply repeat to infinity.
  476. *
  477. * @type {number}
  478. * @constant
  479. */
  480. export const RepeatWrapping = 1000;
  481. /**
  482. * The last pixel of the texture stretches to the edge of the mesh.
  483. *
  484. * @type {number}
  485. * @constant
  486. */
  487. export const ClampToEdgeWrapping = 1001;
  488. /**
  489. * The texture will repeats to infinity, mirroring on each repeat.
  490. *
  491. * @type {number}
  492. * @constant
  493. */
  494. export const MirroredRepeatWrapping = 1002;
  495. /**
  496. * Returns the value of the texture element that is nearest (in Manhattan distance)
  497. * to the specified texture coordinates.
  498. *
  499. * @type {number}
  500. * @constant
  501. */
  502. export const NearestFilter = 1003;
  503. /**
  504. * Chooses the mipmap that most closely matches the size of the pixel being textured
  505. * and uses the `NearestFilter` criterion (the texel nearest to the center of the pixel)
  506. * to produce a texture value.
  507. *
  508. * @type {number}
  509. * @constant
  510. */
  511. export const NearestMipmapNearestFilter = 1004;
  512. export const NearestMipMapNearestFilter = 1004; // legacy
  513. /**
  514. * Chooses the two mipmaps that most closely match the size of the pixel being textured and
  515. * uses the `NearestFilter` criterion to produce a texture value from each mipmap.
  516. * The final texture value is a weighted average of those two values.
  517. *
  518. * @type {number}
  519. * @constant
  520. */
  521. export const NearestMipmapLinearFilter = 1005;
  522. export const NearestMipMapLinearFilter = 1005; // legacy
  523. /**
  524. * Returns the weighted average of the four texture elements that are closest to the specified
  525. * texture coordinates, and can include items wrapped or repeated from other parts of a texture,
  526. * depending on the values of `wrapS` and `wrapT`, and on the exact mapping.
  527. *
  528. * @type {number}
  529. * @constant
  530. */
  531. export const LinearFilter = 1006;
  532. /**
  533. * Chooses the mipmap that most closely matches the size of the pixel being textured and uses
  534. * the `LinearFilter` criterion (a weighted average of the four texels that are closest to the
  535. * center of the pixel) to produce a texture value.
  536. *
  537. * @type {number}
  538. * @constant
  539. */
  540. export const LinearMipmapNearestFilter = 1007;
  541. export const LinearMipMapNearestFilter = 1007; // legacy
  542. /**
  543. * Chooses the two mipmaps that most closely match the size of the pixel being textured and uses
  544. * the `LinearFilter` criterion to produce a texture value from each mipmap. The final texture value
  545. * is a weighted average of those two values.
  546. *
  547. * @type {number}
  548. * @constant
  549. */
  550. export const LinearMipmapLinearFilter = 1008;
  551. export const LinearMipMapLinearFilter = 1008; // legacy
  552. /**
  553. * An unsigned byte data type for textures.
  554. *
  555. * @type {number}
  556. * @constant
  557. */
  558. export const UnsignedByteType = 1009;
  559. /**
  560. * A byte data type for textures.
  561. *
  562. * @type {number}
  563. * @constant
  564. */
  565. export const ByteType = 1010;
  566. /**
  567. * A short data type for textures.
  568. *
  569. * @type {number}
  570. * @constant
  571. */
  572. export const ShortType = 1011;
  573. /**
  574. * An unsigned short data type for textures.
  575. *
  576. * @type {number}
  577. * @constant
  578. */
  579. export const UnsignedShortType = 1012;
  580. /**
  581. * An int data type for textures.
  582. *
  583. * @type {number}
  584. * @constant
  585. */
  586. export const IntType = 1013;
  587. /**
  588. * An unsigned int data type for textures.
  589. *
  590. * @type {number}
  591. * @constant
  592. */
  593. export const UnsignedIntType = 1014;
  594. /**
  595. * A float data type for textures.
  596. *
  597. * @type {number}
  598. * @constant
  599. */
  600. export const FloatType = 1015;
  601. /**
  602. * A half float data type for textures.
  603. *
  604. * @type {number}
  605. * @constant
  606. */
  607. export const HalfFloatType = 1016;
  608. /**
  609. * An unsigned short 4_4_4_4 (packed) data type for textures.
  610. *
  611. * @type {number}
  612. * @constant
  613. */
  614. export const UnsignedShort4444Type = 1017;
  615. /**
  616. * An unsigned short 5_5_5_1 (packed) data type for textures.
  617. *
  618. * @type {number}
  619. * @constant
  620. */
  621. export const UnsignedShort5551Type = 1018;
  622. /**
  623. * An unsigned int 24_8 data type for textures.
  624. *
  625. * @type {number}
  626. * @constant
  627. */
  628. export const UnsignedInt248Type = 1020;
  629. /**
  630. * An unsigned int 5_9_9_9 (packed) data type for textures.
  631. *
  632. * @type {number}
  633. * @constant
  634. */
  635. export const UnsignedInt5999Type = 35902;
  636. /**
  637. * An unsigned int 10_11_11 (packed) data type for textures.
  638. *
  639. * @type {number}
  640. * @constant
  641. */
  642. export const UnsignedInt101111Type = 35899;
  643. /**
  644. * Discards the red, green and blue components and reads just the alpha component.
  645. *
  646. * @type {number}
  647. * @constant
  648. */
  649. export const AlphaFormat = 1021;
  650. /**
  651. * Discards the alpha component and reads the red, green and blue component.
  652. *
  653. * @type {number}
  654. * @constant
  655. */
  656. export const RGBFormat = 1022;
  657. /**
  658. * Reads the red, green, blue and alpha components.
  659. *
  660. * @type {number}
  661. * @constant
  662. */
  663. export const RGBAFormat = 1023;
  664. /**
  665. * Reads each element as a single depth value, converts it to floating point, and clamps to the range `[0,1]`.
  666. *
  667. * @type {number}
  668. * @constant
  669. */
  670. export const DepthFormat = 1026;
  671. /**
  672. * Reads each element is a pair of depth and stencil values. The depth component of the pair is interpreted as
  673. * in `DepthFormat`. The stencil component is interpreted based on the depth + stencil internal format.
  674. *
  675. * @type {number}
  676. * @constant
  677. */
  678. export const DepthStencilFormat = 1027;
  679. /**
  680. * Discards the green, blue and alpha components and reads just the red component.
  681. *
  682. * @type {number}
  683. * @constant
  684. */
  685. export const RedFormat = 1028;
  686. /**
  687. * Discards the green, blue and alpha components and reads just the red component. The texels are read as integers instead of floating point.
  688. *
  689. * @type {number}
  690. * @constant
  691. */
  692. export const RedIntegerFormat = 1029;
  693. /**
  694. * Discards the alpha, and blue components and reads the red, and green components.
  695. *
  696. * @type {number}
  697. * @constant
  698. */
  699. export const RGFormat = 1030;
  700. /**
  701. * Discards the alpha, and blue components and reads the red, and green components. The texels are read as integers instead of floating point.
  702. *
  703. * @type {number}
  704. * @constant
  705. */
  706. export const RGIntegerFormat = 1031;
  707. /**
  708. * Discards the alpha component and reads the red, green and blue component. The texels are read as integers instead of floating point.
  709. *
  710. * @type {number}
  711. * @constant
  712. */
  713. export const RGBIntegerFormat = 1032;
  714. /**
  715. * Reads the red, green, blue and alpha components. The texels are read as integers instead of floating point.
  716. *
  717. * @type {number}
  718. * @constant
  719. */
  720. export const RGBAIntegerFormat = 1033;
  721. /**
  722. * A DXT1-compressed image in an RGB image format.
  723. *
  724. * @type {number}
  725. * @constant
  726. */
  727. export const RGB_S3TC_DXT1_Format = 33776;
  728. /**
  729. * A DXT1-compressed image in an RGB image format with a simple on/off alpha value.
  730. *
  731. * @type {number}
  732. * @constant
  733. */
  734. export const RGBA_S3TC_DXT1_Format = 33777;
  735. /**
  736. * A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression.
  737. *
  738. * @type {number}
  739. * @constant
  740. */
  741. export const RGBA_S3TC_DXT3_Format = 33778;
  742. /**
  743. * A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3
  744. * compression in how the alpha compression is done.
  745. *
  746. * @type {number}
  747. * @constant
  748. */
  749. export const RGBA_S3TC_DXT5_Format = 33779;
  750. /**
  751. * PVRTC RGB compression in 4-bit mode. One block for each 4×4 pixels.
  752. *
  753. * @type {number}
  754. * @constant
  755. */
  756. export const RGB_PVRTC_4BPPV1_Format = 35840;
  757. /**
  758. * PVRTC RGB compression in 2-bit mode. One block for each 8×4 pixels.
  759. *
  760. * @type {number}
  761. * @constant
  762. */
  763. export const RGB_PVRTC_2BPPV1_Format = 35841;
  764. /**
  765. * PVRTC RGBA compression in 4-bit mode. One block for each 4×4 pixels.
  766. *
  767. * @type {number}
  768. * @constant
  769. */
  770. export const RGBA_PVRTC_4BPPV1_Format = 35842;
  771. /**
  772. * PVRTC RGBA compression in 2-bit mode. One block for each 8×4 pixels.
  773. *
  774. * @type {number}
  775. * @constant
  776. */
  777. export const RGBA_PVRTC_2BPPV1_Format = 35843;
  778. /**
  779. * ETC1 RGB format.
  780. *
  781. * @type {number}
  782. * @constant
  783. */
  784. export const RGB_ETC1_Format = 36196;
  785. /**
  786. * ETC2 RGB format.
  787. *
  788. * @type {number}
  789. * @constant
  790. */
  791. export const RGB_ETC2_Format = 37492;
  792. /**
  793. * ETC2 RGBA format.
  794. *
  795. * @type {number}
  796. * @constant
  797. */
  798. export const RGBA_ETC2_EAC_Format = 37496;
  799. /**
  800. * ASTC RGBA 4x4 format.
  801. *
  802. * @type {number}
  803. * @constant
  804. */
  805. export const RGBA_ASTC_4x4_Format = 37808;
  806. /**
  807. * ASTC RGBA 5x4 format.
  808. *
  809. * @type {number}
  810. * @constant
  811. */
  812. export const RGBA_ASTC_5x4_Format = 37809;
  813. /**
  814. * ASTC RGBA 5x5 format.
  815. *
  816. * @type {number}
  817. * @constant
  818. */
  819. export const RGBA_ASTC_5x5_Format = 37810;
  820. /**
  821. * ASTC RGBA 6x5 format.
  822. *
  823. * @type {number}
  824. * @constant
  825. */
  826. export const RGBA_ASTC_6x5_Format = 37811;
  827. /**
  828. * ASTC RGBA 6x6 format.
  829. *
  830. * @type {number}
  831. * @constant
  832. */
  833. export const RGBA_ASTC_6x6_Format = 37812;
  834. /**
  835. * ASTC RGBA 8x5 format.
  836. *
  837. * @type {number}
  838. * @constant
  839. */
  840. export const RGBA_ASTC_8x5_Format = 37813;
  841. /**
  842. * ASTC RGBA 8x6 format.
  843. *
  844. * @type {number}
  845. * @constant
  846. */
  847. export const RGBA_ASTC_8x6_Format = 37814;
  848. /**
  849. * ASTC RGBA 8x8 format.
  850. *
  851. * @type {number}
  852. * @constant
  853. */
  854. export const RGBA_ASTC_8x8_Format = 37815;
  855. /**
  856. * ASTC RGBA 10x5 format.
  857. *
  858. * @type {number}
  859. * @constant
  860. */
  861. export const RGBA_ASTC_10x5_Format = 37816;
  862. /**
  863. * ASTC RGBA 10x6 format.
  864. *
  865. * @type {number}
  866. * @constant
  867. */
  868. export const RGBA_ASTC_10x6_Format = 37817;
  869. /**
  870. * ASTC RGBA 10x8 format.
  871. *
  872. * @type {number}
  873. * @constant
  874. */
  875. export const RGBA_ASTC_10x8_Format = 37818;
  876. /**
  877. * ASTC RGBA 10x10 format.
  878. *
  879. * @type {number}
  880. * @constant
  881. */
  882. export const RGBA_ASTC_10x10_Format = 37819;
  883. /**
  884. * ASTC RGBA 12x10 format.
  885. *
  886. * @type {number}
  887. * @constant
  888. */
  889. export const RGBA_ASTC_12x10_Format = 37820;
  890. /**
  891. * ASTC RGBA 12x12 format.
  892. *
  893. * @type {number}
  894. * @constant
  895. */
  896. export const RGBA_ASTC_12x12_Format = 37821;
  897. /**
  898. * BPTC RGBA format.
  899. *
  900. * @type {number}
  901. * @constant
  902. */
  903. export const RGBA_BPTC_Format = 36492;
  904. /**
  905. * BPTC Signed RGB format.
  906. *
  907. * @type {number}
  908. * @constant
  909. */
  910. export const RGB_BPTC_SIGNED_Format = 36494;
  911. /**
  912. * BPTC Unsigned RGB format.
  913. *
  914. * @type {number}
  915. * @constant
  916. */
  917. export const RGB_BPTC_UNSIGNED_Format = 36495;
  918. /**
  919. * RGTC1 Red format.
  920. *
  921. * @type {number}
  922. * @constant
  923. */
  924. export const RED_RGTC1_Format = 36283;
  925. /**
  926. * RGTC1 Signed Red format.
  927. *
  928. * @type {number}
  929. * @constant
  930. */
  931. export const SIGNED_RED_RGTC1_Format = 36284;
  932. /**
  933. * RGTC2 Red Green format.
  934. *
  935. * @type {number}
  936. * @constant
  937. */
  938. export const RED_GREEN_RGTC2_Format = 36285;
  939. /**
  940. * RGTC2 Signed Red Green format.
  941. *
  942. * @type {number}
  943. * @constant
  944. */
  945. export const SIGNED_RED_GREEN_RGTC2_Format = 36286;
  946. /**
  947. * Animations are played once.
  948. *
  949. * @type {number}
  950. * @constant
  951. */
  952. export const LoopOnce = 2200;
  953. /**
  954. * Animations are played with a chosen number of repetitions, each time jumping from
  955. * the end of the clip directly to its beginning.
  956. *
  957. * @type {number}
  958. * @constant
  959. */
  960. export const LoopRepeat = 2201;
  961. /**
  962. * Animations are played with a chosen number of repetitions, alternately playing forward
  963. * and backward.
  964. *
  965. * @type {number}
  966. * @constant
  967. */
  968. export const LoopPingPong = 2202;
  969. /**
  970. * Discrete interpolation mode for keyframe tracks.
  971. *
  972. * @type {number}
  973. * @constant
  974. */
  975. export const InterpolateDiscrete = 2300;
  976. /**
  977. * Linear interpolation mode for keyframe tracks.
  978. *
  979. * @type {number}
  980. * @constant
  981. */
  982. export const InterpolateLinear = 2301;
  983. /**
  984. * Smooth interpolation mode for keyframe tracks.
  985. *
  986. * @type {number}
  987. * @constant
  988. */
  989. export const InterpolateSmooth = 2302;
  990. /**
  991. * Zero curvature ending for animations.
  992. *
  993. * @type {number}
  994. * @constant
  995. */
  996. export const ZeroCurvatureEnding = 2400;
  997. /**
  998. * Zero slope ending for animations.
  999. *
  1000. * @type {number}
  1001. * @constant
  1002. */
  1003. export const ZeroSlopeEnding = 2401;
  1004. /**
  1005. * Wrap around ending for animations.
  1006. *
  1007. * @type {number}
  1008. * @constant
  1009. */
  1010. export const WrapAroundEnding = 2402;
  1011. /**
  1012. * Default animation blend mode.
  1013. *
  1014. * @type {number}
  1015. * @constant
  1016. */
  1017. export const NormalAnimationBlendMode = 2500;
  1018. /**
  1019. * Additive animation blend mode. Can be used to layer motions on top of
  1020. * each other to build complex performances from smaller re-usable assets.
  1021. *
  1022. * @type {number}
  1023. * @constant
  1024. */
  1025. export const AdditiveAnimationBlendMode = 2501;
  1026. /**
  1027. * For every three vertices draw a single triangle.
  1028. *
  1029. * @type {number}
  1030. * @constant
  1031. */
  1032. export const TrianglesDrawMode = 0;
  1033. /**
  1034. * For each vertex draw a triangle from the last three vertices.
  1035. *
  1036. * @type {number}
  1037. * @constant
  1038. */
  1039. export const TriangleStripDrawMode = 1;
  1040. /**
  1041. * For each vertex draw a triangle from the first vertex and the last two vertices.
  1042. *
  1043. * @type {number}
  1044. * @constant
  1045. */
  1046. export const TriangleFanDrawMode = 2;
  1047. /**
  1048. * Basic depth packing.
  1049. *
  1050. * @type {number}
  1051. * @constant
  1052. */
  1053. export const BasicDepthPacking = 3200;
  1054. /**
  1055. * A depth value is packed into 32 bit RGBA.
  1056. *
  1057. * @type {number}
  1058. * @constant
  1059. */
  1060. export const RGBADepthPacking = 3201;
  1061. /**
  1062. * A depth value is packed into 24 bit RGB.
  1063. *
  1064. * @type {number}
  1065. * @constant
  1066. */
  1067. export const RGBDepthPacking = 3202;
  1068. /**
  1069. * A depth value is packed into 16 bit RG.
  1070. *
  1071. * @type {number}
  1072. * @constant
  1073. */
  1074. export const RGDepthPacking = 3203;
  1075. /**
  1076. * Normal information is relative to the underlying surface.
  1077. *
  1078. * @type {number}
  1079. * @constant
  1080. */
  1081. export const TangentSpaceNormalMap = 0;
  1082. /**
  1083. * Normal information is relative to the object orientation.
  1084. *
  1085. * @type {number}
  1086. * @constant
  1087. */
  1088. export const ObjectSpaceNormalMap = 1;
  1089. // Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available.
  1090. /**
  1091. * No color space.
  1092. *
  1093. * @type {string}
  1094. * @constant
  1095. */
  1096. export const NoColorSpace = '';
  1097. /**
  1098. * sRGB color space.
  1099. *
  1100. * @type {string}
  1101. * @constant
  1102. */
  1103. export const SRGBColorSpace = 'srgb';
  1104. /**
  1105. * sRGB-linear color space.
  1106. *
  1107. * @type {string}
  1108. * @constant
  1109. */
  1110. export const LinearSRGBColorSpace = 'srgb-linear';
  1111. /**
  1112. * Linear transfer function.
  1113. *
  1114. * @type {string}
  1115. * @constant
  1116. */
  1117. export const LinearTransfer = 'linear';
  1118. /**
  1119. * sRGB transfer function.
  1120. *
  1121. * @type {string}
  1122. * @constant
  1123. */
  1124. export const SRGBTransfer = 'srgb';
  1125. /**
  1126. * Sets the stencil buffer value to `0`.
  1127. *
  1128. * @type {number}
  1129. * @constant
  1130. */
  1131. export const ZeroStencilOp = 0;
  1132. /**
  1133. * Keeps the current value.
  1134. *
  1135. * @type {number}
  1136. * @constant
  1137. */
  1138. export const KeepStencilOp = 7680;
  1139. /**
  1140. * Sets the stencil buffer value to the specified reference value.
  1141. *
  1142. * @type {number}
  1143. * @constant
  1144. */
  1145. export const ReplaceStencilOp = 7681;
  1146. /**
  1147. * Increments the current stencil buffer value. Clamps to the maximum representable unsigned value.
  1148. *
  1149. * @type {number}
  1150. * @constant
  1151. */
  1152. export const IncrementStencilOp = 7682;
  1153. /**
  1154. * Decrements the current stencil buffer value. Clamps to `0`.
  1155. *
  1156. * @type {number}
  1157. * @constant
  1158. */
  1159. export const DecrementStencilOp = 7683;
  1160. /**
  1161. * Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing
  1162. * the maximum representable unsigned value.
  1163. *
  1164. * @type {number}
  1165. * @constant
  1166. */
  1167. export const IncrementWrapStencilOp = 34055;
  1168. /**
  1169. * Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable
  1170. * unsigned value when decrementing a stencil buffer value of `0`.
  1171. *
  1172. * @type {number}
  1173. * @constant
  1174. */
  1175. export const DecrementWrapStencilOp = 34056;
  1176. /**
  1177. * Inverts the current stencil buffer value bitwise.
  1178. *
  1179. * @type {number}
  1180. * @constant
  1181. */
  1182. export const InvertStencilOp = 5386;
  1183. /**
  1184. * Will never return true.
  1185. *
  1186. * @type {number}
  1187. * @constant
  1188. */
  1189. export const NeverStencilFunc = 512;
  1190. /**
  1191. * Will return true if the stencil reference value is less than the current stencil value.
  1192. *
  1193. * @type {number}
  1194. * @constant
  1195. */
  1196. export const LessStencilFunc = 513;
  1197. /**
  1198. * Will return true if the stencil reference value is equal to the current stencil value.
  1199. *
  1200. * @type {number}
  1201. * @constant
  1202. */
  1203. export const EqualStencilFunc = 514;
  1204. /**
  1205. * Will return true if the stencil reference value is less than or equal to the current stencil value.
  1206. *
  1207. * @type {number}
  1208. * @constant
  1209. */
  1210. export const LessEqualStencilFunc = 515;
  1211. /**
  1212. * Will return true if the stencil reference value is greater than the current stencil value.
  1213. *
  1214. * @type {number}
  1215. * @constant
  1216. */
  1217. export const GreaterStencilFunc = 516;
  1218. /**
  1219. * Will return true if the stencil reference value is not equal to the current stencil value.
  1220. *
  1221. * @type {number}
  1222. * @constant
  1223. */
  1224. export const NotEqualStencilFunc = 517;
  1225. /**
  1226. * Will return true if the stencil reference value is greater than or equal to the current stencil value.
  1227. *
  1228. * @type {number}
  1229. * @constant
  1230. */
  1231. export const GreaterEqualStencilFunc = 518;
  1232. /**
  1233. * Will always return true.
  1234. *
  1235. * @type {number}
  1236. * @constant
  1237. */
  1238. export const AlwaysStencilFunc = 519;
  1239. /**
  1240. * Never pass.
  1241. *
  1242. * @type {number}
  1243. * @constant
  1244. */
  1245. export const NeverCompare = 512;
  1246. /**
  1247. * Pass if the incoming value is less than the texture value.
  1248. *
  1249. * @type {number}
  1250. * @constant
  1251. */
  1252. export const LessCompare = 513;
  1253. /**
  1254. * Pass if the incoming value equals the texture value.
  1255. *
  1256. * @type {number}
  1257. * @constant
  1258. */
  1259. export const EqualCompare = 514;
  1260. /**
  1261. * Pass if the incoming value is less than or equal to the texture value.
  1262. *
  1263. * @type {number}
  1264. * @constant
  1265. */
  1266. export const LessEqualCompare = 515;
  1267. /**
  1268. * Pass if the incoming value is greater than the texture value.
  1269. *
  1270. * @type {number}
  1271. * @constant
  1272. */
  1273. export const GreaterCompare = 516;
  1274. /**
  1275. * Pass if the incoming value is not equal to the texture value.
  1276. *
  1277. * @type {number}
  1278. * @constant
  1279. */
  1280. export const NotEqualCompare = 517;
  1281. /**
  1282. * Pass if the incoming value is greater than or equal to the texture value.
  1283. *
  1284. * @type {number}
  1285. * @constant
  1286. */
  1287. export const GreaterEqualCompare = 518;
  1288. /**
  1289. * Always pass.
  1290. *
  1291. * @type {number}
  1292. * @constant
  1293. */
  1294. export const AlwaysCompare = 519;
  1295. /**
  1296. * The contents are intended to be specified once by the application, and used many
  1297. * times as the source for drawing and image specification commands.
  1298. *
  1299. * @type {number}
  1300. * @constant
  1301. */
  1302. export const StaticDrawUsage = 35044;
  1303. /**
  1304. * The contents are intended to be respecified repeatedly by the application, and
  1305. * used many times as the source for drawing and image specification commands.
  1306. *
  1307. * @type {number}
  1308. * @constant
  1309. */
  1310. export const DynamicDrawUsage = 35048;
  1311. /**
  1312. * The contents are intended to be specified once by the application, and used at most
  1313. * a few times as the source for drawing and image specification commands.
  1314. *
  1315. * @type {number}
  1316. * @constant
  1317. */
  1318. export const StreamDrawUsage = 35040;
  1319. /**
  1320. * The contents are intended to be specified once by reading data from the 3D API, and queried
  1321. * many times by the application.
  1322. *
  1323. * @type {number}
  1324. * @constant
  1325. */
  1326. export const StaticReadUsage = 35045;
  1327. /**
  1328. * The contents are intended to be respecified repeatedly by reading data from the 3D API, and queried
  1329. * many times by the application.
  1330. *
  1331. * @type {number}
  1332. * @constant
  1333. */
  1334. export const DynamicReadUsage = 35049;
  1335. /**
  1336. * The contents are intended to be specified once by reading data from the 3D API, and queried at most
  1337. * a few times by the application
  1338. *
  1339. * @type {number}
  1340. * @constant
  1341. */
  1342. export const StreamReadUsage = 35041;
  1343. /**
  1344. * The contents are intended to be specified once by reading data from the 3D API, and used many times as
  1345. * the source for WebGL drawing and image specification commands.
  1346. *
  1347. * @type {number}
  1348. * @constant
  1349. */
  1350. export const StaticCopyUsage = 35046;
  1351. /**
  1352. * The contents are intended to be respecified repeatedly by reading data from the 3D API, and used many times
  1353. * as the source for WebGL drawing and image specification commands.
  1354. *
  1355. * @type {number}
  1356. * @constant
  1357. */
  1358. export const DynamicCopyUsage = 35050;
  1359. /**
  1360. * The contents are intended to be specified once by reading data from the 3D API, and used at most a few times
  1361. * as the source for WebGL drawing and image specification commands.
  1362. *
  1363. * @type {number}
  1364. * @constant
  1365. */
  1366. export const StreamCopyUsage = 35042;
  1367. /**
  1368. * GLSL 1 shader code.
  1369. *
  1370. * @type {string}
  1371. * @constant
  1372. */
  1373. export const GLSL1 = '100';
  1374. /**
  1375. * GLSL 3 shader code.
  1376. *
  1377. * @type {string}
  1378. * @constant
  1379. */
  1380. export const GLSL3 = '300 es';
  1381. /**
  1382. * WebGL coordinate system.
  1383. *
  1384. * @type {number}
  1385. * @constant
  1386. */
  1387. export const WebGLCoordinateSystem = 2000;
  1388. /**
  1389. * WebGPU coordinate system.
  1390. *
  1391. * @type {number}
  1392. * @constant
  1393. */
  1394. export const WebGPUCoordinateSystem = 2001;
  1395. /**
  1396. * Represents the different timestamp query types.
  1397. *
  1398. * @type {ConstantsTimestampQuery}
  1399. * @constant
  1400. */
  1401. export const TimestampQuery = {
  1402. COMPUTE: 'compute',
  1403. RENDER: 'render'
  1404. };
  1405. /**
  1406. * Represents mouse buttons and interaction types in context of controls.
  1407. *
  1408. * @type {ConstantsInterpolationSamplingType}
  1409. * @constant
  1410. */
  1411. export const InterpolationSamplingType = {
  1412. PERSPECTIVE: 'perspective',
  1413. LINEAR: 'linear',
  1414. FLAT: 'flat'
  1415. };
  1416. /**
  1417. * Represents the different interpolation sampling modes.
  1418. *
  1419. * @type {ConstantsInterpolationSamplingMode}
  1420. * @constant
  1421. */
  1422. export const InterpolationSamplingMode = {
  1423. NORMAL: 'normal',
  1424. CENTROID: 'centroid',
  1425. SAMPLE: 'sample',
  1426. FIRST: 'first',
  1427. EITHER: 'either'
  1428. };
  1429. /**
  1430. * This type represents mouse buttons and interaction types in context of controls.
  1431. *
  1432. * @typedef {Object} ConstantsMouse
  1433. * @property {number} MIDDLE - The left mouse button.
  1434. * @property {number} LEFT - The middle mouse button.
  1435. * @property {number} RIGHT - The right mouse button.
  1436. * @property {number} ROTATE - A rotate interaction.
  1437. * @property {number} DOLLY - A dolly interaction.
  1438. * @property {number} PAN - A pan interaction.
  1439. **/
  1440. /**
  1441. * This type represents touch interaction types in context of controls.
  1442. *
  1443. * @typedef {Object} ConstantsTouch
  1444. * @property {number} ROTATE - A rotate interaction.
  1445. * @property {number} PAN - A pan interaction.
  1446. * @property {number} DOLLY_PAN - The dolly-pan interaction.
  1447. * @property {number} DOLLY_ROTATE - A dolly-rotate interaction.
  1448. **/
  1449. /**
  1450. * This type represents the different timestamp query types.
  1451. *
  1452. * @typedef {Object} ConstantsTimestampQuery
  1453. * @property {string} COMPUTE - A `compute` timestamp query.
  1454. * @property {string} RENDER - A `render` timestamp query.
  1455. **/
  1456. /**
  1457. * Represents the different interpolation sampling types.
  1458. *
  1459. * @typedef {Object} ConstantsInterpolationSamplingType
  1460. * @property {string} PERSPECTIVE - Perspective-correct interpolation.
  1461. * @property {string} LINEAR - Linear interpolation.
  1462. * @property {string} FLAT - Flat interpolation.
  1463. */
  1464. /**
  1465. * Represents the different interpolation sampling modes.
  1466. *
  1467. * @typedef {Object} ConstantsInterpolationSamplingMode
  1468. * @property {string} NORMAL - Normal sampling mode.
  1469. * @property {string} CENTROID - Centroid sampling mode.
  1470. * @property {string} SAMPLE - Sample-specific sampling mode.
  1471. * @property {string} FLAT_FIRST - Flat interpolation using the first vertex.
  1472. * @property {string} FLAT_EITHER - Flat interpolation using either vertex.
  1473. */
粤ICP备19079148号