Socket
Socket
Sign inDemoInstall

@pixi/mixin-cache-as-bitmap

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/mixin-cache-as-bitmap - npm Package Compare versions

Comparing version 6.5.7 to 6.5.8

4

dist/browser/mixin-cache-as-bitmap.js
/*!
* @pixi/mixin-cache-as-bitmap - v6.5.7
* Compiled Thu, 20 Oct 2022 15:13:33 UTC
* @pixi/mixin-cache-as-bitmap - v6.5.8
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
*

@@ -5,0 +5,0 @@ * @pixi/mixin-cache-as-bitmap is licensed under the MIT License.

/*!
* @pixi/mixin-cache-as-bitmap - v6.5.7
* Compiled Thu, 20 Oct 2022 15:13:33 UTC
* @pixi/mixin-cache-as-bitmap - v6.5.8
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
*

@@ -5,0 +5,0 @@ * @pixi/mixin-cache-as-bitmap is licensed under the MIT License.

/*!
* @pixi/mixin-cache-as-bitmap - v6.5.7
* Compiled Thu, 20 Oct 2022 15:13:33 UTC
* @pixi/mixin-cache-as-bitmap - v6.5.8
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
*

@@ -18,517 +18,4 @@ * @pixi/mixin-cache-as-bitmap is licensed under the MIT License.

var settings = require('@pixi/settings');
var constants = require('@pixi/constants');
/*!
* @pixi/constants - v6.5.7
* Compiled Thu, 20 Oct 2022 15:13:33 UTC
*
* @pixi/constants is licensed under the MIT License.
* http://www.opensource.org/licenses/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 _tempMatrix = new math.Matrix();

@@ -538,3 +25,3 @@ display.DisplayObject.prototype._cacheAsBitmap = false;

display.DisplayObject.prototype._cacheAsBitmapResolution = null;
display.DisplayObject.prototype._cacheAsBitmapMultisample = MSAA_QUALITY.NONE;
display.DisplayObject.prototype._cacheAsBitmapMultisample = constants.MSAA_QUALITY.NONE;
// figured there's no point adding ALL the extra variables to prototype.

@@ -541,0 +28,0 @@ // this model can hold the information needed. This can also be generated on demand as

/*!
* @pixi/mixin-cache-as-bitmap - v6.5.7
* Compiled Thu, 20 Oct 2022 15:13:33 UTC
* @pixi/mixin-cache-as-bitmap - v6.5.8
* Compiled Sun, 23 Oct 2022 23:01:45 UTC
*

@@ -8,3 +8,3 @@ * @pixi/mixin-cache-as-bitmap is licensed under the MIT License.

*/
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,a,e,i,s,r,n,_,h,o,c,E,T,l,N,R,A,u,p,d,I=require("@pixi/core"),O=require("@pixi/sprite"),L=require("@pixi/display"),D=require("@pixi/math"),U=require("@pixi/utils"),C=require("@pixi/settings");!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(t||(t={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(a||(a={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(e||(e={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(i||(i={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(s||(s={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(r||(r={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(n||(n={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(_||(_={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(h||(h={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(o||(o={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(c||(c={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(E||(E={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(T||(T={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(l||(l={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(N||(N={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(R||(R={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE",t[t.COLOR=4]="COLOR"}(A||(A={})),function(t){t[t.RED=1]="RED",t[t.GREEN=2]="GREEN",t[t.BLUE=4]="BLUE",t[t.ALPHA=8]="ALPHA"}(u||(u={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(p||(p={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(d||(d={}));var P=new D.Matrix;L.DisplayObject.prototype._cacheAsBitmap=!1,L.DisplayObject.prototype._cacheData=null,L.DisplayObject.prototype._cacheAsBitmapResolution=null,L.DisplayObject.prototype._cacheAsBitmapMultisample=p.NONE;var B=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(L.DisplayObject.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var a;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new B),(a=this._cacheData).originalRender=this.render,a.originalRenderCanvas=this.renderCanvas,a.originalUpdateTransform=this.updateTransform,a.originalCalculateBounds=this.calculateBounds,a.originalGetLocalBounds=this.getLocalBounds,a.originalDestroy=this.destroy,a.originalContainsPoint=this.containsPoint,a.originalMask=this._mask,a.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((a=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=a.originalRender,this.renderCanvas=a.originalRenderCanvas,this.calculateBounds=a.originalCalculateBounds,this.getLocalBounds=a.originalGetLocalBounds,this.destroy=a.originalDestroy,this.updateTransform=a.originalUpdateTransform,this.containsPoint=a.originalContainsPoint,this._mask=a.originalMask,this.filterArea=a.originalFilterArea))}}}),L.DisplayObject.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},L.DisplayObject.prototype._initCachedDisplayObject=function(t){var a;if(!this._cacheData||!this._cacheData.sprite){var e=this.alpha;this.alpha=1,t.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var s=this.filters[0].padding;i.pad(s)}i.ceil(C.settings.RESOLUTION);var r=t.renderTexture.current,n=t.renderTexture.sourceFrame.clone(),_=t.renderTexture.destinationFrame.clone(),h=t.projection.transform,o=I.RenderTexture.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||t.resolution,multisample:null!==(a=this.cacheAsBitmapMultisample)&&void 0!==a?a:t.multisample}),c="cacheAsBitmap_"+U.uid();this._cacheData.textureCacheId=c,I.BaseTexture.addToCache(o.baseTexture,c),I.Texture.addToCache(o,c);var E=this.transform.localTransform.copyTo(P).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:o,clear:!0,transform:E,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=h,t.renderTexture.bind(r,n,_),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=e;var T=new O.Sprite(o);T.transform.worldTransform=this.transform.worldTransform,T.anchor.x=-i.x/i.width,T.anchor.y=-i.y/i.height,T.alpha=e,T._bounds=this._bounds,this._cacheData.sprite=T,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=T.containsPoint.bind(T)}},L.DisplayObject.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},L.DisplayObject.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var a=this.getLocalBounds(null,!0),e=this.alpha;this.alpha=1;var i=t.context,s=t._projTransform;a.ceil(C.settings.RESOLUTION);var r=I.RenderTexture.create({width:a.width,height:a.height}),n="cacheAsBitmap_"+U.uid();this._cacheData.textureCacheId=n,I.BaseTexture.addToCache(r.baseTexture,n),I.Texture.addToCache(r,n);var _=P;this.transform.localTransform.copyTo(_),_.invert(),_.tx-=a.x,_.ty-=a.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:r,clear:!0,transform:_,skipUpdateTransform:!1}),t.context=i,t._projTransform=s,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=e;var h=new O.Sprite(r);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-a.x/a.width,h.anchor.y=-a.y/a.height,h.alpha=e,h._bounds=this._bounds,this._cacheData.sprite=h,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=h.containsPoint.bind(h)}},L.DisplayObject.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},L.DisplayObject.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},L.DisplayObject.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,I.BaseTexture.removeFromCache(this._cacheData.textureCacheId),I.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},L.DisplayObject.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},exports.CacheData=B;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@pixi/core"),a=require("@pixi/sprite"),e=require("@pixi/display"),i=require("@pixi/math"),s=require("@pixi/utils"),r=require("@pixi/settings"),n=require("@pixi/constants"),h=new i.Matrix;e.DisplayObject.prototype._cacheAsBitmap=!1,e.DisplayObject.prototype._cacheData=null,e.DisplayObject.prototype._cacheAsBitmapResolution=null,e.DisplayObject.prototype._cacheAsBitmapMultisample=n.MSAA_QUALITY.NONE;var o=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(e.DisplayObject.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var a;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new o),(a=this._cacheData).originalRender=this.render,a.originalRenderCanvas=this.renderCanvas,a.originalUpdateTransform=this.updateTransform,a.originalCalculateBounds=this.calculateBounds,a.originalGetLocalBounds=this.getLocalBounds,a.originalDestroy=this.destroy,a.originalContainsPoint=this.containsPoint,a.originalMask=this._mask,a.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((a=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=a.originalRender,this.renderCanvas=a.originalRenderCanvas,this.calculateBounds=a.originalCalculateBounds,this.getLocalBounds=a.originalGetLocalBounds,this.destroy=a.originalDestroy,this.updateTransform=a.originalUpdateTransform,this.containsPoint=a.originalContainsPoint,this._mask=a.originalMask,this.filterArea=a.originalFilterArea))}}}),e.DisplayObject.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},e.DisplayObject.prototype._initCachedDisplayObject=function(e){var i;if(!this._cacheData||!this._cacheData.sprite){var n=this.alpha;this.alpha=1,e.batch.flush();var o=this.getLocalBounds(null,!0).clone();if(this.filters&&this.filters.length){var c=this.filters[0].padding;o.pad(c)}o.ceil(r.settings.RESOLUTION);var l=e.renderTexture.current,p=e.renderTexture.sourceFrame.clone(),d=e.renderTexture.destinationFrame.clone(),u=e.projection.transform,m=t.RenderTexture.create({width:o.width,height:o.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:null!==(i=this.cacheAsBitmapMultisample)&&void 0!==i?i:e.multisample}),_="cacheAsBitmap_"+s.uid();this._cacheData.textureCacheId=_,t.BaseTexture.addToCache(m.baseTexture,_),t.Texture.addToCache(m,_);var f=this.transform.localTransform.copyTo(h).invert().translate(-o.x,-o.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:m,clear:!0,transform:f,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=u,e.renderTexture.bind(l,p,d),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var D=new a.Sprite(m);D.transform.worldTransform=this.transform.worldTransform,D.anchor.x=-o.x/o.width,D.anchor.y=-o.y/o.height,D.alpha=n,D._bounds=this._bounds,this._cacheData.sprite=D,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=D.containsPoint.bind(D)}},e.DisplayObject.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},e.DisplayObject.prototype._initCachedDisplayObjectCanvas=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var o=e.context,c=e._projTransform;i.ceil(r.settings.RESOLUTION);var l=t.RenderTexture.create({width:i.width,height:i.height}),p="cacheAsBitmap_"+s.uid();this._cacheData.textureCacheId=p,t.BaseTexture.addToCache(l.baseTexture,p),t.Texture.addToCache(l,p);var d=h;this.transform.localTransform.copyTo(d),d.invert(),d.tx-=i.x,d.ty-=i.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:l,clear:!0,transform:d,skipUpdateTransform:!1}),e.context=o,e._projTransform=c,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var u=new a.Sprite(l);u.transform.worldTransform=this.transform.worldTransform,u.anchor.x=-i.x/i.width,u.anchor.y=-i.y/i.height,u.alpha=n,u._bounds=this._bounds,this._cacheData.sprite=u,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=u.containsPoint.bind(u)}},e.DisplayObject.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},e.DisplayObject.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},e.DisplayObject.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,t.BaseTexture.removeFromCache(this._cacheData.textureCacheId),t.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},e.DisplayObject.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},exports.CacheData=o;
//# sourceMappingURL=mixin-cache-as-bitmap.min.js.map
{
"name": "@pixi/mixin-cache-as-bitmap",
"version": "6.5.7",
"version": "6.5.8",
"main": "dist/cjs/mixin-cache-as-bitmap.js",

@@ -42,10 +42,11 @@ "module": "dist/esm/mixin-cache-as-bitmap.mjs",

"peerDependencies": {
"@pixi/core": "6.5.7",
"@pixi/display": "6.5.7",
"@pixi/math": "6.5.7",
"@pixi/settings": "6.5.7",
"@pixi/sprite": "6.5.7",
"@pixi/utils": "6.5.7"
"@pixi/constants": "6.5.8",
"@pixi/core": "6.5.8",
"@pixi/display": "6.5.8",
"@pixi/math": "6.5.8",
"@pixi/settings": "6.5.8",
"@pixi/sprite": "6.5.8",
"@pixi/utils": "6.5.8"
},
"gitHead": "1a174ba411187720da4ce536c90403004e4253dd"
"gitHead": "bce3b3e5b51ad28527e6284dc02c8e46eff113dd"
}

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