constants.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731
  1. export const REVISION = '183dev';
  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. * EAC R11 UNORM format.
  801. *
  802. * @type {number}
  803. * @constant
  804. */
  805. export const R11_EAC_Format = 37488; // 0x9270
  806. /**
  807. * EAC R11 SNORM format.
  808. *
  809. * @type {number}
  810. * @constant
  811. */
  812. export const SIGNED_R11_EAC_Format = 37489; // 0x9271
  813. /**
  814. * EAC RG11 UNORM format.
  815. *
  816. * @type {number}
  817. * @constant
  818. */
  819. export const RG11_EAC_Format = 37490; // 0x9272
  820. /**
  821. * EAC RG11 SNORM format.
  822. *
  823. * @type {number}
  824. * @constant
  825. */
  826. export const SIGNED_RG11_EAC_Format = 37491; // 0x9273
  827. /**
  828. * ASTC RGBA 4x4 format.
  829. *
  830. * @type {number}
  831. * @constant
  832. */
  833. export const RGBA_ASTC_4x4_Format = 37808;
  834. /**
  835. * ASTC RGBA 5x4 format.
  836. *
  837. * @type {number}
  838. * @constant
  839. */
  840. export const RGBA_ASTC_5x4_Format = 37809;
  841. /**
  842. * ASTC RGBA 5x5 format.
  843. *
  844. * @type {number}
  845. * @constant
  846. */
  847. export const RGBA_ASTC_5x5_Format = 37810;
  848. /**
  849. * ASTC RGBA 6x5 format.
  850. *
  851. * @type {number}
  852. * @constant
  853. */
  854. export const RGBA_ASTC_6x5_Format = 37811;
  855. /**
  856. * ASTC RGBA 6x6 format.
  857. *
  858. * @type {number}
  859. * @constant
  860. */
  861. export const RGBA_ASTC_6x6_Format = 37812;
  862. /**
  863. * ASTC RGBA 8x5 format.
  864. *
  865. * @type {number}
  866. * @constant
  867. */
  868. export const RGBA_ASTC_8x5_Format = 37813;
  869. /**
  870. * ASTC RGBA 8x6 format.
  871. *
  872. * @type {number}
  873. * @constant
  874. */
  875. export const RGBA_ASTC_8x6_Format = 37814;
  876. /**
  877. * ASTC RGBA 8x8 format.
  878. *
  879. * @type {number}
  880. * @constant
  881. */
  882. export const RGBA_ASTC_8x8_Format = 37815;
  883. /**
  884. * ASTC RGBA 10x5 format.
  885. *
  886. * @type {number}
  887. * @constant
  888. */
  889. export const RGBA_ASTC_10x5_Format = 37816;
  890. /**
  891. * ASTC RGBA 10x6 format.
  892. *
  893. * @type {number}
  894. * @constant
  895. */
  896. export const RGBA_ASTC_10x6_Format = 37817;
  897. /**
  898. * ASTC RGBA 10x8 format.
  899. *
  900. * @type {number}
  901. * @constant
  902. */
  903. export const RGBA_ASTC_10x8_Format = 37818;
  904. /**
  905. * ASTC RGBA 10x10 format.
  906. *
  907. * @type {number}
  908. * @constant
  909. */
  910. export const RGBA_ASTC_10x10_Format = 37819;
  911. /**
  912. * ASTC RGBA 12x10 format.
  913. *
  914. * @type {number}
  915. * @constant
  916. */
  917. export const RGBA_ASTC_12x10_Format = 37820;
  918. /**
  919. * ASTC RGBA 12x12 format.
  920. *
  921. * @type {number}
  922. * @constant
  923. */
  924. export const RGBA_ASTC_12x12_Format = 37821;
  925. /**
  926. * BPTC RGBA format.
  927. *
  928. * @type {number}
  929. * @constant
  930. */
  931. export const RGBA_BPTC_Format = 36492;
  932. /**
  933. * BPTC Signed RGB format.
  934. *
  935. * @type {number}
  936. * @constant
  937. */
  938. export const RGB_BPTC_SIGNED_Format = 36494;
  939. /**
  940. * BPTC Unsigned RGB format.
  941. *
  942. * @type {number}
  943. * @constant
  944. */
  945. export const RGB_BPTC_UNSIGNED_Format = 36495;
  946. /**
  947. * RGTC1 Red format.
  948. *
  949. * @type {number}
  950. * @constant
  951. */
  952. export const RED_RGTC1_Format = 36283;
  953. /**
  954. * RGTC1 Signed Red format.
  955. *
  956. * @type {number}
  957. * @constant
  958. */
  959. export const SIGNED_RED_RGTC1_Format = 36284;
  960. /**
  961. * RGTC2 Red Green format.
  962. *
  963. * @type {number}
  964. * @constant
  965. */
  966. export const RED_GREEN_RGTC2_Format = 36285;
  967. /**
  968. * RGTC2 Signed Red Green format.
  969. *
  970. * @type {number}
  971. * @constant
  972. */
  973. export const SIGNED_RED_GREEN_RGTC2_Format = 36286;
  974. /**
  975. * Animations are played once.
  976. *
  977. * @type {number}
  978. * @constant
  979. */
  980. export const LoopOnce = 2200;
  981. /**
  982. * Animations are played with a chosen number of repetitions, each time jumping from
  983. * the end of the clip directly to its beginning.
  984. *
  985. * @type {number}
  986. * @constant
  987. */
  988. export const LoopRepeat = 2201;
  989. /**
  990. * Animations are played with a chosen number of repetitions, alternately playing forward
  991. * and backward.
  992. *
  993. * @type {number}
  994. * @constant
  995. */
  996. export const LoopPingPong = 2202;
  997. /**
  998. * Discrete interpolation mode for keyframe tracks.
  999. *
  1000. * @type {number}
  1001. * @constant
  1002. */
  1003. export const InterpolateDiscrete = 2300;
  1004. /**
  1005. * Linear interpolation mode for keyframe tracks.
  1006. *
  1007. * @type {number}
  1008. * @constant
  1009. */
  1010. export const InterpolateLinear = 2301;
  1011. /**
  1012. * Smooth interpolation mode for keyframe tracks.
  1013. *
  1014. * @type {number}
  1015. * @constant
  1016. */
  1017. export const InterpolateSmooth = 2302;
  1018. /**
  1019. * Zero curvature ending for animations.
  1020. *
  1021. * @type {number}
  1022. * @constant
  1023. */
  1024. export const ZeroCurvatureEnding = 2400;
  1025. /**
  1026. * Zero slope ending for animations.
  1027. *
  1028. * @type {number}
  1029. * @constant
  1030. */
  1031. export const ZeroSlopeEnding = 2401;
  1032. /**
  1033. * Wrap around ending for animations.
  1034. *
  1035. * @type {number}
  1036. * @constant
  1037. */
  1038. export const WrapAroundEnding = 2402;
  1039. /**
  1040. * Default animation blend mode.
  1041. *
  1042. * @type {number}
  1043. * @constant
  1044. */
  1045. export const NormalAnimationBlendMode = 2500;
  1046. /**
  1047. * Additive animation blend mode. Can be used to layer motions on top of
  1048. * each other to build complex performances from smaller re-usable assets.
  1049. *
  1050. * @type {number}
  1051. * @constant
  1052. */
  1053. export const AdditiveAnimationBlendMode = 2501;
  1054. /**
  1055. * For every three vertices draw a single triangle.
  1056. *
  1057. * @type {number}
  1058. * @constant
  1059. */
  1060. export const TrianglesDrawMode = 0;
  1061. /**
  1062. * For each vertex draw a triangle from the last three vertices.
  1063. *
  1064. * @type {number}
  1065. * @constant
  1066. */
  1067. export const TriangleStripDrawMode = 1;
  1068. /**
  1069. * For each vertex draw a triangle from the first vertex and the last two vertices.
  1070. *
  1071. * @type {number}
  1072. * @constant
  1073. */
  1074. export const TriangleFanDrawMode = 2;
  1075. /**
  1076. * The depth value is inverted (1.0 - z) for visualization purposes.
  1077. *
  1078. * @type {number}
  1079. * @constant
  1080. */
  1081. export const BasicDepthPacking = 3200;
  1082. /**
  1083. * The depth value is packed into 32 bit RGBA.
  1084. *
  1085. * @type {number}
  1086. * @constant
  1087. */
  1088. export const RGBADepthPacking = 3201;
  1089. /**
  1090. * The depth value is packed into 24 bit RGB.
  1091. *
  1092. * @type {number}
  1093. * @constant
  1094. */
  1095. export const RGBDepthPacking = 3202;
  1096. /**
  1097. * The depth value is packed into 16 bit RG.
  1098. *
  1099. * @type {number}
  1100. * @constant
  1101. */
  1102. export const RGDepthPacking = 3203;
  1103. /**
  1104. * Normal information is relative to the underlying surface.
  1105. *
  1106. * @type {number}
  1107. * @constant
  1108. */
  1109. export const TangentSpaceNormalMap = 0;
  1110. /**
  1111. * Normal information is relative to the object orientation.
  1112. *
  1113. * @type {number}
  1114. * @constant
  1115. */
  1116. export const ObjectSpaceNormalMap = 1;
  1117. // Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available.
  1118. /**
  1119. * No color space.
  1120. *
  1121. * @type {string}
  1122. * @constant
  1123. */
  1124. export const NoColorSpace = '';
  1125. /**
  1126. * sRGB color space.
  1127. *
  1128. * @type {string}
  1129. * @constant
  1130. */
  1131. export const SRGBColorSpace = 'srgb';
  1132. /**
  1133. * sRGB-linear color space.
  1134. *
  1135. * @type {string}
  1136. * @constant
  1137. */
  1138. export const LinearSRGBColorSpace = 'srgb-linear';
  1139. /**
  1140. * Linear transfer function.
  1141. *
  1142. * @type {string}
  1143. * @constant
  1144. */
  1145. export const LinearTransfer = 'linear';
  1146. /**
  1147. * sRGB transfer function.
  1148. *
  1149. * @type {string}
  1150. * @constant
  1151. */
  1152. export const SRGBTransfer = 'srgb';
  1153. /**
  1154. * No normal map packing.
  1155. *
  1156. * @type {string}
  1157. * @constant
  1158. */
  1159. export const NoNormalPacking = '';
  1160. /**
  1161. * Normal RG packing.
  1162. *
  1163. * @type {string}
  1164. * @constant
  1165. */
  1166. export const NormalRGPacking = 'rg';
  1167. /**
  1168. * Normal GA packing.
  1169. *
  1170. * @type {string}
  1171. * @constant
  1172. */
  1173. export const NormalGAPacking = 'ga';
  1174. /**
  1175. * Sets the stencil buffer value to `0`.
  1176. *
  1177. * @type {number}
  1178. * @constant
  1179. */
  1180. export const ZeroStencilOp = 0;
  1181. /**
  1182. * Keeps the current value.
  1183. *
  1184. * @type {number}
  1185. * @constant
  1186. */
  1187. export const KeepStencilOp = 7680;
  1188. /**
  1189. * Sets the stencil buffer value to the specified reference value.
  1190. *
  1191. * @type {number}
  1192. * @constant
  1193. */
  1194. export const ReplaceStencilOp = 7681;
  1195. /**
  1196. * Increments the current stencil buffer value. Clamps to the maximum representable unsigned value.
  1197. *
  1198. * @type {number}
  1199. * @constant
  1200. */
  1201. export const IncrementStencilOp = 7682;
  1202. /**
  1203. * Decrements the current stencil buffer value. Clamps to `0`.
  1204. *
  1205. * @type {number}
  1206. * @constant
  1207. */
  1208. export const DecrementStencilOp = 7683;
  1209. /**
  1210. * Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing
  1211. * the maximum representable unsigned value.
  1212. *
  1213. * @type {number}
  1214. * @constant
  1215. */
  1216. export const IncrementWrapStencilOp = 34055;
  1217. /**
  1218. * Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable
  1219. * unsigned value when decrementing a stencil buffer value of `0`.
  1220. *
  1221. * @type {number}
  1222. * @constant
  1223. */
  1224. export const DecrementWrapStencilOp = 34056;
  1225. /**
  1226. * Inverts the current stencil buffer value bitwise.
  1227. *
  1228. * @type {number}
  1229. * @constant
  1230. */
  1231. export const InvertStencilOp = 5386;
  1232. /**
  1233. * Will never return true.
  1234. *
  1235. * @type {number}
  1236. * @constant
  1237. */
  1238. export const NeverStencilFunc = 512;
  1239. /**
  1240. * Will return true if the stencil reference value is less than the current stencil value.
  1241. *
  1242. * @type {number}
  1243. * @constant
  1244. */
  1245. export const LessStencilFunc = 513;
  1246. /**
  1247. * Will return true if the stencil reference value is equal to the current stencil value.
  1248. *
  1249. * @type {number}
  1250. * @constant
  1251. */
  1252. export const EqualStencilFunc = 514;
  1253. /**
  1254. * Will return true if the stencil reference value is less than or equal to the current stencil value.
  1255. *
  1256. * @type {number}
  1257. * @constant
  1258. */
  1259. export const LessEqualStencilFunc = 515;
  1260. /**
  1261. * Will return true if the stencil reference value is greater than the current stencil value.
  1262. *
  1263. * @type {number}
  1264. * @constant
  1265. */
  1266. export const GreaterStencilFunc = 516;
  1267. /**
  1268. * Will return true if the stencil reference value is not equal to the current stencil value.
  1269. *
  1270. * @type {number}
  1271. * @constant
  1272. */
  1273. export const NotEqualStencilFunc = 517;
  1274. /**
  1275. * Will return true if the stencil reference value is greater than or equal to the current stencil value.
  1276. *
  1277. * @type {number}
  1278. * @constant
  1279. */
  1280. export const GreaterEqualStencilFunc = 518;
  1281. /**
  1282. * Will always return true.
  1283. *
  1284. * @type {number}
  1285. * @constant
  1286. */
  1287. export const AlwaysStencilFunc = 519;
  1288. /**
  1289. * Never pass.
  1290. *
  1291. * @type {number}
  1292. * @constant
  1293. */
  1294. export const NeverCompare = 512;
  1295. /**
  1296. * Pass if the incoming value is less than the texture value.
  1297. *
  1298. * @type {number}
  1299. * @constant
  1300. */
  1301. export const LessCompare = 513;
  1302. /**
  1303. * Pass if the incoming value equals the texture value.
  1304. *
  1305. * @type {number}
  1306. * @constant
  1307. */
  1308. export const EqualCompare = 514;
  1309. /**
  1310. * Pass if the incoming value is less than or equal to the texture value.
  1311. *
  1312. * @type {number}
  1313. * @constant
  1314. */
  1315. export const LessEqualCompare = 515;
  1316. /**
  1317. * Pass if the incoming value is greater than the texture value.
  1318. *
  1319. * @type {number}
  1320. * @constant
  1321. */
  1322. export const GreaterCompare = 516;
  1323. /**
  1324. * Pass if the incoming value is not equal to the texture value.
  1325. *
  1326. * @type {number}
  1327. * @constant
  1328. */
  1329. export const NotEqualCompare = 517;
  1330. /**
  1331. * Pass if the incoming value is greater than or equal to the texture value.
  1332. *
  1333. * @type {number}
  1334. * @constant
  1335. */
  1336. export const GreaterEqualCompare = 518;
  1337. /**
  1338. * Always pass.
  1339. *
  1340. * @type {number}
  1341. * @constant
  1342. */
  1343. export const AlwaysCompare = 519;
  1344. /**
  1345. * The contents are intended to be specified once by the application, and used many
  1346. * times as the source for drawing and image specification commands.
  1347. *
  1348. * @type {number}
  1349. * @constant
  1350. */
  1351. export const StaticDrawUsage = 35044;
  1352. /**
  1353. * The contents are intended to be respecified repeatedly by the application, and
  1354. * used many times as the source for drawing and image specification commands.
  1355. *
  1356. * @type {number}
  1357. * @constant
  1358. */
  1359. export const DynamicDrawUsage = 35048;
  1360. /**
  1361. * The contents are intended to be specified once by the application, and used at most
  1362. * a few times as the source for drawing and image specification commands.
  1363. *
  1364. * @type {number}
  1365. * @constant
  1366. */
  1367. export const StreamDrawUsage = 35040;
  1368. /**
  1369. * The contents are intended to be specified once by reading data from the 3D API, and queried
  1370. * many times by the application.
  1371. *
  1372. * @type {number}
  1373. * @constant
  1374. */
  1375. export const StaticReadUsage = 35045;
  1376. /**
  1377. * The contents are intended to be respecified repeatedly by reading data from the 3D API, and queried
  1378. * many times by the application.
  1379. *
  1380. * @type {number}
  1381. * @constant
  1382. */
  1383. export const DynamicReadUsage = 35049;
  1384. /**
  1385. * The contents are intended to be specified once by reading data from the 3D API, and queried at most
  1386. * a few times by the application
  1387. *
  1388. * @type {number}
  1389. * @constant
  1390. */
  1391. export const StreamReadUsage = 35041;
  1392. /**
  1393. * The contents are intended to be specified once by reading data from the 3D API, and used many times as
  1394. * the source for WebGL drawing and image specification commands.
  1395. *
  1396. * @type {number}
  1397. * @constant
  1398. */
  1399. export const StaticCopyUsage = 35046;
  1400. /**
  1401. * The contents are intended to be respecified repeatedly by reading data from the 3D API, and used many times
  1402. * as the source for WebGL drawing and image specification commands.
  1403. *
  1404. * @type {number}
  1405. * @constant
  1406. */
  1407. export const DynamicCopyUsage = 35050;
  1408. /**
  1409. * The contents are intended to be specified once by reading data from the 3D API, and used at most a few times
  1410. * as the source for WebGL drawing and image specification commands.
  1411. *
  1412. * @type {number}
  1413. * @constant
  1414. */
  1415. export const StreamCopyUsage = 35042;
  1416. /**
  1417. * GLSL 1 shader code.
  1418. *
  1419. * @type {string}
  1420. * @constant
  1421. */
  1422. export const GLSL1 = '100';
  1423. /**
  1424. * GLSL 3 shader code.
  1425. *
  1426. * @type {string}
  1427. * @constant
  1428. */
  1429. export const GLSL3 = '300 es';
  1430. /**
  1431. * WebGL coordinate system.
  1432. *
  1433. * @type {number}
  1434. * @constant
  1435. */
  1436. export const WebGLCoordinateSystem = 2000;
  1437. /**
  1438. * WebGPU coordinate system.
  1439. *
  1440. * @type {number}
  1441. * @constant
  1442. */
  1443. export const WebGPUCoordinateSystem = 2001;
  1444. /**
  1445. * Represents the different timestamp query types.
  1446. *
  1447. * @type {ConstantsTimestampQuery}
  1448. * @constant
  1449. */
  1450. export const TimestampQuery = {
  1451. COMPUTE: 'compute',
  1452. RENDER: 'render'
  1453. };
  1454. /**
  1455. * Represents mouse buttons and interaction types in context of controls.
  1456. *
  1457. * @type {ConstantsInterpolationSamplingType}
  1458. * @constant
  1459. */
  1460. export const InterpolationSamplingType = {
  1461. PERSPECTIVE: 'perspective',
  1462. LINEAR: 'linear',
  1463. FLAT: 'flat'
  1464. };
  1465. /**
  1466. * Represents the different interpolation sampling modes.
  1467. *
  1468. * @type {ConstantsInterpolationSamplingMode}
  1469. * @constant
  1470. */
  1471. export const InterpolationSamplingMode = {
  1472. NORMAL: 'normal',
  1473. CENTROID: 'centroid',
  1474. SAMPLE: 'sample',
  1475. FIRST: 'first',
  1476. EITHER: 'either'
  1477. };
  1478. /**
  1479. * This type represents mouse buttons and interaction types in context of controls.
  1480. *
  1481. * @typedef {Object} ConstantsMouse
  1482. * @property {number} MIDDLE - The left mouse button.
  1483. * @property {number} LEFT - The middle mouse button.
  1484. * @property {number} RIGHT - The right mouse button.
  1485. * @property {number} ROTATE - A rotate interaction.
  1486. * @property {number} DOLLY - A dolly interaction.
  1487. * @property {number} PAN - A pan interaction.
  1488. **/
  1489. /**
  1490. * This type represents touch interaction types in context of controls.
  1491. *
  1492. * @typedef {Object} ConstantsTouch
  1493. * @property {number} ROTATE - A rotate interaction.
  1494. * @property {number} PAN - A pan interaction.
  1495. * @property {number} DOLLY_PAN - The dolly-pan interaction.
  1496. * @property {number} DOLLY_ROTATE - A dolly-rotate interaction.
  1497. **/
  1498. /**
  1499. * This type represents the different timestamp query types.
  1500. *
  1501. * @typedef {Object} ConstantsTimestampQuery
  1502. * @property {string} COMPUTE - A `compute` timestamp query.
  1503. * @property {string} RENDER - A `render` timestamp query.
  1504. **/
  1505. /**
  1506. * Represents the different interpolation sampling types.
  1507. *
  1508. * @typedef {Object} ConstantsInterpolationSamplingType
  1509. * @property {string} PERSPECTIVE - Perspective-correct interpolation.
  1510. * @property {string} LINEAR - Linear interpolation.
  1511. * @property {string} FLAT - Flat interpolation.
  1512. */
  1513. /**
  1514. * Represents the different interpolation sampling modes.
  1515. *
  1516. * @typedef {Object} ConstantsInterpolationSamplingMode
  1517. * @property {string} NORMAL - Normal sampling mode.
  1518. * @property {string} CENTROID - Centroid sampling mode.
  1519. * @property {string} SAMPLE - Sample-specific sampling mode.
  1520. * @property {string} FIRST - Flat interpolation using the first vertex.
  1521. * @property {string} EITHER - Flat interpolation using either vertex.
  1522. */
粤ICP备19079148号