v7.0.0
SveltePixi v7.0.0 brings support for PixiJS v7.3.0. This is the first major version of SveltePixi and the first to support PixiJS v7. Going forward, the major version of SveltePixi will match the major version of PixiJS.
It is advised to read through the PixiJS v7 Migration Guide to get an overview of the changes in PixiJS. Additionally the release notes for v7.2.0 are helpful to learn about the changes the interaction system.
Features
- PixiJS v7 support
- AssetsLoader component (see breaking changes)
- HTMLText component
Breaking Changes
Loader -> AssetsLoader
PIXI.Loader has been replaced by PIXI.Assets so the Loader
component has been replaced by AssetsLoader
. It works similarly but has a few notable differences:
- The
resources
prop is nowassets
. It accepts an array of urls or objects matching the PIXI.UnresolvedAssetObject type. getResource()
has been removed, usePIXI.Assets.get()
insteadgetLoader()
has been removed, usePIXI.Assets
instead- If you need to call
PIXI.Assets.init(config)
, it should be done before rendering this component for the first time.
Interactivity changes
Pixi has replaced the InteractionManager with EventSystem. There are a few changes in behaviour:
-
interactive
andinteractiveChildren
props are now deprecated, please useeventMode
which is available on all DisplayObject-based components. -
eventMode
can be set on<Application>
or<Renderer>
to configure the default setting for components. -
pointermove
,mousemove
, andtouchmove
events have changed to be local to the object. To maintain v6 behaviour, rename them toglobalpointermove
,globalmousemove
, andglobaltouchmove
. -
buttonMode
prop has been removed, seteventMode
and usecursor="pointer"
instead.