Demo
https://evofan.github.io/pixijs_test_folk_flappy_bird_copy_v6_js/dist/
Usage
npm install
npm run build
npm run start
memo
Change PixiJS 4.5.4 -> 6.x.x
Change TypeScript -> JavaScript
Add webpack
Add score display
Add background image
TODO:
Adjust the text display position when resizing the stage.
reference
evofan / pixijs_test_folk_flappy_bird_copy
https://github.com/evofan/pixijs_test_folk_flappy_bird_copy
pixi.js - PIXI how to completely remove a sprite - Stack Overflow
https://stackoverflow.com/questions/56333613/pixi-how-to-completely-remove-a-sprite
then you need to both use removeChild as you did, but also clear the mySprite reference.
Uncaught ReferenceError: Cannot access ”***” before initialization at - Qiita
https://qiita.com/tetsu-upstr/items/c15fd0408244db16ed44
実行コードより後に定義した引数を使用した場合や、スコープの外から呼び出した時に表示されるエラーです。
how do you use getchild? - Pixi.js - HTML5 Game Devs Forum
https://www.html5gamedevs.com/topic/44825-how-do-you-use-getchild/