v8.14.0
๐พ Download
Installation:
npm install pixi.js@8.14.0
Development Build:
- https://cdn.jsdelivr.net/npm/pixi.js@8.14.0/dist/pixi.js
- https://cdn.jsdelivr.net/npm/pixi.js@8.14.0/dist/pixi.mjs
Production Build:
- https://cdn.jsdelivr.net/npm/pixi.js@8.14.0/dist/pixi.min.js
- https://cdn.jsdelivr.net/npm/pixi.js@8.14.0/dist/pixi.min.mjs
Documentation:
- https://pixijs.download/v8.14.0/docs/index.html
Changed
https://github.com/pixijs/pixi.js/compare/v8.13.2...v8.14.0
๐ Added
- feat: add asset loading strategies by @Zyie in https://github.com/pixijs/pixijs/pull/11693
- Three new loading strategies have been introduced:
throw,skip, andretrythrow: The default strategy and matches the behavior of previous versions. With this strategy enabled any asset that fails to load will throw an error and the promise will reject.skip: If any asset fails to load not error is thrown and the loader continues to load other assetsretry: Allow for multiple attempts at loading an asset before an error is thrown. The number of attempts and the delay between attempts are configurable
const options: LoadOptions = { strategy: 'retry', retryCount: 5, // Retry up to 5 times }; await Assets.load('unstable-asset.png', options);await Assets.init({ basePath, loadOptions: { strategy: 'skip', onError: (error, asset) => console.log(error, asset.url) }, }); Assets.addBundle('testBundle', [ { alias: 'bunny', src: 'textures/bunny_no_img.png' }, { alias: 'bunny2', src: 'textures/bunny.png' }, ]); // only bunny2 is defined and did not throw an error const assets = await Assets.loadBundle('testBundle'); - Three new loading strategies have been introduced:
- feat: Adds progress size to asset loading by @Zyie in https://github.com/pixijs/pixijs/pull/11699
- You can provide
progressSizewhen loading assets to get a more accurate loading percentage. If no size is provide the default value is 1.
const assets = [ { src: [ { src: 'textures/texture.webp', progressSize: 900, }, ], alias: ['bunny-array', 'bunny-array2'], }, { src: 'textures/bunny.png', progressSize: 100, } ]; const res = await Assets.load(assets, progressMock); - You can provide
- feat: added rotate to Point math-extras by @unstoppablecarl in https://github.com/pixijs/pixijs/pull/11704
// Basic point rotation const point = new Point(10, 20); const degrees = 45 const radians = degrees * (Math.PI / 180) const result = point.rotate(radians); console.log(result); // {x: -7.071067811865474, y: 21.213203435596427} // Using output point for efficiency const output = new Point(10, 20); point.rotate(90 * (Math.PI / 180), output); console.log(result); // {x: -7.071067811865474, y: 21.213203435596427} - feat: add change guards to TextStyle setters to prevent redundant updates by @mayakwd in https://github.com/pixijs/pixijs/pull/11677
๐ Fixed
- fix: incorrect accessibility div when recycled from the pool (#11679) by @brentmc in https://github.com/pixijs/pixijs/pull/11680
- fix: use updated childrenRenderablesToUpdate index in validateRenderables by @davidetan in https://github.com/pixijs/pixijs/pull/11688
- fix: modify conditional to skip draw call when instanceCount < 1 by @jaburwock in https://github.com/pixijs/pixijs/pull/11639
- fix: respect filter enabled state by @mayakwd in https://github.com/pixijs/pixijs/pull/11674
- fix: ensure
updateTextBoundsis called regardless of style and resolution change by @mayakwd in https://github.com/pixijs/pixijs/pull/11676 - fix: Allow IRenderLayer as part of the ContainerOptions children array by @albinkong in https://github.com/pixijs/pixijs/pull/11687
- fix: removes accessibility system event listeners correctly by @Zyie in https://github.com/pixijs/pixijs/pull/11700
๐งน Chores
- chore: fix outdated
textureSourceOptionsdoc example by @Caden-Hornyak in https://github.com/pixijs/pixijs/pull/11686
New Contributors
- @Caden-Hornyak made their first contribution in https://github.com/pixijs/pixijs/pull/11686
- @jaburwock made their first contribution in https://github.com/pixijs/pixijs/pull/11639
- @unstoppablecarl made their first contribution in https://github.com/pixijs/pixijs/pull/11704