constants.js 23 KB

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