v4.5.0
Overview
Important Note: This release deprecates the support for Bower package manager. If you are using this package manager to pull pixi.js, it will only work up-to-and-excluding version 4.5.0. Please make sure your version does not include version greater than this, e.g., 4 < 4.5.0
.
Download
Development Build:
Production Build:
Documentation:
Changes
🐛 Fixed
- Documentation fixes #3776 #3784 #3843 #3907 #3914 #3922 #3924 #3923 #3925
- Re-added missing polygon tests #3786
- Support for root-relative path in Spritesheet's image loading #3723
- Destroying
Textures
andBaseTextures
does a more thorough clean-up. #3789 - TilingSprite tilePosition was affected by texture rotation. #3831
- Fixes support for AnimatedSprites with more than 1 source texture to the Prepare plugins #3830
- Fixes problem with padding and trim in Text #3858
- Fixes ParticleContainer canvasRenderer resolution #3864
- Fixes TilingSprite canvasRenderer resolution #3896
- Excluding the loaders module
npm run dist -- -e loaders
now works correctly. #3909
🎁 Added
- Adds Spritesheet URL tests #3781
- Adds
textureCacheId
toTexture
, for giving a useful name to reference key in TextureCache. #3789 - Supports cacheAsBitmap for Sprite directly. #3855
- Adds
hitTest
method to InteractionManager #3878 - Adds priority to Ticker handlers, adds the following APIs #3859 #3904
Ticker.prototype.add(fn, context, priority)
Ticker.prototype.addOnce(fn, context, priority)
PIXI.UPDATE_PRIORITY
- Introduces
loader
property the Application class, e.g.,app.loader.load()
#3909 - Adds constructor argument
options.sharedLoader
to Application to opt-in to using the shared Loader. #3909 - Adds
PIXI.loaders.shared
as an alias forPIXI.loader
(conforms to Ticker usagePIXI.ticker.shared
). #3909 - Adds new
PIXI.TextMetrics
class for calculating Text and Font layout sizes. Makes it possible to measure fitting size of text and and a TextStyle for doing auto-fitting of text. #3921 #3908PIXI.TextMetrics.measureText
method for calculating the size of text fill.PIXI.TextMetrics.measureFont
method for calculating the font max and min dimensions.
💰 Changed
- Added alternative Application & Renderer Constructor signatures which add
width
andheight
to a singleoptions
object #3773 - Read
texture
directly via_texture
in Sprite #3780 - Drops support for Bower #3772
- Code consistency with
texture.orig.*
#3785 - Splits the
BasePrepare.register(addHook,uploadHook)
into 2 separate methodsregisterFindHook
andregisterUploadHook
#3830 - Mesh, Rope, Plane refactoring. Its possible to use any texture regions, even rotated ones, without changes of UV coordinates. Its easy to create new generated mesh. #3820
- Code clean-up of SpriteRenderer #3585
- Improvements to how and what is stored in the texture caches. #3834
🚽 Deprecated
- Renamed
Texture.addTextureToCache
toTexture.addToCache
#3834 - Renamed
Texture.removeTextureFromCache
toTexture.removeFromCache
#3834 - Removed Texture and BaseTexture's
textureCacheId
and changed totextureCacheIds
#3834 PIXI.Text.calculateFontProperties
becomesPIXI.TextMetrics.measureFont
#3921PIXI.Text.getFontStyle
becomesPIXI.TextStyle#toFontString
#3921- Deprecates the following private static properties on Text:
fontPropertiesCache
,fontPropertiesCanvas
,fontPropertiesContext
#3921
👍 Contributors: 12
- Andrew Start (@andrewstart)
- atsuo yamada (@ayamada)
- @brenwell
- @finscn
- Ivan Popelyshev (@ivanpopelyshev)
- Luciano Graziani (@lgraziani2712)
- Matt Hicks (@darkfrog26)
- Matt Karl (@bigtimebuddy)
- Dave Moore (@themoonrat)
- Piotr Rachtan (@prachtan)
- @rasentry
- Stafford Williams (@staff0rd)