Improvements to how and what is stored in the texture caches. (#3834)
* Improvements to how and what is stored in the texture caches. Built upon the good work from https://github.com/pixijs/pixi.js/pull/3789 + For Text, the base textures were in the BaseTextureCache, but textures weren't in the TextureCache. This has been fixed + Now able to tell the BaseTexture the origin of where the canvas being passed through has come from. ie. was it from the text class? was it from the graphic class? was it from caching as a bitmap? More information now to track where these canvases (canvii??) have been generated from + BaseTexture has addBaseTextureToCache and removeBaseTextureFromCache functions, to match regular Texture. Any adding or removing to the BaseTextureCache is now through these functions ! Breaking change. When you call Texture.fromTextureFromCache - it no longer automatically removes it's base texture from the base texture cache. Not sure how people feel about this ? I don't like lines 233 to 236 in Texture.js, and line 591 in BaseTexture.js - I don't see why they are there or why they are needed, but I chickened out on removing them! * Renaming function to more generic names * Adding deprecation layer * Fixed trying to add texture to BaseTexture cache causing unit test fail * Fixed reading from the wrong cache * Able to remove textures and base textures from their caches via object instances Added debug warning if trying to add a texture to a cache id that already exists Added unit tests * Default string for texture origin * Different object creation style * textureCacheId is now an array of potential entries * textureCacheId changed to textureCacheIds * Removed unneeded string creation
batch-dev
bugfix/polygon-offset
dev
dev-blendmode-add-again
dev-canvas-renderer-dirty-transform
dev-graphics-fix-batches
dev-line-join
dev-offscreen-canvas
dev-renderTexture-pool
dev-replace-buble-with-babel
englercj/update-s3
feature-nine-slice-canvas-tint
fix-svg
master
multiple-pointer-down-events
upgrade
v4.x
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0.0-rc.3
v5.0.0-rc.2
v5.0.0-rc
v5.0.0-alpha.3
v5.0.0-alpha.2
v5.0.0-alpha
v5.0.0
v4.8.8
v4.8.7
v4.8.6
v4.8.5
v4.8.4
v4.8.3
v4.8.2
v4.8.1
v4.8.0
v4.7.3
v4.7.2
v4.7.1
v4.7.0
v4.6.2
v4.6.1
v4.6.0
v4.5.6
v4.5.5
v4.5.4
v4.5.3
v4.5.2
v4.5.1
v4.5.0
floattex
|
---|
|
src/core/graphics/Graphics.js |
---|
src/core/text/Text.js |
---|
src/core/textures/BaseTexture.js |
---|
src/core/textures/Spritesheet.js |
---|
src/core/textures/Texture.js |
---|
src/core/textures/VideoBaseTexture.js |
---|
src/core/utils/index.js |
---|
src/deprecation.js |
---|
src/extras/cacheAsBitmap.js |
---|
test/core/BaseTexture.js |
---|
test/core/Bounds.js |
---|
test/core/Spritesheet.js |
---|
test/core/Texture.js |
---|
test/core/index.js |
---|