Skip to content

v6.0.0

Compare
Choose a tag to compare
@bigtimebuddy bigtimebuddy released this 02 Mar 21:51
· 2487 commits to main since this release

💥 Breaking Changes

This version is largely compatible with v5 except for a few subtle differences:

Stricter Typings

TypeScript types have been completely re-generated and work for all packages. There are likely subtle differences between v5 types where the new types are much more exact. Also, we have removed the use of PIXI global namespace in typings. If you were previously using that you'll need to convert to module typings.

Removed v4 & v5 Deprecations

Deprecations from v4 and v5 have been removed. It's recommended that you fix all deprecation warnings using the latest v5 release before upgrading.

Change Renderer's Default alpha

The alpha property on the Renderer & Application options is true now by default. For the majority of uses, this change will not have any visible affect (but may improve performance b/c non-alpha mode emulation in software is expensive).

Change failIfMajorPerformanceCaveat Default

PIXI.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT is now false by default. See #7054 for more context.

SVG Images Load Type

The default load type with Loader for SVG images is now text instead of an HTMLImageElement. SVG images loaded with Loader are now SVGResource types instead of ImageResource.

Moved drawStar Method

Graphics drawStar method has been moved to @pixi/graphics-extras, if you're using that, you need to use this optional package (not included in pixi.js or pixi.js-legacy by default). This method was added before graphics-extras and belongs with those optional drawing functions.

Changed Default cacheAsBitmap Resolution Behavior

Prior to v6, the only want to change the resolution on something with cacheAsBitmap set to true was to change PIXI.settings.RESOLUTION. This is no longer the case. cacheAsBitmap now uses the Renderer's resolution by default with an optional local override cacheAsBitmapResolution

🚐 Migration

If you're using TypeScript, make sure the follow is added to your tsconfig.json:

{
  "compilerOptions": {
    "moduleResolution": "node",
    // Required for importing 3rd-party dependencies like EventEmitter3
    "esModuleInterop": true,
    // Loaders needs this to use the more strict mini-signal types
    "paths": {
      "mini-signals": [
        "node_modules/resource-loader/typings/mini-signals.d.ts"
      ]
    },
    "baseUrl": "./",
  }
}

💾 Download

Development Build:

Production Build:

Documentation:

Changed

v5.3.8...v6.0.0

🎁 Added

  • Upgrade to Earcut v2.2.2 (#6802)
  • Add support for depth mask (#6753)
  • Add in uint mappings (#6768)
  • Add Browser Module Bundles (#6832)
  • Allow string2hex to work with css named colors (#6829)
  • Add ability to prefix to a pixiid to textures and base textures, to help track them (#6761)
  • Add TexturePacker's multi pack loading to SpritesheetLoader (#6773)
  • Documentation for Renderer systems (#6875)
  • Add docs table describing frames used by RenderTextureSystem (#6874)
  • Generate kerning information for BitmapFonts (#6888)
  • Add more @pixi/display documentation (#6893)
  • Add @pixi/basis and @pixi/compressed-textures packages (#6796, #6911, #6945, #7020)
  • Use @pixi-build-tools/api-extractor-lerna-monorepo for typings (#6849, #6984, #6999)
  • Formalize Debug and Production Builds (#6947)
  • Add toString methods for debugging (#6960)
  • Support text alignment 'justify' in BitmapText (#6968)
  • Enable scissor mask support by default (#6983)
  • Add overridable TextMetrics.isBreakingSpace for better CJK plugin support (#7023)
  • Add TextMetrics.HEIGHT_MULTIPLIER setting (#7031)
  • Add strict engines support (#7065)
  • Allow passing BaseTexture options to Loader (#7183)
  • Add Generics to Texture, BaseTexture for Resource types (#7246)
  • Add unit-testing support for specific packages (#7128)
  • Add cacheAsBitmapResolution property for local resolution of cacheAsBitmap (#7262)

✏️ Changed

  • Deprecate JSDoc & use Webdoc for documentation generation (#6700, #6985)
  • Remove JSDoc typings generation, support to Node 12 (#6848)
  • Deprecate core's systems and resources internal namespaces (#6857)
  • Removes all legacy deprecations, better deprecation strategy for v6 (#7061, #7182)
  • Deprecate Renderer's transparent option, adds useContextAlpha and backgroundAlpha instead (#7062, #7067, #7072, #7135)
  • FAIL_IF_MAJOR_PERFORMANCE_CAVEAT switched to false by default (#7068)
  • Use @pixi/eslint-config for common style rules across PixiJS projects (#7124)
  • Move drawStar to graphics-extras (#7257)
  • Resolution for cacheAsBitmap is now the Renderer's resolution and not PIXI.settings.RESOLUTION (#7262)
  • Convert the render functions to take options instead of args (#7260)

🐛 Fixed

👏 Contributors: 32