Socket
Socket
Sign inDemoInstall

@pixi/settings

Package Overview
Dependencies
Maintainers
3
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/settings - npm Package Compare versions

Comparing version 6.5.3 to 7.0.0-alpha

892

dist/cjs/settings.js
/*!
* @pixi/settings - v6.5.3
* Compiled Fri, 09 Sep 2022 13:55:20 UTC
* @pixi/settings - v7.0.0-alpha
* Compiled Fri, 09 Sep 2022 16:09:18 UTC
*

@@ -13,4 +13,4 @@ * @pixi/settings is licensed under the MIT License.

/*!
* @pixi/constants - v6.5.3
* Compiled Fri, 09 Sep 2022 13:55:20 UTC
* @pixi/constants - v7.0.0-alpha
* Compiled Fri, 09 Sep 2022 16:09:18 UTC
*

@@ -20,526 +20,50 @@ * @pixi/constants is licensed under the MIT License.

*/
/**
* Different types of environments for WebGL.
* @static
* @memberof PIXI
* @name ENV
* @enum {number}
* @property {number} WEBGL_LEGACY - Used for older v1 WebGL devices. PixiJS will aim to ensure compatibility
* with older / less advanced devices. If you experience unexplained flickering prefer this environment.
* @property {number} WEBGL - Version 1 of WebGL
* @property {number} WEBGL2 - Version 2 of WebGL
*/
var ENV;
(function (ENV) {
ENV[ENV["WEBGL_LEGACY"] = 0] = "WEBGL_LEGACY";
ENV[ENV["WEBGL"] = 1] = "WEBGL";
ENV[ENV["WEBGL2"] = 2] = "WEBGL2";
})(ENV || (ENV = {}));
/**
* Constant to identify the Renderer Type.
* @static
* @memberof PIXI
* @name RENDERER_TYPE
* @enum {number}
* @property {number} UNKNOWN - Unknown render type.
* @property {number} WEBGL - WebGL render type.
* @property {number} CANVAS - Canvas render type.
*/
var RENDERER_TYPE;
(function (RENDERER_TYPE) {
RENDERER_TYPE[RENDERER_TYPE["UNKNOWN"] = 0] = "UNKNOWN";
RENDERER_TYPE[RENDERER_TYPE["WEBGL"] = 1] = "WEBGL";
RENDERER_TYPE[RENDERER_TYPE["CANVAS"] = 2] = "CANVAS";
})(RENDERER_TYPE || (RENDERER_TYPE = {}));
/**
* Bitwise OR of masks that indicate the buffers to be cleared.
* @static
* @memberof PIXI
* @name BUFFER_BITS
* @enum {number}
* @property {number} COLOR - Indicates the buffers currently enabled for color writing.
* @property {number} DEPTH - Indicates the depth buffer.
* @property {number} STENCIL - Indicates the stencil buffer.
*/
var BUFFER_BITS;
(function (BUFFER_BITS) {
BUFFER_BITS[BUFFER_BITS["COLOR"] = 16384] = "COLOR";
BUFFER_BITS[BUFFER_BITS["DEPTH"] = 256] = "DEPTH";
BUFFER_BITS[BUFFER_BITS["STENCIL"] = 1024] = "STENCIL";
})(BUFFER_BITS || (BUFFER_BITS = {}));
/**
* Various blend modes supported by PIXI.
*
* IMPORTANT - The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.
* Anything else will silently act like NORMAL.
* @memberof PIXI
* @name BLEND_MODES
* @enum {number}
* @property {number} NORMAL -
* @property {number} ADD -
* @property {number} MULTIPLY -
* @property {number} SCREEN -
* @property {number} OVERLAY -
* @property {number} DARKEN -
* @property {number} LIGHTEN -
* @property {number} COLOR_DODGE -
* @property {number} COLOR_BURN -
* @property {number} HARD_LIGHT -
* @property {number} SOFT_LIGHT -
* @property {number} DIFFERENCE -
* @property {number} EXCLUSION -
* @property {number} HUE -
* @property {number} SATURATION -
* @property {number} COLOR -
* @property {number} LUMINOSITY -
* @property {number} NORMAL_NPM -
* @property {number} ADD_NPM -
* @property {number} SCREEN_NPM -
* @property {number} NONE -
* @property {number} SRC_IN -
* @property {number} SRC_OUT -
* @property {number} SRC_ATOP -
* @property {number} DST_OVER -
* @property {number} DST_IN -
* @property {number} DST_OUT -
* @property {number} DST_ATOP -
* @property {number} SUBTRACT -
* @property {number} SRC_OVER -
* @property {number} ERASE -
* @property {number} XOR -
*/
var BLEND_MODES;
(function (BLEND_MODES) {
BLEND_MODES[BLEND_MODES["NORMAL"] = 0] = "NORMAL";
BLEND_MODES[BLEND_MODES["ADD"] = 1] = "ADD";
BLEND_MODES[BLEND_MODES["MULTIPLY"] = 2] = "MULTIPLY";
BLEND_MODES[BLEND_MODES["SCREEN"] = 3] = "SCREEN";
BLEND_MODES[BLEND_MODES["OVERLAY"] = 4] = "OVERLAY";
BLEND_MODES[BLEND_MODES["DARKEN"] = 5] = "DARKEN";
BLEND_MODES[BLEND_MODES["LIGHTEN"] = 6] = "LIGHTEN";
BLEND_MODES[BLEND_MODES["COLOR_DODGE"] = 7] = "COLOR_DODGE";
BLEND_MODES[BLEND_MODES["COLOR_BURN"] = 8] = "COLOR_BURN";
BLEND_MODES[BLEND_MODES["HARD_LIGHT"] = 9] = "HARD_LIGHT";
BLEND_MODES[BLEND_MODES["SOFT_LIGHT"] = 10] = "SOFT_LIGHT";
BLEND_MODES[BLEND_MODES["DIFFERENCE"] = 11] = "DIFFERENCE";
BLEND_MODES[BLEND_MODES["EXCLUSION"] = 12] = "EXCLUSION";
BLEND_MODES[BLEND_MODES["HUE"] = 13] = "HUE";
BLEND_MODES[BLEND_MODES["SATURATION"] = 14] = "SATURATION";
BLEND_MODES[BLEND_MODES["COLOR"] = 15] = "COLOR";
BLEND_MODES[BLEND_MODES["LUMINOSITY"] = 16] = "LUMINOSITY";
BLEND_MODES[BLEND_MODES["NORMAL_NPM"] = 17] = "NORMAL_NPM";
BLEND_MODES[BLEND_MODES["ADD_NPM"] = 18] = "ADD_NPM";
BLEND_MODES[BLEND_MODES["SCREEN_NPM"] = 19] = "SCREEN_NPM";
BLEND_MODES[BLEND_MODES["NONE"] = 20] = "NONE";
BLEND_MODES[BLEND_MODES["SRC_OVER"] = 0] = "SRC_OVER";
BLEND_MODES[BLEND_MODES["SRC_IN"] = 21] = "SRC_IN";
BLEND_MODES[BLEND_MODES["SRC_OUT"] = 22] = "SRC_OUT";
BLEND_MODES[BLEND_MODES["SRC_ATOP"] = 23] = "SRC_ATOP";
BLEND_MODES[BLEND_MODES["DST_OVER"] = 24] = "DST_OVER";
BLEND_MODES[BLEND_MODES["DST_IN"] = 25] = "DST_IN";
BLEND_MODES[BLEND_MODES["DST_OUT"] = 26] = "DST_OUT";
BLEND_MODES[BLEND_MODES["DST_ATOP"] = 27] = "DST_ATOP";
BLEND_MODES[BLEND_MODES["ERASE"] = 26] = "ERASE";
BLEND_MODES[BLEND_MODES["SUBTRACT"] = 28] = "SUBTRACT";
BLEND_MODES[BLEND_MODES["XOR"] = 29] = "XOR";
})(BLEND_MODES || (BLEND_MODES = {}));
/**
* Various webgl draw modes. These can be used to specify which GL drawMode to use
* under certain situations and renderers.
* @memberof PIXI
* @static
* @name DRAW_MODES
* @enum {number}
* @property {number} POINTS -
* @property {number} LINES -
* @property {number} LINE_LOOP -
* @property {number} LINE_STRIP -
* @property {number} TRIANGLES -
* @property {number} TRIANGLE_STRIP -
* @property {number} TRIANGLE_FAN -
*/
var DRAW_MODES;
(function (DRAW_MODES) {
DRAW_MODES[DRAW_MODES["POINTS"] = 0] = "POINTS";
DRAW_MODES[DRAW_MODES["LINES"] = 1] = "LINES";
DRAW_MODES[DRAW_MODES["LINE_LOOP"] = 2] = "LINE_LOOP";
DRAW_MODES[DRAW_MODES["LINE_STRIP"] = 3] = "LINE_STRIP";
DRAW_MODES[DRAW_MODES["TRIANGLES"] = 4] = "TRIANGLES";
DRAW_MODES[DRAW_MODES["TRIANGLE_STRIP"] = 5] = "TRIANGLE_STRIP";
DRAW_MODES[DRAW_MODES["TRIANGLE_FAN"] = 6] = "TRIANGLE_FAN";
})(DRAW_MODES || (DRAW_MODES = {}));
/**
* Various GL texture/resources formats.
* @memberof PIXI
* @static
* @name FORMATS
* @enum {number}
* @property {number} [RGBA=6408] -
* @property {number} [RGB=6407] -
* @property {number} [RG=33319] -
* @property {number} [RED=6403] -
* @property {number} [RGBA_INTEGER=36249] -
* @property {number} [RGB_INTEGER=36248] -
* @property {number} [RG_INTEGER=33320] -
* @property {number} [RED_INTEGER=36244] -
* @property {number} [ALPHA=6406] -
* @property {number} [LUMINANCE=6409] -
* @property {number} [LUMINANCE_ALPHA=6410] -
* @property {number} [DEPTH_COMPONENT=6402] -
* @property {number} [DEPTH_STENCIL=34041] -
*/
var FORMATS;
(function (FORMATS) {
FORMATS[FORMATS["RGBA"] = 6408] = "RGBA";
FORMATS[FORMATS["RGB"] = 6407] = "RGB";
FORMATS[FORMATS["RG"] = 33319] = "RG";
FORMATS[FORMATS["RED"] = 6403] = "RED";
FORMATS[FORMATS["RGBA_INTEGER"] = 36249] = "RGBA_INTEGER";
FORMATS[FORMATS["RGB_INTEGER"] = 36248] = "RGB_INTEGER";
FORMATS[FORMATS["RG_INTEGER"] = 33320] = "RG_INTEGER";
FORMATS[FORMATS["RED_INTEGER"] = 36244] = "RED_INTEGER";
FORMATS[FORMATS["ALPHA"] = 6406] = "ALPHA";
FORMATS[FORMATS["LUMINANCE"] = 6409] = "LUMINANCE";
FORMATS[FORMATS["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
FORMATS[FORMATS["DEPTH_COMPONENT"] = 6402] = "DEPTH_COMPONENT";
FORMATS[FORMATS["DEPTH_STENCIL"] = 34041] = "DEPTH_STENCIL";
})(FORMATS || (FORMATS = {}));
/**
* Various GL target types.
* @memberof PIXI
* @static
* @name TARGETS
* @enum {number}
* @property {number} [TEXTURE_2D=3553] -
* @property {number} [TEXTURE_CUBE_MAP=34067] -
* @property {number} [TEXTURE_2D_ARRAY=35866] -
* @property {number} [TEXTURE_CUBE_MAP_POSITIVE_X=34069] -
* @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_X=34070] -
* @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Y=34071] -
* @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Y=34072] -
* @property {number} [TEXTURE_CUBE_MAP_POSITIVE_Z=34073] -
* @property {number} [TEXTURE_CUBE_MAP_NEGATIVE_Z=34074] -
*/
var TARGETS;
(function (TARGETS) {
TARGETS[TARGETS["TEXTURE_2D"] = 3553] = "TEXTURE_2D";
TARGETS[TARGETS["TEXTURE_CUBE_MAP"] = 34067] = "TEXTURE_CUBE_MAP";
TARGETS[TARGETS["TEXTURE_2D_ARRAY"] = 35866] = "TEXTURE_2D_ARRAY";
TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_X"] = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X";
TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_X"] = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X";
TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_Y"] = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y";
TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_Y"] = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y";
TARGETS[TARGETS["TEXTURE_CUBE_MAP_POSITIVE_Z"] = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z";
TARGETS[TARGETS["TEXTURE_CUBE_MAP_NEGATIVE_Z"] = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z";
})(TARGETS || (TARGETS = {}));
/**
* Various GL data format types.
* @memberof PIXI
* @static
* @name TYPES
* @enum {number}
* @property {number} [UNSIGNED_BYTE=5121] -
* @property {number} [UNSIGNED_SHORT=5123] -
* @property {number} [UNSIGNED_SHORT_5_6_5=33635] -
* @property {number} [UNSIGNED_SHORT_4_4_4_4=32819] -
* @property {number} [UNSIGNED_SHORT_5_5_5_1=32820] -
* @property {number} [UNSIGNED_INT=5125] -
* @property {number} [UNSIGNED_INT_10F_11F_11F_REV=35899] -
* @property {number} [UNSIGNED_INT_2_10_10_10_REV=33640] -
* @property {number} [UNSIGNED_INT_24_8=34042] -
* @property {number} [UNSIGNED_INT_5_9_9_9_REV=35902] -
* @property {number} [BYTE=5120] -
* @property {number} [SHORT=5122] -
* @property {number} [INT=5124] -
* @property {number} [FLOAT=5126] -
* @property {number} [FLOAT_32_UNSIGNED_INT_24_8_REV=36269] -
* @property {number} [HALF_FLOAT=36193] -
*/
var TYPES;
(function (TYPES) {
TYPES[TYPES["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
TYPES[TYPES["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
TYPES[TYPES["UNSIGNED_SHORT_5_6_5"] = 33635] = "UNSIGNED_SHORT_5_6_5";
TYPES[TYPES["UNSIGNED_SHORT_4_4_4_4"] = 32819] = "UNSIGNED_SHORT_4_4_4_4";
TYPES[TYPES["UNSIGNED_SHORT_5_5_5_1"] = 32820] = "UNSIGNED_SHORT_5_5_5_1";
TYPES[TYPES["UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
TYPES[TYPES["UNSIGNED_INT_10F_11F_11F_REV"] = 35899] = "UNSIGNED_INT_10F_11F_11F_REV";
TYPES[TYPES["UNSIGNED_INT_2_10_10_10_REV"] = 33640] = "UNSIGNED_INT_2_10_10_10_REV";
TYPES[TYPES["UNSIGNED_INT_24_8"] = 34042] = "UNSIGNED_INT_24_8";
TYPES[TYPES["UNSIGNED_INT_5_9_9_9_REV"] = 35902] = "UNSIGNED_INT_5_9_9_9_REV";
TYPES[TYPES["BYTE"] = 5120] = "BYTE";
TYPES[TYPES["SHORT"] = 5122] = "SHORT";
TYPES[TYPES["INT"] = 5124] = "INT";
TYPES[TYPES["FLOAT"] = 5126] = "FLOAT";
TYPES[TYPES["FLOAT_32_UNSIGNED_INT_24_8_REV"] = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV";
TYPES[TYPES["HALF_FLOAT"] = 36193] = "HALF_FLOAT";
})(TYPES || (TYPES = {}));
/**
* Various sampler types. Correspond to `sampler`, `isampler`, `usampler` GLSL types respectively.
* WebGL1 works only with FLOAT.
* @memberof PIXI
* @static
* @name SAMPLER_TYPES
* @enum {number}
* @property {number} [FLOAT=0] -
* @property {number} [INT=1] -
* @property {number} [UINT=2] -
*/
var SAMPLER_TYPES;
(function (SAMPLER_TYPES) {
SAMPLER_TYPES[SAMPLER_TYPES["FLOAT"] = 0] = "FLOAT";
SAMPLER_TYPES[SAMPLER_TYPES["INT"] = 1] = "INT";
SAMPLER_TYPES[SAMPLER_TYPES["UINT"] = 2] = "UINT";
})(SAMPLER_TYPES || (SAMPLER_TYPES = {}));
/**
* The scale modes that are supported by pixi.
*
* The {@link PIXI.settings.SCALE_MODE} scale mode affects the default scaling mode of future operations.
* It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.
* @memberof PIXI
* @static
* @name SCALE_MODES
* @enum {number}
* @property {number} LINEAR Smooth scaling
* @property {number} NEAREST Pixelating scaling
*/
var SCALE_MODES;
(function (SCALE_MODES) {
SCALE_MODES[SCALE_MODES["NEAREST"] = 0] = "NEAREST";
SCALE_MODES[SCALE_MODES["LINEAR"] = 1] = "LINEAR";
})(SCALE_MODES || (SCALE_MODES = {}));
/**
* The wrap modes that are supported by pixi.
*
* The {@link PIXI.settings.WRAP_MODE} wrap mode affects the default wrapping mode of future operations.
* It can be re-assigned to either CLAMP or REPEAT, depending upon suitability.
* If the texture is non power of two then clamp will be used regardless as WebGL can
* only use REPEAT if the texture is po2.
*
* This property only affects WebGL.
* @name WRAP_MODES
* @memberof PIXI
* @static
* @enum {number}
* @property {number} CLAMP - The textures uvs are clamped
* @property {number} REPEAT - The texture uvs tile and repeat
* @property {number} MIRRORED_REPEAT - The texture uvs tile and repeat with mirroring
*/
var WRAP_MODES;
(function (WRAP_MODES) {
WRAP_MODES[WRAP_MODES["CLAMP"] = 33071] = "CLAMP";
WRAP_MODES[WRAP_MODES["REPEAT"] = 10497] = "REPEAT";
WRAP_MODES[WRAP_MODES["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
})(WRAP_MODES || (WRAP_MODES = {}));
/**
* Mipmap filtering modes that are supported by pixi.
*
* The {@link PIXI.settings.MIPMAP_TEXTURES} affects default texture filtering.
* Mipmaps are generated for a baseTexture if its `mipmap` field is `ON`,
* or its `POW2` and texture dimensions are powers of 2.
* Due to platform restriction, `ON` option will work like `POW2` for webgl-1.
*
* This property only affects WebGL.
* @name MIPMAP_MODES
* @memberof PIXI
* @static
* @enum {number}
* @property {number} OFF - No mipmaps
* @property {number} POW2 - Generate mipmaps if texture dimensions are pow2
* @property {number} ON - Always generate mipmaps
* @property {number} ON_MANUAL - Use mipmaps, but do not auto-generate them; this is used with a resource
* that supports buffering each level-of-detail.
*/
var MIPMAP_MODES;
(function (MIPMAP_MODES) {
MIPMAP_MODES[MIPMAP_MODES["OFF"] = 0] = "OFF";
MIPMAP_MODES[MIPMAP_MODES["POW2"] = 1] = "POW2";
MIPMAP_MODES[MIPMAP_MODES["ON"] = 2] = "ON";
MIPMAP_MODES[MIPMAP_MODES["ON_MANUAL"] = 3] = "ON_MANUAL";
})(MIPMAP_MODES || (MIPMAP_MODES = {}));
/**
* How to treat textures with premultiplied alpha
* @name ALPHA_MODES
* @memberof PIXI
* @static
* @enum {number}
* @property {number} NO_PREMULTIPLIED_ALPHA - Source is not premultiplied, leave it like that.
* Option for compressed and data textures that are created from typed arrays.
* @property {number} PREMULTIPLY_ON_UPLOAD - Source is not premultiplied, premultiply on upload.
* Default option, used for all loaded images.
* @property {number} PREMULTIPLIED_ALPHA - Source is already premultiplied
* Example: spine atlases with `_pma` suffix.
* @property {number} NPM - Alias for NO_PREMULTIPLIED_ALPHA.
* @property {number} UNPACK - Default option, alias for PREMULTIPLY_ON_UPLOAD.
* @property {number} PMA - Alias for PREMULTIPLIED_ALPHA.
*/
var ALPHA_MODES;
(function (ALPHA_MODES) {
ALPHA_MODES[ALPHA_MODES["NPM"] = 0] = "NPM";
ALPHA_MODES[ALPHA_MODES["UNPACK"] = 1] = "UNPACK";
ALPHA_MODES[ALPHA_MODES["PMA"] = 2] = "PMA";
ALPHA_MODES[ALPHA_MODES["NO_PREMULTIPLIED_ALPHA"] = 0] = "NO_PREMULTIPLIED_ALPHA";
ALPHA_MODES[ALPHA_MODES["PREMULTIPLY_ON_UPLOAD"] = 1] = "PREMULTIPLY_ON_UPLOAD";
ALPHA_MODES[ALPHA_MODES["PREMULTIPLY_ALPHA"] = 2] = "PREMULTIPLY_ALPHA";
ALPHA_MODES[ALPHA_MODES["PREMULTIPLIED_ALPHA"] = 2] = "PREMULTIPLIED_ALPHA";
})(ALPHA_MODES || (ALPHA_MODES = {}));
/**
* Configure whether filter textures are cleared after binding.
*
* Filter textures need not be cleared if the filter does not use pixel blending. {@link CLEAR_MODES.BLIT} will detect
* this and skip clearing as an optimization.
* @name CLEAR_MODES
* @memberof PIXI
* @static
* @enum {number}
* @property {number} BLEND - Do not clear the filter texture. The filter's output will blend on top of the output texture.
* @property {number} CLEAR - Always clear the filter texture.
* @property {number} BLIT - Clear only if {@link FilterSystem.forceClear} is set or if the filter uses pixel blending.
* @property {number} NO - Alias for BLEND, same as `false` in earlier versions
* @property {number} YES - Alias for CLEAR, same as `true` in earlier versions
* @property {number} AUTO - Alias for BLIT
*/
var CLEAR_MODES;
(function (CLEAR_MODES) {
CLEAR_MODES[CLEAR_MODES["NO"] = 0] = "NO";
CLEAR_MODES[CLEAR_MODES["YES"] = 1] = "YES";
CLEAR_MODES[CLEAR_MODES["AUTO"] = 2] = "AUTO";
CLEAR_MODES[CLEAR_MODES["BLEND"] = 0] = "BLEND";
CLEAR_MODES[CLEAR_MODES["CLEAR"] = 1] = "CLEAR";
CLEAR_MODES[CLEAR_MODES["BLIT"] = 2] = "BLIT";
})(CLEAR_MODES || (CLEAR_MODES = {}));
/**
* The gc modes that are supported by pixi.
*
* The {@link PIXI.settings.GC_MODE} Garbage Collection mode for PixiJS textures is AUTO
* If set to GC_MODE, the renderer will occasionally check textures usage. If they are not
* used for a specified period of time they will be removed from the GPU. They will of course
* be uploaded again when they are required. This is a silent behind the scenes process that
* should ensure that the GPU does not get filled up.
*
* Handy for mobile devices!
* This property only affects WebGL.
* @name GC_MODES
* @enum {number}
* @static
* @memberof PIXI
* @property {number} AUTO - Garbage collection will happen periodically automatically
* @property {number} MANUAL - Garbage collection will need to be called manually
*/
var GC_MODES;
(function (GC_MODES) {
GC_MODES[GC_MODES["AUTO"] = 0] = "AUTO";
GC_MODES[GC_MODES["MANUAL"] = 1] = "MANUAL";
})(GC_MODES || (GC_MODES = {}));
/**
* Constants that specify float precision in shaders.
* @name PRECISION
* @memberof PIXI
* @constant
* @static
* @enum {string}
* @property {string} [LOW='lowp'] -
* @property {string} [MEDIUM='mediump'] -
* @property {string} [HIGH='highp'] -
*/
var PRECISION;
(function (PRECISION) {
PRECISION["LOW"] = "lowp";
PRECISION["MEDIUM"] = "mediump";
PRECISION["HIGH"] = "highp";
})(PRECISION || (PRECISION = {}));
/**
* Constants for mask implementations.
* We use `type` suffix because it leads to very different behaviours
* @name MASK_TYPES
* @memberof PIXI
* @static
* @enum {number}
* @property {number} NONE - Mask is ignored
* @property {number} SCISSOR - Scissor mask, rectangle on screen, cheap
* @property {number} STENCIL - Stencil mask, 1-bit, medium, works only if renderer supports stencil
* @property {number} SPRITE - Mask that uses SpriteMaskFilter, uses temporary RenderTexture
* @property {number} COLOR - Color mask (RGBA)
*/
var MASK_TYPES;
(function (MASK_TYPES) {
MASK_TYPES[MASK_TYPES["NONE"] = 0] = "NONE";
MASK_TYPES[MASK_TYPES["SCISSOR"] = 1] = "SCISSOR";
MASK_TYPES[MASK_TYPES["STENCIL"] = 2] = "STENCIL";
MASK_TYPES[MASK_TYPES["SPRITE"] = 3] = "SPRITE";
MASK_TYPES[MASK_TYPES["COLOR"] = 4] = "COLOR";
})(MASK_TYPES || (MASK_TYPES = {}));
/**
* Bitwise OR of masks that indicate the color channels that are rendered to.
* @static
* @memberof PIXI
* @name COLOR_MASK_BITS
* @enum {number}
* @property {number} RED - Red channel.
* @property {number} GREEN - Green channel
* @property {number} BLUE - Blue channel.
* @property {number} ALPHA - Alpha channel.
*/
var COLOR_MASK_BITS;
(function (COLOR_MASK_BITS) {
COLOR_MASK_BITS[COLOR_MASK_BITS["RED"] = 1] = "RED";
COLOR_MASK_BITS[COLOR_MASK_BITS["GREEN"] = 2] = "GREEN";
COLOR_MASK_BITS[COLOR_MASK_BITS["BLUE"] = 4] = "BLUE";
COLOR_MASK_BITS[COLOR_MASK_BITS["ALPHA"] = 8] = "ALPHA";
})(COLOR_MASK_BITS || (COLOR_MASK_BITS = {}));
/**
* Constants for multi-sampling antialiasing.
* @see PIXI.Framebuffer#multisample
* @name MSAA_QUALITY
* @memberof PIXI
* @static
* @enum {number}
* @property {number} NONE - No multisampling for this renderTexture
* @property {number} LOW - Try 2 samples
* @property {number} MEDIUM - Try 4 samples
* @property {number} HIGH - Try 8 samples
*/
var MSAA_QUALITY;
(function (MSAA_QUALITY) {
MSAA_QUALITY[MSAA_QUALITY["NONE"] = 0] = "NONE";
MSAA_QUALITY[MSAA_QUALITY["LOW"] = 2] = "LOW";
MSAA_QUALITY[MSAA_QUALITY["MEDIUM"] = 4] = "MEDIUM";
MSAA_QUALITY[MSAA_QUALITY["HIGH"] = 8] = "HIGH";
})(MSAA_QUALITY || (MSAA_QUALITY = {}));
/**
* Constants for various buffer types in Pixi
* @see PIXI.BUFFER_TYPE
* @name BUFFER_TYPE
* @memberof PIXI
* @static
* @enum {number}
* @property {number} ELEMENT_ARRAY_BUFFER - buffer type for using as an index buffer
* @property {number} ARRAY_BUFFER - buffer type for using attribute data
* @property {number} UNIFORM_BUFFER - the buffer type is for uniform buffer objects
*/
var BUFFER_TYPE;
(function (BUFFER_TYPE) {
BUFFER_TYPE[BUFFER_TYPE["ELEMENT_ARRAY_BUFFER"] = 34963] = "ELEMENT_ARRAY_BUFFER";
BUFFER_TYPE[BUFFER_TYPE["ARRAY_BUFFER"] = 34962] = "ARRAY_BUFFER";
// NOT YET SUPPORTED
BUFFER_TYPE[BUFFER_TYPE["UNIFORM_BUFFER"] = 35345] = "UNIFORM_BUFFER";
})(BUFFER_TYPE || (BUFFER_TYPE = {}));
var SCALE_MODES = /* @__PURE__ */ ((SCALE_MODES2) => {
SCALE_MODES2[SCALE_MODES2["NEAREST"] = 0] = "NEAREST";
SCALE_MODES2[SCALE_MODES2["LINEAR"] = 1] = "LINEAR";
return SCALE_MODES2;
})(SCALE_MODES || {});
var WRAP_MODES = /* @__PURE__ */ ((WRAP_MODES2) => {
WRAP_MODES2[WRAP_MODES2["CLAMP"] = 33071] = "CLAMP";
WRAP_MODES2[WRAP_MODES2["REPEAT"] = 10497] = "REPEAT";
WRAP_MODES2[WRAP_MODES2["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
return WRAP_MODES2;
})(WRAP_MODES || {});
var MIPMAP_MODES = /* @__PURE__ */ ((MIPMAP_MODES2) => {
MIPMAP_MODES2[MIPMAP_MODES2["OFF"] = 0] = "OFF";
MIPMAP_MODES2[MIPMAP_MODES2["POW2"] = 1] = "POW2";
MIPMAP_MODES2[MIPMAP_MODES2["ON"] = 2] = "ON";
MIPMAP_MODES2[MIPMAP_MODES2["ON_MANUAL"] = 3] = "ON_MANUAL";
return MIPMAP_MODES2;
})(MIPMAP_MODES || {});
var GC_MODES = /* @__PURE__ */ ((GC_MODES2) => {
GC_MODES2[GC_MODES2["AUTO"] = 0] = "AUTO";
GC_MODES2[GC_MODES2["MANUAL"] = 1] = "MANUAL";
return GC_MODES2;
})(GC_MODES || {});
var PRECISION = /* @__PURE__ */ ((PRECISION2) => {
PRECISION2["LOW"] = "lowp";
PRECISION2["MEDIUM"] = "mediump";
PRECISION2["HIGH"] = "highp";
return PRECISION2;
})(PRECISION || {});
var MSAA_QUALITY = /* @__PURE__ */ ((MSAA_QUALITY2) => {
MSAA_QUALITY2[MSAA_QUALITY2["NONE"] = 0] = "NONE";
MSAA_QUALITY2[MSAA_QUALITY2["LOW"] = 2] = "LOW";
MSAA_QUALITY2[MSAA_QUALITY2["MEDIUM"] = 4] = "MEDIUM";
MSAA_QUALITY2[MSAA_QUALITY2["HIGH"] = 8] = "HIGH";
return MSAA_QUALITY2;
})(MSAA_QUALITY || {});
var BrowserAdapter = {
/**
* Creates a canvas element of the given size.
* This canvas is created using the browser's native canvas element.
* @param width - width of the canvas
* @param height - height of the canvas
*/
createCanvas: function (width, height) {
var canvas = document.createElement('canvas');
canvas.width = width;
canvas.height = height;
return canvas;
},
getWebGLRenderingContext: function () { return WebGLRenderingContext; },
getNavigator: function () { return navigator; },
getBaseUrl: function () { var _a; return ((_a = document.baseURI) !== null && _a !== void 0 ? _a : window.location.href); },
fetch: function (url, options) { return fetch(url, options); },
const BrowserAdapter = {
createCanvas: (width, height) => {
const canvas = document.createElement("canvas");
canvas.width = width;
canvas.height = height;
return canvas;
},
getWebGLRenderingContext: () => WebGLRenderingContext,
getNavigator: () => navigator,
getBaseUrl: () => document.baseURI ?? window.location.href,
fetch: (url, options) => fetch(url, options)
};

@@ -672,273 +196,65 @@

var isMobile = isMobile$1(globalThis.navigator);
const isMobile = isMobile$1(globalThis.navigator);
/**
* Uploading the same buffer multiple times in a single frame can cause performance issues.
* Apparent on iOS so only check for that at the moment
* This check may become more complex if this issue pops up elsewhere.
* @private
* @returns {boolean} `true` if the same buffer may be uploaded more than once.
*/
function canUploadSameBuffer() {
return !isMobile.apple.device;
return !isMobile.apple.device;
}
/**
* The maximum recommended texture units to use.
* In theory the bigger the better, and for desktop we'll use as many as we can.
* But some mobile devices slow down if there is to many branches in the shader.
* So in practice there seems to be a sweet spot size that varies depending on the device.
*
* In v4, all mobile devices were limited to 4 texture units because for this.
* In v5, we allow all texture units to be used on modern Apple or Android devices.
* @private
* @param {number} max
* @returns {number} The maximum recommended texture units to use.
*/
function maxRecommendedTextures(max) {
var allowMax = true;
if (isMobile.tablet || isMobile.phone) {
if (isMobile.apple.device) {
var match = (navigator.userAgent).match(/OS (\d+)_(\d+)?/);
if (match) {
var majorVersion = parseInt(match[1], 10);
// Limit texture units on devices below iOS 11, which will be older hardware
if (majorVersion < 11) {
allowMax = false;
}
}
let allowMax = true;
if (isMobile.tablet || isMobile.phone) {
if (isMobile.apple.device) {
const match = navigator.userAgent.match(/OS (\d+)_(\d+)?/);
if (match) {
const majorVersion = parseInt(match[1], 10);
if (majorVersion < 11) {
allowMax = false;
}
if (isMobile.android.device) {
var match = (navigator.userAgent).match(/Android\s([0-9.]*)/);
if (match) {
var majorVersion = parseInt(match[1], 10);
// Limit texture units on devices below Android 7 (Nougat), which will be older hardware
if (majorVersion < 7) {
allowMax = false;
}
}
}
}
if (isMobile.android.device) {
const match = navigator.userAgent.match(/Android\s([0-9.]*)/);
if (match) {
const majorVersion = parseInt(match[1], 10);
if (majorVersion < 7) {
allowMax = false;
}
}
}
return allowMax ? max : 4;
}
return allowMax ? max : 4;
}
/**
* User's customizable globals for overriding the default PIXI settings, such
* as a renderer's default resolution, framerate, float precision, etc.
* @example
* // Use the native window resolution as the default resolution
* // will support high-density displays when rendering
* PIXI.settings.RESOLUTION = window.devicePixelRatio;
*
* // Disable interpolation when scaling, will make texture be pixelated
* PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
* @namespace PIXI.settings
*/
var settings = {
/**
* This adapter is used to call methods that are platform dependent.
* For example `document.createElement` only runs on the web but fails in node environments.
* This allows us to support more platforms by abstracting away specific implementations per platform.
*
* By default the adapter is set to work in the browser. However you can create your own
* by implementing the `IAdapter` interface. See `IAdapter` for more information.
* @name ADAPTER
* @memberof PIXI.settings
* @type {PIXI.IAdapter}
* @default PIXI.BrowserAdapter
*/
ADAPTER: BrowserAdapter,
/**
* If set to true WebGL will attempt make textures mimpaped by default.
* Mipmapping will only succeed if the base texture uploaded has power of two dimensions.
* @static
* @name MIPMAP_TEXTURES
* @memberof PIXI.settings
* @type {PIXI.MIPMAP_MODES}
* @default PIXI.MIPMAP_MODES.POW2
*/
MIPMAP_TEXTURES: MIPMAP_MODES.POW2,
/**
* Default anisotropic filtering level of textures.
* Usually from 0 to 16
* @static
* @name ANISOTROPIC_LEVEL
* @memberof PIXI.settings
* @type {number}
* @default 0
*/
ANISOTROPIC_LEVEL: 0,
/**
* Default resolution / device pixel ratio of the renderer.
* @static
* @name RESOLUTION
* @memberof PIXI.settings
* @type {number}
* @default 1
*/
RESOLUTION: 1,
/**
* Default filter resolution.
* @static
* @name FILTER_RESOLUTION
* @memberof PIXI.settings
* @type {number}
* @default 1
*/
FILTER_RESOLUTION: 1,
/**
* Default filter samples.
* @static
* @name FILTER_MULTISAMPLE
* @memberof PIXI.settings
* @type {PIXI.MSAA_QUALITY}
* @default PIXI.MSAA_QUALITY.NONE
*/
FILTER_MULTISAMPLE: MSAA_QUALITY.NONE,
/**
* The maximum textures that this device supports.
* @static
* @name SPRITE_MAX_TEXTURES
* @memberof PIXI.settings
* @type {number}
* @default 32
*/
SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),
// TODO: maybe change to SPRITE.BATCH_SIZE: 2000
// TODO: maybe add PARTICLE.BATCH_SIZE: 15000
/**
* The default sprite batch size.
*
* The default aims to balance desktop and mobile devices.
* @static
* @name SPRITE_BATCH_SIZE
* @memberof PIXI.settings
* @type {number}
* @default 4096
*/
SPRITE_BATCH_SIZE: 4096,
/**
* The default render options if none are supplied to {@link PIXI.Renderer}
* or {@link PIXI.CanvasRenderer}.
* @static
* @name RENDER_OPTIONS
* @memberof PIXI.settings
* @type {object}
* @property {HTMLCanvasElement} [view=null] -
* @property {boolean} [antialias=false] -
* @property {boolean} [autoDensity=false] -
* @property {boolean} [useContextAlpha=true] -
* @property {number} [backgroundColor=0x000000] -
* @property {number} [backgroundAlpha=1] -
* @property {boolean} [clearBeforeRender=true] -
* @property {boolean} [preserveDrawingBuffer=false] -
* @property {number} [width=800] -
* @property {number} [height=600] -
* @property {boolean} [legacy=false] -
*/
RENDER_OPTIONS: {
view: null,
antialias: false,
autoDensity: false,
backgroundColor: 0x000000,
backgroundAlpha: 1,
useContextAlpha: true,
clearBeforeRender: true,
preserveDrawingBuffer: false,
width: 800,
height: 600,
legacy: false,
},
/**
* Default Garbage Collection mode.
* @static
* @name GC_MODE
* @memberof PIXI.settings
* @type {PIXI.GC_MODES}
* @default PIXI.GC_MODES.AUTO
*/
GC_MODE: GC_MODES.AUTO,
/**
* Default Garbage Collection max idle.
* @static
* @name GC_MAX_IDLE
* @memberof PIXI.settings
* @type {number}
* @default 3600
*/
GC_MAX_IDLE: 60 * 60,
/**
* Default Garbage Collection maximum check count.
* @static
* @name GC_MAX_CHECK_COUNT
* @memberof PIXI.settings
* @type {number}
* @default 600
*/
GC_MAX_CHECK_COUNT: 60 * 10,
/**
* Default wrap modes that are supported by pixi.
* @static
* @name WRAP_MODE
* @memberof PIXI.settings
* @type {PIXI.WRAP_MODES}
* @default PIXI.WRAP_MODES.CLAMP
*/
WRAP_MODE: WRAP_MODES.CLAMP,
/**
* Default scale mode for textures.
* @static
* @name SCALE_MODE
* @memberof PIXI.settings
* @type {PIXI.SCALE_MODES}
* @default PIXI.SCALE_MODES.LINEAR
*/
SCALE_MODE: SCALE_MODES.LINEAR,
/**
* Default specify float precision in vertex shader.
* @static
* @name PRECISION_VERTEX
* @memberof PIXI.settings
* @type {PIXI.PRECISION}
* @default PIXI.PRECISION.HIGH
*/
PRECISION_VERTEX: PRECISION.HIGH,
/**
* Default specify float precision in fragment shader.
* iOS is best set at highp due to https://github.com/pixijs/pixi.js/issues/3742
* @static
* @name PRECISION_FRAGMENT
* @memberof PIXI.settings
* @type {PIXI.PRECISION}
* @default PIXI.PRECISION.MEDIUM
*/
PRECISION_FRAGMENT: isMobile.apple.device ? PRECISION.HIGH : PRECISION.MEDIUM,
/**
* Can we upload the same buffer in a single frame?
* @static
* @name CAN_UPLOAD_SAME_BUFFER
* @memberof PIXI.settings
* @type {boolean}
*/
CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),
/**
* Enables bitmap creation before image load. This feature is experimental.
* @static
* @name CREATE_IMAGE_BITMAP
* @memberof PIXI.settings
* @type {boolean}
* @default false
*/
CREATE_IMAGE_BITMAP: false,
/**
* If true PixiJS will Math.floor() x/y values when rendering, stopping pixel interpolation.
* Advantages can include sharper image quality (like text) and faster rendering on canvas.
* The main disadvantage is movement of objects may appear less smooth.
* @static
* @constant
* @memberof PIXI.settings
* @type {boolean}
* @default false
*/
ROUND_PIXELS: false,
const settings = {
ADAPTER: BrowserAdapter,
MIPMAP_TEXTURES: MIPMAP_MODES.POW2,
ANISOTROPIC_LEVEL: 0,
RESOLUTION: 1,
FILTER_RESOLUTION: 1,
FILTER_MULTISAMPLE: MSAA_QUALITY.NONE,
SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),
SPRITE_BATCH_SIZE: 4096,
RENDER_OPTIONS: {
view: null,
antialias: false,
autoDensity: false,
backgroundColor: 0,
backgroundAlpha: 1,
useContextAlpha: true,
clearBeforeRender: true,
preserveDrawingBuffer: false,
width: 800,
height: 600,
legacy: false
},
GC_MODE: GC_MODES.AUTO,
GC_MAX_IDLE: 60 * 60,
GC_MAX_CHECK_COUNT: 60 * 10,
WRAP_MODE: WRAP_MODES.CLAMP,
SCALE_MODE: SCALE_MODES.LINEAR,
PRECISION_VERTEX: PRECISION.HIGH,
PRECISION_FRAGMENT: isMobile.apple.device ? PRECISION.HIGH : PRECISION.MEDIUM,
CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),
CREATE_IMAGE_BITMAP: false,
ROUND_PIXELS: false
};

@@ -945,0 +261,0 @@

15

dist/cjs/settings.min.js

@@ -1,9 +0,14 @@

/*!
* @pixi/settings - v6.5.3
* Compiled Fri, 09 Sep 2022 13:55:20 UTC
"use strict";/*!
* @pixi/settings - v7.0.0-alpha
* Compiled Fri, 09 Sep 2022 16:09:18 UTC
*
* @pixi/settings is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
"use strict";var E,_,T,N,R,A,e,I,n,t,O,i,L,o,U,S,P,r,a,M;Object.defineProperty(exports,"__esModule",{value:!0}),function(E){E[E.WEBGL_LEGACY=0]="WEBGL_LEGACY",E[E.WEBGL=1]="WEBGL",E[E.WEBGL2=2]="WEBGL2"}(E||(E={})),function(E){E[E.UNKNOWN=0]="UNKNOWN",E[E.WEBGL=1]="WEBGL",E[E.CANVAS=2]="CANVAS"}(_||(_={})),function(E){E[E.COLOR=16384]="COLOR",E[E.DEPTH=256]="DEPTH",E[E.STENCIL=1024]="STENCIL"}(T||(T={})),function(E){E[E.NORMAL=0]="NORMAL",E[E.ADD=1]="ADD",E[E.MULTIPLY=2]="MULTIPLY",E[E.SCREEN=3]="SCREEN",E[E.OVERLAY=4]="OVERLAY",E[E.DARKEN=5]="DARKEN",E[E.LIGHTEN=6]="LIGHTEN",E[E.COLOR_DODGE=7]="COLOR_DODGE",E[E.COLOR_BURN=8]="COLOR_BURN",E[E.HARD_LIGHT=9]="HARD_LIGHT",E[E.SOFT_LIGHT=10]="SOFT_LIGHT",E[E.DIFFERENCE=11]="DIFFERENCE",E[E.EXCLUSION=12]="EXCLUSION",E[E.HUE=13]="HUE",E[E.SATURATION=14]="SATURATION",E[E.COLOR=15]="COLOR",E[E.LUMINOSITY=16]="LUMINOSITY",E[E.NORMAL_NPM=17]="NORMAL_NPM",E[E.ADD_NPM=18]="ADD_NPM",E[E.SCREEN_NPM=19]="SCREEN_NPM",E[E.NONE=20]="NONE",E[E.SRC_OVER=0]="SRC_OVER",E[E.SRC_IN=21]="SRC_IN",E[E.SRC_OUT=22]="SRC_OUT",E[E.SRC_ATOP=23]="SRC_ATOP",E[E.DST_OVER=24]="DST_OVER",E[E.DST_IN=25]="DST_IN",E[E.DST_OUT=26]="DST_OUT",E[E.DST_ATOP=27]="DST_ATOP",E[E.ERASE=26]="ERASE",E[E.SUBTRACT=28]="SUBTRACT",E[E.XOR=29]="XOR"}(N||(N={})),function(E){E[E.POINTS=0]="POINTS",E[E.LINES=1]="LINES",E[E.LINE_LOOP=2]="LINE_LOOP",E[E.LINE_STRIP=3]="LINE_STRIP",E[E.TRIANGLES=4]="TRIANGLES",E[E.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",E[E.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(R||(R={})),function(E){E[E.RGBA=6408]="RGBA",E[E.RGB=6407]="RGB",E[E.RG=33319]="RG",E[E.RED=6403]="RED",E[E.RGBA_INTEGER=36249]="RGBA_INTEGER",E[E.RGB_INTEGER=36248]="RGB_INTEGER",E[E.RG_INTEGER=33320]="RG_INTEGER",E[E.RED_INTEGER=36244]="RED_INTEGER",E[E.ALPHA=6406]="ALPHA",E[E.LUMINANCE=6409]="LUMINANCE",E[E.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",E[E.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",E[E.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(A||(A={})),function(E){E[E.TEXTURE_2D=3553]="TEXTURE_2D",E[E.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",E[E.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",E[E.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",E[E.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",E[E.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",E[E.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(e||(e={})),function(E){E[E.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",E[E.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",E[E.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",E[E.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",E[E.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",E[E.UNSIGNED_INT=5125]="UNSIGNED_INT",E[E.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",E[E.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",E[E.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",E[E.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",E[E.BYTE=5120]="BYTE",E[E.SHORT=5122]="SHORT",E[E.INT=5124]="INT",E[E.FLOAT=5126]="FLOAT",E[E.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",E[E.HALF_FLOAT=36193]="HALF_FLOAT"}(I||(I={})),function(E){E[E.FLOAT=0]="FLOAT",E[E.INT=1]="INT",E[E.UINT=2]="UINT"}(n||(n={})),function(E){E[E.NEAREST=0]="NEAREST",E[E.LINEAR=1]="LINEAR"}(t||(t={})),function(E){E[E.CLAMP=33071]="CLAMP",E[E.REPEAT=10497]="REPEAT",E[E.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(O||(O={})),function(E){E[E.OFF=0]="OFF",E[E.POW2=1]="POW2",E[E.ON=2]="ON",E[E.ON_MANUAL=3]="ON_MANUAL"}(i||(i={})),function(E){E[E.NPM=0]="NPM",E[E.UNPACK=1]="UNPACK",E[E.PMA=2]="PMA",E[E.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",E[E.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",E[E.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",E[E.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(L||(L={})),function(E){E[E.NO=0]="NO",E[E.YES=1]="YES",E[E.AUTO=2]="AUTO",E[E.BLEND=0]="BLEND",E[E.CLEAR=1]="CLEAR",E[E.BLIT=2]="BLIT"}(o||(o={})),function(E){E[E.AUTO=0]="AUTO",E[E.MANUAL=1]="MANUAL"}(U||(U={})),function(E){E.LOW="lowp",E.MEDIUM="mediump",E.HIGH="highp"}(S||(S={})),function(E){E[E.NONE=0]="NONE",E[E.SCISSOR=1]="SCISSOR",E[E.STENCIL=2]="STENCIL",E[E.SPRITE=3]="SPRITE",E[E.COLOR=4]="COLOR"}(P||(P={})),function(E){E[E.RED=1]="RED",E[E.GREEN=2]="GREEN",E[E.BLUE=4]="BLUE",E[E.ALPHA=8]="ALPHA"}(r||(r={})),function(E){E[E.NONE=0]="NONE",E[E.LOW=2]="LOW",E[E.MEDIUM=4]="MEDIUM",E[E.HIGH=8]="HIGH"}(a||(a={})),function(E){E[E.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",E[E.ARRAY_BUFFER=34962]="ARRAY_BUFFER",E[E.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(M||(M={}));var D={createCanvas:function(E,_){var T=document.createElement("canvas");return T.width=E,T.height=_,T},getWebGLRenderingContext:function(){return WebGLRenderingContext},getNavigator:function(){return navigator},getBaseUrl:function(){var E;return null!==(E=document.baseURI)&&void 0!==E?E:window.location.href},fetch:function(E,_){return fetch(E,_)}},C=/iPhone/i,G=/iPod/i,u=/iPad/i,c=/\biOS-universal(?:.+)Mac\b/i,d=/\bAndroid(?:.+)Mobile\b/i,B=/Android/i,f=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,l=/Silk/i,p=/Windows Phone/i,s=/\bWindows(?:.+)ARM\b/i,H=/BlackBerry/i,F=/BB10/i,v=/Opera Mini/i,h=/\b(CriOS|Chrome)(?:.+)Mobile/i,b=/Mobile(?:.+)Firefox\b/i,g=function(E){return void 0!==E&&"MacIntel"===E.platform&&"number"==typeof E.maxTouchPoints&&E.maxTouchPoints>1&&"undefined"==typeof MSStream};var X=function(E){var _={userAgent:"",platform:"",maxTouchPoints:0};E||"undefined"==typeof navigator?"string"==typeof E?_.userAgent=E:E&&E.userAgent&&(_={userAgent:E.userAgent,platform:E.platform,maxTouchPoints:E.maxTouchPoints||0}):_={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var T=_.userAgent,N=T.split("[FBAN");void 0!==N[1]&&(T=N[0]),void 0!==(N=T.split("Twitter"))[1]&&(T=N[0]);var R=function(E){return function(_){return _.test(E)}}(T),A={apple:{phone:R(C)&&!R(p),ipod:R(G),tablet:!R(C)&&(R(u)||g(_))&&!R(p),universal:R(c),device:(R(C)||R(G)||R(u)||R(c)||g(_))&&!R(p)},amazon:{phone:R(f),tablet:!R(f)&&R(l),device:R(f)||R(l)},android:{phone:!R(p)&&R(f)||!R(p)&&R(d),tablet:!R(p)&&!R(f)&&!R(d)&&(R(l)||R(B)),device:!R(p)&&(R(f)||R(l)||R(d)||R(B))||R(/\bokhttp\b/i)},windows:{phone:R(p),tablet:R(s),device:R(p)||R(s)},other:{blackberry:R(H),blackberry10:R(F),opera:R(v),firefox:R(b),chrome:R(h),device:R(H)||R(F)||R(v)||R(b)||R(h)},any:!1,phone:!1,tablet:!1};return A.any=A.apple.device||A.android.device||A.windows.device||A.other.device,A.phone=A.apple.phone||A.android.phone||A.windows.phone,A.tablet=A.apple.tablet||A.android.tablet||A.windows.tablet,A}(globalThis.navigator);var V={ADAPTER:D,MIPMAP_TEXTURES:i.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:a.NONE,SPRITE_MAX_TEXTURES:function(E){var _=!0;if(X.tablet||X.phone){var T;if(X.apple.device)if(T=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(T[1],10)<11&&(_=!1);if(X.android.device)if(T=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(T[1],10)<7&&(_=!1)}return _?E:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:U.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:O.CLAMP,SCALE_MODE:t.LINEAR,PRECISION_VERTEX:S.HIGH,PRECISION_FRAGMENT:X.apple.device?S.HIGH:S.MEDIUM,CAN_UPLOAD_SAME_BUFFER:!X.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};exports.BrowserAdapter=D,exports.isMobile=X,exports.settings=V;
*/Object.defineProperty(exports,"__esModule",{value:!0});/*!
* @pixi/constants - v7.0.0-alpha
* Compiled Fri, 09 Sep 2022 16:09:18 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/var v=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(v||{}),h=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(h||{}),f=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(f||{}),b=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(b||{}),s=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(s||{}),T=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(T||{});const E={createCanvas:(e,r)=>{const n=document.createElement("canvas");return n.width=e,n.height=r,n},getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,fetch:(e,r)=>fetch(e,r)};var c=/iPhone/i,R=/iPod/i,g=/iPad/i,N=/\biOS-universal(?:.+)Mac\b/i,u=/\bAndroid(?:.+)Mobile\b/i,m=/Android/i,l=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,p=/Silk/i,o=/Windows Phone/i,A=/\bWindows(?:.+)ARM\b/i,w=/BlackBerry/i,I=/BB10/i,O=/Opera Mini/i,B=/\b(CriOS|Chrome)(?:.+)Mobile/i,P=/Mobile(?:.+)Firefox\b/i,U=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function y(e){return function(r){return r.test(e)}}function L(e){var r={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?r={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?r.userAgent=e:e&&e.userAgent&&(r={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=r.userAgent,d=n.split("[FBAN");typeof d[1]<"u"&&(n=d[0]),d=n.split("Twitter"),typeof d[1]<"u"&&(n=d[0]);var t=y(n),a={apple:{phone:t(c)&&!t(o),ipod:t(R),tablet:!t(c)&&(t(g)||U(r))&&!t(o),universal:t(N),device:(t(c)||t(R)||t(g)||t(N)||U(r))&&!t(o)},amazon:{phone:t(l),tablet:!t(l)&&t(p),device:t(l)||t(p)},android:{phone:!t(o)&&t(l)||!t(o)&&t(u),tablet:!t(o)&&!t(l)&&!t(u)&&(t(p)||t(m)),device:!t(o)&&(t(l)||t(p)||t(u)||t(m))||t(/\bokhttp\b/i)},windows:{phone:t(o),tablet:t(A),device:t(o)||t(A)},other:{blackberry:t(w),blackberry10:t(I),opera:t(O),firefox:t(P),chrome:t(B),device:t(w)||t(I)||t(O)||t(P)||t(B)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const i=L(globalThis.navigator);function C(){return!i.apple.device}function x(e){let r=!0;if(i.tablet||i.phone){if(i.apple.device){const n=navigator.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(r=!1)}if(i.android.device){const n=navigator.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(r=!1)}}return r?e:4}const F={ADAPTER:E,MIPMAP_TEXTURES:f.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:T.NONE,SPRITE_MAX_TEXTURES:x(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:b.AUTO,GC_MAX_IDLE:60*60,GC_MAX_CHECK_COUNT:60*10,WRAP_MODE:h.CLAMP,SCALE_MODE:v.LINEAR,PRECISION_VERTEX:s.HIGH,PRECISION_FRAGMENT:i.apple.device?s.HIGH:s.MEDIUM,CAN_UPLOAD_SAME_BUFFER:C(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};exports.BrowserAdapter=E,exports.isMobile=i,exports.settings=F;
//# sourceMappingURL=settings.min.js.map
{
"name": "@pixi/settings",
"version": "6.5.3",
"version": "7.0.0-alpha",
"main": "dist/cjs/settings.js",
"module": "dist/esm/settings.mjs",
"bundle": "dist/browser/settings.js",
"types": "index.d.ts",

@@ -36,3 +35,2 @@ "exports": {

"files": [
"lib",
"dist",

@@ -44,3 +42,3 @@ "*.d.ts"

},
"gitHead": "28e6b2841a65837a5e2873a3d5a9c27cabbe795a"
"gitHead": "da993226df64b804a9c00ed9ee4d011191467b8a"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc