constants.mjs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  1. /*!
  2. * @pixi/constants - v6.5.10
  3. * Compiled Thu, 06 Jul 2023 15:25:11 UTC
  4. *
  5. * @pixi/constants is licensed under the MIT License.
  6. * http://www.opensource.org/licenses/mit-license
  7. */
  8. /**
  9. * Different types of environments for WebGL.
  10. * @static
  11. * @memberof PIXI
  12. * @name ENV
  13. * @enum {number}
  14. * @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility
  15. * with older / less advanced devices. If you experience unexplained flickering prefer this environment.
  16. * @property {number} WEBGL - Version 1 of WebGL
  17. * @property {number} WEBGL2 - Version 2 of WebGL
  18. */
  19. var ENV;
  20. (function (ENV) {
  21. ENV[ENV["WEBGL_LEGACY"] = 0] = "WEBGL_LEGACY";
  22. ENV[ENV["WEBGL"] = 1] = "WEBGL";
  23. ENV[ENV["WEBGL2"] = 2] = "WEBGL2";
  24. })(ENV || (ENV = {}));
  25. /**
  26. * Constant to identify the Renderer Type.
  27. * @static
  28. * @memberof PIXI
  29. * @name RENDERER_TYPE
  30. * @enum {number}
  31. * @property {number} UNKNOWN - Unknown render type.
  32. * @property {number} WEBGL - WebGL render type.
  33. * @property {number} CANVAS - Canvas render type.
  34. */
  35. var RENDERER_TYPE;
  36. (function (RENDERER_TYPE) {
  37. RENDERER_TYPE[RENDERER_TYPE["UNKNOWN"] = 0] = "UNKNOWN";
  38. RENDERER_TYPE[RENDERER_TYPE["WEBGL"] = 1] = "WEBGL";
  39. RENDERER_TYPE[RENDERER_TYPE["CANVAS"] = 2] = "CANVAS";
  40. })(RENDERER_TYPE || (RENDERER_TYPE = {}));
  41. /**
  42. * Bitwise OR of masks that indicate the buffers to be cleared.
  43. * @static
  44. * @memberof PIXI
  45. * @name BUFFER_BITS
  46. * @enum {number}
  47. * @property {number} COLOR - Indicates the buffers currently enabled for color writing.
  48. * @property {number} DEPTH - Indicates the depth buffer.
  49. * @property {number} STENCIL - Indicates the stencil buffer.
  50. */
  51. var BUFFER_BITS;
  52. (function (BUFFER_BITS) {
  53. BUFFER_BITS[BUFFER_BITS["COLOR"] = 16384] = "COLOR";
  54. BUFFER_BITS[BUFFER_BITS["DEPTH"] = 256] = "DEPTH";
  55. BUFFER_BITS[BUFFER_BITS["STENCIL"] = 1024] = "STENCIL";
  56. })(BUFFER_BITS || (BUFFER_BITS = {}));
  57. /**
  58. * Various blend modes supported by PIXI.
  59. *
  60. * IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.
  61. * Anything else will silently act like NORMAL.
  62. * @memberof PIXI
  63. * @name BLEND_MODES
  64. * @enum {number}
  65. * @property {number} NORMAL -
  66. * @property {number} ADD -
  67. * @property {number} MULTIPLY -
  68. * @property {number} SCREEN -
  69. * @property {number} OVERLAY -
  70. * @property {number} DARKEN -
  71. * @property {number} LIGHTEN -
  72. * @property {number} COLOR_DODGE -
  73. * @property {number} COLOR_BURN -
  74. * @property {number} HARD_LIGHT -
  75. * @property {number} SOFT_LIGHT -
  76. * @property {number} DIFFERENCE -
  77. * @property {number} EXCLUSION -
  78. * @property {number} HUE -
  79. * @property {number} SATURATION -
  80. * @property {number} COLOR -
  81. * @property {number} LUMINOSITY -
  82. * @property {number} NORMAL_NPM -
  83. * @property {number} ADD_NPM -
  84. * @property {number} SCREEN_NPM -
  85. * @property {number} NONE -
  86. * @property {number} SRC_IN -
  87. * @property {number} SRC_OUT -
  88. * @property {number} SRC_ATOP -
  89. * @property {number} DST_OVER -
  90. * @property {number} DST_IN -
  91. * @property {number} DST_OUT -
  92. * @property {number} DST_ATOP -
  93. * @property {number} SUBTRACT -
  94. * @property {number} SRC_OVER -
  95. * @property {number} ERASE -
  96. * @property {number} XOR -
  97. */
  98. var BLEND_MODES;
  99. (function (BLEND_MODES) {
  100. BLEND_MODES[BLEND_MODES["NORMAL"] = 0] = "NORMAL";
  101. BLEND_MODES[BLEND_MODES["ADD"] = 1] = "ADD";
  102. BLEND_MODES[BLEND_MODES["MULTIPLY"] = 2] = "MULTIPLY";
  103. BLEND_MODES[BLEND_MODES["SCREEN"] = 3] = "SCREEN";
  104. BLEND_MODES[BLEND_MODES["OVERLAY"] = 4] = "OVERLAY";
  105. BLEND_MODES[BLEND_MODES["DARKEN"] = 5] = "DARKEN";
  106. BLEND_MODES[BLEND_MODES["LIGHTEN"] = 6] = "LIGHTEN";
  107. BLEND_MODES[BLEND_MODES["COLOR_DODGE"] = 7] = "COLOR_DODGE";
  108. BLEND_MODES[BLEND_MODES["COLOR_BURN"] = 8] = "COLOR_BURN";
  109. BLEND_MODES[BLEND_MODES["HARD_LIGHT"] = 9] = "HARD_LIGHT";
  110. BLEND_MODES[BLEND_MODES["SOFT_LIGHT"] = 10] = "SOFT_LIGHT";
  111. BLEND_MODES[BLEND_MODES["DIFFERENCE"] = 11] = "DIFFERENCE";
  112. BLEND_MODES[BLEND_MODES["EXCLUSION"] = 12] = "EXCLUSION";
  113. BLEND_MODES[BLEND_MODES["HUE"] = 13] = "HUE";
  114. BLEND_MODES[BLEND_MODES["SATURATION"] = 14] = "SATURATION";
  115. BLEND_MODES[BLEND_MODES["COLOR"] = 15] = "COLOR";
  116. BLEND_MODES[BLEND_MODES["LUMINOSITY"] = 16] = "LUMINOSITY";
  117. BLEND_MODES[BLEND_MODES["NORMAL_NPM"] = 17] = "NORMAL_NPM";
  118. BLEND_MODES[BLEND_MODES["ADD_NPM"] = 18] = "ADD_NPM";
  119. BLEND_MODES[BLEND_MODES["SCREEN_NPM"] = 19] = "SCREEN_NPM";
  120. BLEND_MODES[BLEND_MODES["NONE"] = 20] = "NONE";
  121. BLEND_MODES[BLEND_MODES["SRC_OVER"] = 0] = "SRC_OVER";
  122. BLEND_MODES[BLEND_MODES["SRC_IN"] = 21] = "SRC_IN";
  123. BLEND_MODES[BLEND_MODES["SRC_OUT"] = 22] = "SRC_OUT";
  124. BLEND_MODES[BLEND_MODES["SRC_ATOP"] = 23] = "SRC_ATOP";
  125. BLEND_MODES[BLEND_MODES["DST_OVER"] = 24] = "DST_OVER";
  126. BLEND_MODES[BLEND_MODES["DST_IN"] = 25] = "DST_IN";
  127. BLEND_MODES[BLEND_MODES["DST_OUT"] = 26] = "DST_OUT";
  128. BLEND_MODES[BLEND_MODES["DST_ATOP"] = 27] = "DST_ATOP";
  129. BLEND_MODES[BLEND_MODES["ERASE"] = 26] = "ERASE";
  130. BLEND_MODES[BLEND_MODES["SUBTRACT"] = 28] = "SUBTRACT";
  131. BLEND_MODES[BLEND_MODES["XOR"] = 29] = "XOR";
  132. })(BLEND_MODES || (BLEND_MODES = {}));
  133. /**
  134. * Various webgl draw modes. These can be used to specify which GL drawMode to use
  135. * under certain situations and renderers.
  136. * @memberof PIXI
  137. * @static
  138. * @name DRAW_MODES
  139. * @enum {number}
  140. * @property {number} POINTS -
  141. * @property {number} LINES -
  142. * @property {number} LINE_LOOP -
  143. * @property {number} LINE_STRIP -
  144. * @property {number} TRIANGLES -
  145. * @property {number} TRIANGLE_STRIP -
  146. * @property {number} TRIANGLE_FAN -
  147. */
  148. var DRAW_MODES;
  149. (function (DRAW_MODES) {
  150. DRAW_MODES[DRAW_MODES["POINTS"] = 0] = "POINTS";
  151. DRAW_MODES[DRAW_MODES["LINES"] = 1] = "LINES";
  152. DRAW_MODES[DRAW_MODES["LINE_LOOP"] = 2] = "LINE_LOOP";
  153. DRAW_MODES[DRAW_MODES["LINE_STRIP"] = 3] = "LINE_STRIP";
  154. DRAW_MODES[DRAW_MODES["TRIANGLES"] = 4] = "TRIANGLES";
  155. DRAW_MODES[DRAW_MODES["TRIANGLE_STRIP"] = 5] = "TRIANGLE_STRIP";
  156. DRAW_MODES[DRAW_MODES["TRIANGLE_FAN"] = 6] = "TRIANGLE_FAN";
  157. })(DRAW_MODES || (DRAW_MODES = {}));
  158. /**
  159. * Various GL texture/resources formats.
  160. * @memberof PIXI
  161. * @static
  162. * @name FORMATS
  163. * @enum {number}
  164. * @property {number} [RGBA=6408] -
  165. * @property {number} [RGB=6407] -
  166. * @property {number} [RG=33319] -
  167. * @property {number} [RED=6403] -
  168. * @property {number} [RGBA_INTEGER=36249] -
  169. * @property {number} [RGB_INTEGER=36248] -
  170. * @property {number} [RG_INTEGER=33320] -
  171. * @property {number} [RED_INTEGER=36244] -
  172. * @property {number} [ALPHA=6406] -
  173. * @property {number} [LUMINANCE=6409] -
  174. * @property {number} [LUMINANCE_ALPHA=6410] -
  175. * @property {number} [DEPTH_COMPONENT=6402] -
  176. * @property {number} [DEPTH_STENCIL=34041] -
  177. */
  178. var FORMATS;
  179. (function (FORMATS) {
  180. FORMATS[FORMATS["RGBA"] = 6408] = "RGBA";
  181. FORMATS[FORMATS["RGB"] = 6407] = "RGB";
  182. FORMATS[FORMATS["RG"] = 33319] = "RG";
  183. FORMATS[FORMATS["RED"] = 6403] = "RED";
  184. FORMATS[FORMATS["RGBA_INTEGER"] = 36249] = "RGBA_INTEGER";
  185. FORMATS[FORMATS["RGB_INTEGER"] = 36248] = "RGB_INTEGER";
  186. FORMATS[FORMATS["RG_INTEGER"] = 33320] = "RG_INTEGER";
  187. FORMATS[FORMATS["RED_INTEGER"] = 36244] = "RED_INTEGER";
  188. FORMATS[FORMATS["ALPHA"] = 6406] = "ALPHA";
  189. FORMATS[FORMATS["LUMINANCE"] = 6409] = "LUMINANCE";
  190. FORMATS[FORMATS["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
  191. FORMATS[FORMATS["DEPTH_COMPONENT"] = 6402] = "DEPTH_COMPONENT";
  192. FORMATS[FORMATS["DEPTH_STENCIL"] = 34041] = "DEPTH_STENCIL";
  193. })(FORMATS || (FORMATS = {}));
  194. /**
  195. * Various GL target types.
  196. * @memberof PIXI
  197. * @static
  198. * @name TARGETS
  199. * @enum {number}
  200. * @property {number} [TEXTURE_2D=3553] -
  201. * @property {number} [TEXTURE_CUBE_MAP=34067] -
  202. * @property {number} [TEXTURE_2D_ARRAY=35866] -
  203. * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_X=34069] -
  204. * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_X=34070] -
  205. * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Y=34071] -
  206. * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Y=34072] -
  207. * @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Z=34073] -
  208. * @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Z=34074] -
  209. */
  210. var TARGETS;
  211. (function (TARGETS) {
  212. TARGETS[TARGETS["TEXTURE_2D"] = 3553] = "TEXTURE_2D";
  213. TARGETS[TARGETS["TEXTURE_CUBE_MAP"] = 34067] = "TEXTURE_CUBE_MAP";
  214. TARGETS[TARGETS["TEXTURE_2D_ARRAY"] = 35866] = "TEXTURE_2D_ARRAY";
  215. TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_X"] = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X";
  216. TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_X"] = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X";
  217. TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_Y"] = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y";
  218. TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_Y"] = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y";
  219. TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_Z"] = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z";
  220. TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_Z"] = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z";
  221. })(TARGETS || (TARGETS = {}));
  222. /**
  223. * Various GL data format types.
  224. * @memberof PIXI
  225. * @static
  226. * @name TYPES
  227. * @enum {number}
  228. * @property {number} [UNSIGNED_BYTE=5121] -
  229. * @property {number} [UNSIGNED_SHORT=5123] -
  230. * @property {number} [UNSIGNED_SHORT_5_6_5=33635] -
  231. * @property {number} [UNSIGNED_SHORT_4_4_4_4=32819] -
  232. * @property {number} [UNSIGNED_SHORT_5_5_5_1=32820] -
  233. * @property {number} [UNSIGNED_INT=5125] -
  234. * @property {number} [UNSIGNED_INT_10F_11F_11F_REV=35899] -
  235. * @property {number} [UNSIGNED_INT_2_10_10_10_REV=33640] -
  236. * @property {number} [UNSIGNED_INT_24_8=34042] -
  237. * @property {number} [UNSIGNED_INT_5_9_9_9_REV=35902] -
  238. * @property {number} [BYTE=5120] -
  239. * @property {number} [SHORT=5122] -
  240. * @property {number} [INT=5124] -
  241. * @property {number} [FLOAT=5126] -
  242. * @property {number} [FLOAT_32_UNSIGNED_INT_24_8_REV=36269] -
  243. * @property {number} [HALF_FLOAT=36193] -
  244. */
  245. var TYPES;
  246. (function (TYPES) {
  247. TYPES[TYPES["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
  248. TYPES[TYPES["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
  249. TYPES[TYPES["UNSIGNED_SHORT_5_6_5"] = 33635] = "UNSIGNED_SHORT_5_6_5";
  250. TYPES[TYPES["UNSIGNED_SHORT_4_4_4_4"] = 32819] = "UNSIGNED_SHORT_4_4_4_4";
  251. TYPES[TYPES["UNSIGNED_SHORT_5_5_5_1"] = 32820] = "UNSIGNED_SHORT_5_5_5_1";
  252. TYPES[TYPES["UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
  253. TYPES[TYPES["UNSIGNED_INT_10F_11F_11F_REV"] = 35899] = "UNSIGNED_INT_10F_11F_11F_REV";
  254. TYPES[TYPES["UNSIGNED_INT_2_10_10_10_REV"] = 33640] = "UNSIGNED_INT_2_10_10_10_REV";
  255. TYPES[TYPES["UNSIGNED_INT_24_8"] = 34042] = "UNSIGNED_INT_24_8";
  256. TYPES[TYPES["UNSIGNED_INT_5_9_9_9_REV"] = 35902] = "UNSIGNED_INT_5_9_9_9_REV";
  257. TYPES[TYPES["BYTE"] = 5120] = "BYTE";
  258. TYPES[TYPES["SHORT"] = 5122] = "SHORT";
  259. TYPES[TYPES["INT"] = 5124] = "INT";
  260. TYPES[TYPES["FLOAT"] = 5126] = "FLOAT";
  261. TYPES[TYPES["FLOAT_32_UNSIGNED_INT_24_8_REV"] = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV";
  262. TYPES[TYPES["HALF_FLOAT"] = 36193] = "HALF_FLOAT";
  263. })(TYPES || (TYPES = {}));
  264. /**
  265. * Various sampler types. Correspond to `sampler`, `isampler`, `usampler` GLSL types respectively.
  266. * WebGL1 works only with FLOAT.
  267. * @memberof PIXI
  268. * @static
  269. * @name SAMPLER_TYPES
  270. * @enum {number}
  271. * @property {number} [FLOAT=0] -
  272. * @property {number} [INT=1] -
  273. * @property {number} [UINT=2] -
  274. */
  275. var SAMPLER_TYPES;
  276. (function (SAMPLER_TYPES) {
  277. SAMPLER_TYPES[SAMPLER_TYPES["FLOAT"] = 0] = "FLOAT";
  278. SAMPLER_TYPES[SAMPLER_TYPES["INT"] = 1] = "INT";
  279. SAMPLER_TYPES[SAMPLER_TYPES["UINT"] = 2] = "UINT";
  280. })(SAMPLER_TYPES || (SAMPLER_TYPES = {}));
  281. /**
  282. * The scale modes that are supported by pixi.
  283. *
  284. * The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations.
  285. * It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.
  286. * @memberof PIXI
  287. * @static
  288. * @name SCALE_MODES
  289. * @enum {number}
  290. * @property {number} LINEAR Smooth scaling
  291. * @property {number} NEAREST Pixelating scaling
  292. */
  293. var SCALE_MODES;
  294. (function (SCALE_MODES) {
  295. SCALE_MODES[SCALE_MODES["NEAREST"] = 0] = "NEAREST";
  296. SCALE_MODES[SCALE_MODES["LINEAR"] = 1] = "LINEAR";
  297. })(SCALE_MODES || (SCALE_MODES = {}));
  298. /**
  299. * The wrap modes that are supported by pixi.
  300. *
  301. * The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations.
  302. * It can be re-assigned to either CLAMP or REPEAT, depending upon suitability.
  303. * If the texture is non power of two then clamp will be used regardless as WebGL can
  304. * only use REPEAT if the texture is po2.
  305. *
  306. * This property only affects WebGL.
  307. * @name WRAP_MODES
  308. * @memberof PIXI
  309. * @static
  310. * @enum {number}
  311. * @property {number} CLAMP - The textures uvs are clamped
  312. * @property {number} REPEAT - The texture uvs tile and repeat
  313. * @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring
  314. */
  315. var WRAP_MODES;
  316. (function (WRAP_MODES) {
  317. WRAP_MODES[WRAP_MODES["CLAMP"] = 33071] = "CLAMP";
  318. WRAP_MODES[WRAP_MODES["REPEAT"] = 10497] = "REPEAT";
  319. WRAP_MODES[WRAP_MODES["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
  320. })(WRAP_MODES || (WRAP_MODES = {}));
  321. /**
  322. * Mipmap filtering modes that are supported by pixi.
  323. *
  324. * The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering.
  325. * Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`,
  326. * or its `POW2` and texture dimensions are powers of 2.
  327. * Due to platform restriction, `ON` option will work like `POW2` for webgl-1.
  328. *
  329. * This property only affects WebGL.
  330. * @name MIPMAP_MODES
  331. * @memberof PIXI
  332. * @static
  333. * @enum {number}
  334. * @property {number} OFF - No mipmaps
  335. * @property {number} POW2 - Generate mipmaps if texture dimensions are pow2
  336. * @property {number} ON - Always generate mipmaps
  337. * @property {number} ON_MANUAL - Use mipmaps, but do not auto-generate them; this is used with a resource
  338. * that supports buffering each level-of-detail.
  339. */
  340. var MIPMAP_MODES;
  341. (function (MIPMAP_MODES) {
  342. MIPMAP_MODES[MIPMAP_MODES["OFF"] = 0] = "OFF";
  343. MIPMAP_MODES[MIPMAP_MODES["POW2"] = 1] = "POW2";
  344. MIPMAP_MODES[MIPMAP_MODES["ON"] = 2] = "ON";
  345. MIPMAP_MODES[MIPMAP_MODES["ON_MANUAL"] = 3] = "ON_MANUAL";
  346. })(MIPMAP_MODES || (MIPMAP_MODES = {}));
  347. /**
  348. * How to treat textures with premultiplied alpha
  349. * @name ALPHA_MODES
  350. * @memberof PIXI
  351. * @static
  352. * @enum {number}
  353. * @property {number} NO_PREMULTIPLIED_ALPHA - Source is not premultiplied, leave it like that.
  354. * Option for compressed and data textures that are created from typed arrays.
  355. * @property {number} PREMULTIPLY_ON_UPLOAD - Source is not premultiplied, premultiply on upload.
  356. * Default option, used for all loaded images.
  357. * @property {number} PREMULTIPLIED_ALPHA - Source is already premultiplied
  358. * Example: spine atlases with `_pma` suffix.
  359. * @property {number} NPM - Alias for NO_PREMULTIPLIED_ALPHA.
  360. * @property {number} UNPACK - Default option, alias for PREMULTIPLY_ON_UPLOAD.
  361. * @property {number} PMA - Alias for PREMULTIPLIED_ALPHA.
  362. */
  363. var ALPHA_MODES;
  364. (function (ALPHA_MODES) {
  365. ALPHA_MODES[ALPHA_MODES["NPM"] = 0] = "NPM";
  366. ALPHA_MODES[ALPHA_MODES["UNPACK"] = 1] = "UNPACK";
  367. ALPHA_MODES[ALPHA_MODES["PMA"] = 2] = "PMA";
  368. ALPHA_MODES[ALPHA_MODES["NO_PREMULTIPLIED_ALPHA"] = 0] = "NO_PREMULTIPLIED_ALPHA";
  369. ALPHA_MODES[ALPHA_MODES["PREMULTIPLY_ON_UPLOAD"] = 1] = "PREMULTIPLY_ON_UPLOAD";
  370. ALPHA_MODES[ALPHA_MODES["PREMULTIPLY_ALPHA"] = 2] = "PREMULTIPLY_ALPHA";
  371. ALPHA_MODES[ALPHA_MODES["PREMULTIPLIED_ALPHA"] = 2] = "PREMULTIPLIED_ALPHA";
  372. })(ALPHA_MODES || (ALPHA_MODES = {}));
  373. /**
  374. * Configure whether filter textures are cleared after binding.
  375. *
  376. * Filter textures need not be cleared if the filter does not use pixel blending. {@link CLEAR_MODES.BLIT} will detect
  377. * this and skip clearing as an optimization.
  378. * @name CLEAR_MODES
  379. * @memberof PIXI
  380. * @static
  381. * @enum {number}
  382. * @property {number} BLEND - Do not clear the filter texture. The filter's output will blend on top of the output texture.
  383. * @property {number} CLEAR - Always clear the filter texture.
  384. * @property {number} BLIT - Clear only if {@link FilterSystem.forceClear} is set or if the filter uses pixel blending.
  385. * @property {number} NO - Alias for BLEND, same as `false` in earlier versions
  386. * @property {number} YES - Alias for CLEAR, same as `true` in earlier versions
  387. * @property {number} AUTO - Alias for BLIT
  388. */
  389. var CLEAR_MODES;
  390. (function (CLEAR_MODES) {
  391. CLEAR_MODES[CLEAR_MODES["NO"] = 0] = "NO";
  392. CLEAR_MODES[CLEAR_MODES["YES"] = 1] = "YES";
  393. CLEAR_MODES[CLEAR_MODES["AUTO"] = 2] = "AUTO";
  394. CLEAR_MODES[CLEAR_MODES["BLEND"] = 0] = "BLEND";
  395. CLEAR_MODES[CLEAR_MODES["CLEAR"] = 1] = "CLEAR";
  396. CLEAR_MODES[CLEAR_MODES["BLIT"] = 2] = "BLIT";
  397. })(CLEAR_MODES || (CLEAR_MODES = {}));
  398. /**
  399. * The gc modes that are supported by pixi.
  400. *
  401. * The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO
  402. * If set to GC_MODE, the renderer will occasionally check textures usage. If they are not
  403. * used for a specified period of time they will be removed from the GPU. They will of course
  404. * be uploaded again when they are required. This is a silent behind the scenes process that
  405. * should ensure that the GPU does not get filled up.
  406. *
  407. * Handy for mobile devices!
  408. * This property only affects WebGL.
  409. * @name GC_MODES
  410. * @enum {number}
  411. * @static
  412. * @memberof PIXI
  413. * @property {number} AUTO - Garbage collection will happen periodically automatically
  414. * @property {number} MANUAL - Garbage collection will need to be called manually
  415. */
  416. var GC_MODES;
  417. (function (GC_MODES) {
  418. GC_MODES[GC_MODES["AUTO"] = 0] = "AUTO";
  419. GC_MODES[GC_MODES["MANUAL"] = 1] = "MANUAL";
  420. })(GC_MODES || (GC_MODES = {}));
  421. /**
  422. * Constants that specify float precision in shaders.
  423. * @name PRECISION
  424. * @memberof PIXI
  425. * @constant
  426. * @static
  427. * @enum {string}
  428. * @property {string} [LOW='lowp'] -
  429. * @property {string} [MEDIUM='mediump'] -
  430. * @property {string} [HIGH='highp'] -
  431. */
  432. var PRECISION;
  433. (function (PRECISION) {
  434. PRECISION["LOW"] = "lowp";
  435. PRECISION["MEDIUM"] = "mediump";
  436. PRECISION["HIGH"] = "highp";
  437. })(PRECISION || (PRECISION = {}));
  438. /**
  439. * Constants for mask implementations.
  440. * We use `type` suffix because it leads to very different behaviours
  441. * @name MASK_TYPES
  442. * @memberof PIXI
  443. * @static
  444. * @enum {number}
  445. * @property {number} NONE - Mask is ignored
  446. * @property {number} SCISSOR - Scissor mask, rectangle on screen, cheap
  447. * @property {number} STENCIL - Stencil mask, 1-bit, medium, works only if renderer supports stencil
  448. * @property {number} SPRITE - Mask that uses SpriteMaskFilter, uses temporary RenderTexture
  449. * @property {number} COLOR - Color mask (RGBA)
  450. */
  451. var MASK_TYPES;
  452. (function (MASK_TYPES) {
  453. MASK_TYPES[MASK_TYPES["NONE"] = 0] = "NONE";
  454. MASK_TYPES[MASK_TYPES["SCISSOR"] = 1] = "SCISSOR";
  455. MASK_TYPES[MASK_TYPES["STENCIL"] = 2] = "STENCIL";
  456. MASK_TYPES[MASK_TYPES["SPRITE"] = 3] = "SPRITE";
  457. MASK_TYPES[MASK_TYPES["COLOR"] = 4] = "COLOR";
  458. })(MASK_TYPES || (MASK_TYPES = {}));
  459. /**
  460. * Bitwise OR of masks that indicate the color channels that are rendered to.
  461. * @static
  462. * @memberof PIXI
  463. * @name COLOR_MASK_BITS
  464. * @enum {number}
  465. * @property {number} RED - Red channel.
  466. * @property {number} GREEN - Green channel
  467. * @property {number} BLUE - Blue channel.
  468. * @property {number} ALPHA - Alpha channel.
  469. */
  470. var COLOR_MASK_BITS;
  471. (function (COLOR_MASK_BITS) {
  472. COLOR_MASK_BITS[COLOR_MASK_BITS["RED"] = 1] = "RED";
  473. COLOR_MASK_BITS[COLOR_MASK_BITS["GREEN"] = 2] = "GREEN";
  474. COLOR_MASK_BITS[COLOR_MASK_BITS["BLUE"] = 4] = "BLUE";
  475. COLOR_MASK_BITS[COLOR_MASK_BITS["ALPHA"] = 8] = "ALPHA";
  476. })(COLOR_MASK_BITS || (COLOR_MASK_BITS = {}));
  477. /**
  478. * Constants for multi-sampling antialiasing.
  479. * @see PIXI.Framebuffer#multisample
  480. * @name MSAA_QUALITY
  481. * @memberof PIXI
  482. * @static
  483. * @enum {number}
  484. * @property {number} NONE - No multisampling for this renderTexture
  485. * @property {number} LOW - Try 2 samples
  486. * @property {number} MEDIUM - Try 4 samples
  487. * @property {number} HIGH - Try 8 samples
  488. */
  489. var MSAA_QUALITY;
  490. (function (MSAA_QUALITY) {
  491. MSAA_QUALITY[MSAA_QUALITY["NONE"] = 0] = "NONE";
  492. MSAA_QUALITY[MSAA_QUALITY["LOW"] = 2] = "LOW";
  493. MSAA_QUALITY[MSAA_QUALITY["MEDIUM"] = 4] = "MEDIUM";
  494. MSAA_QUALITY[MSAA_QUALITY["HIGH"] = 8] = "HIGH";
  495. })(MSAA_QUALITY || (MSAA_QUALITY = {}));
  496. /**
  497. * Constants for various buffer types in Pixi
  498. * @see PIXI.BUFFER_TYPE
  499. * @name BUFFER_TYPE
  500. * @memberof PIXI
  501. * @static
  502. * @enum {number}
  503. * @property {number} ELEMENT_ARRAY_BUFFER - buffer type for using as an index buffer
  504. * @property {number} ARRAY_BUFFER - buffer type for using attribute data
  505. * @property {number} UNIFORM_BUFFER - the buffer type is for uniform buffer objects
  506. */
  507. var BUFFER_TYPE;
  508. (function (BUFFER_TYPE) {
  509. BUFFER_TYPE[BUFFER_TYPE["ELEMENT_ARRAY_BUFFER"] = 34963] = "ELEMENT_ARRAY_BUFFER";
  510. BUFFER_TYPE[BUFFER_TYPE["ARRAY_BUFFER"] = 34962] = "ARRAY_BUFFER";
  511. // NOT YET SUPPORTED
  512. BUFFER_TYPE[BUFFER_TYPE["UNIFORM_BUFFER"] = 35345] = "UNIFORM_BUFFER";
  513. })(BUFFER_TYPE || (BUFFER_TYPE = {}));
  514. export { ALPHA_MODES, BLEND_MODES, BUFFER_BITS, BUFFER_TYPE, CLEAR_MODES, COLOR_MASK_BITS, DRAW_MODES, ENV, FORMATS, GC_MODES, MASK_TYPES, MIPMAP_MODES, MSAA_QUALITY, PRECISION, RENDERER_TYPE, SAMPLER_TYPES, SCALE_MODES, TARGETS, TYPES, WRAP_MODES };
  515. //# sourceMappingURL=constants.mjs.map