A day of making working code visible.
Concept of Preloader appeared with basic interface:
Preloader:Image
- show()
- hide()
- setBg(image:Image)
- setBar(image:Image)
- setPercentage(int:Int)
- getPercentage():Int
- ————– PixiJS version may include ————–
- setLoader(loader:Loader)
- getLoader():Loader
11:30 – Challenge – Way of developing through mobile
20:55 – It went quite well do I guess I’ll add first button to change screen 🙂
http://szrapnel.com/ElectroScrapsJS/ElectroScraps.html
LikeLike
Seems like there are many ways to load assets.
Initial Pixi.loader is now deprecated and Pixi.Loader should be used.
Pixi.Loader has premade instance as well reference by:
const loader = PIXI.Loader.shared;
https://pixijs.download/dev/docs/PIXI.Loader.html
LikeLike
It seems preloader with percentage shown is not that straight forward.
Initial implementation of Loader in PixiJS only dispatches an event on file loaded not including bytes etc. There is a way of loading raw data via XHR, but it is relatively daunting task.
It seems not all assets/resources can be loaded via pure PixiJS.
Sounds for example require pixi-sound.js.
https://github.com/pixijs/pixi-sound/releases
For the sounds – you cannot make it play directly after load.
It requires user interaction with the page to be played!
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio
LikeLike