1.0.22 • Published 1 year ago
@kvisaz/phaser-sugar v1.0.22
phaser-sugar
Phaser 3.80 tools and utilities
version 1.0.22
Features
- NiceText - add text in nice style with fontSizePx and wordWrap
- Preload tasks - just write PreloadTask.load(scene, ()=>Promise) to wait async operations in Phaser Load
- font loader
loadFont({
scene, fontFamily: "Title", url: `${urlBase}/BalsamiqSans-Bold.ttf`
});- Align - positioning game objects relative to each other with any origin
- setLeftTop - set left and top of object with any origin
- cssColorToInt - convert css color string To Phaser Int color
- intToCssColor - convert Phaser int color to css color string
- delay - async setTimeout
- tweenPromise - async Phaser tweens
- Deffered - delayed Promise
- async loaders - async sugar for Phaser asset loading in any time
Components
- TextRectangle - rectangle with text, adaptive to text size by default