Browse Source

game

master
npmrun 3 years ago
parent
commit
23fd876cd2
  1. 1
      package.json
  2. 277
      pnpm-lock.yaml
  3. BIN
      public/bg.png
  4. 136
      src/Game/Game.ts
  5. 18
      src/Game/Sound.ts
  6. 31
      src/Game/index.ts
  7. 79
      src/components/Button.ts
  8. 34
      src/main.ts
  9. 45
      src/stages/page_loading.ts
  10. 11
      src/stages/welcome/circle.ts
  11. 16
      src/stages/welcome/page_welcome.ts
  12. 1
      tsconfig.json

1
package.json

@ -11,6 +11,7 @@
"license": "ISC",
"dependencies": {
"@pixi/sound": "^4.0.6",
"@tweenjs/tween.js": "^18.6.4",
"pixi.js": "^6.2.0",
"vite": "^2.6.14",
"vite-tsconfig-paths": "^3.3.17"

277
pnpm-lock.yaml

@ -1,7 +1,8 @@
lockfileVersion: 5.3
lockfileVersion: 5.4
specifiers:
'@pixi/sound': ^4.0.6
'@tweenjs/tween.js': ^18.6.4
pixi.js: ^6.2.0
typescript: ^4.5.2
vite: ^2.6.14
@ -9,6 +10,7 @@ specifiers:
dependencies:
'@pixi/sound': registry.npmmirror.com/@pixi/sound/4.0.6
'@tweenjs/tween.js': registry.npmmirror.com/@tweenjs/tween.js/18.6.4
pixi.js: registry.npmmirror.com/pixi.js/6.2.0
vite: registry.npmmirror.com/vite/2.6.14
vite-tsconfig-paths: registry.npmmirror.com/vite-tsconfig-paths/3.3.17_vite@2.6.14
@ -129,7 +131,7 @@ packages:
version: 1.0.0
dev: false
registry.npmmirror.com/@pixi/accessibility/6.2.0_58fc12b7fd2f37c1abc2f4da2783bf55:
registry.npmmirror.com/@pixi/accessibility/6.2.0_ld6bfn75f434dk6c6tncpa57ku:
resolution: {integrity: sha1-kSQAfSGQdjl2nL60u2gC6naMMdU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/accessibility/download/@pixi/accessibility-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/accessibility/6.2.0
name: '@pixi/accessibility'
@ -139,12 +141,12 @@ packages:
'@pixi/display': 6.2.0
'@pixi/utils': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/app/6.2.0_fb4cab40e9188d5691bb899e79bbe270:
registry.npmmirror.com/@pixi/app/6.2.0_7ngkwqhjdcgvnen3rgphto7coa:
resolution: {integrity: sha1-TaG1IuOkS8yNBBp8RIqd2YuwNFI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/app/download/@pixi/app-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/app/6.2.0
name: '@pixi/app'
@ -153,11 +155,11 @@ packages:
'@pixi/core': 6.2.0
'@pixi/display': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
dev: false
registry.npmmirror.com/@pixi/compressed-textures/6.2.0_7a6daee5d83e639f124ad06bfd63bdec:
registry.npmmirror.com/@pixi/compressed-textures/6.2.0_pjw25zoyhzrz6esk2bv72y555q:
resolution: {integrity: sha1-U4MJA4iueVrh7oA3OLJDW7Xshgo=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/compressed-textures/download/@pixi/compressed-textures-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/compressed-textures/6.2.0
name: '@pixi/compressed-textures'
@ -169,9 +171,9 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_4d894d4535dcfa8217a1c1fcc6f78f83
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_jweu2rjv3t5ief5byh6mn54pqm
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/constants/6.2.0:
@ -180,7 +182,7 @@ packages:
version: 6.2.0
dev: false
registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24:
registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq:
resolution: {integrity: sha1-4d5Fpt8KlyDOxIQxOgFhm8zmeDU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/core/download/@pixi/core-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/core/6.2.0
name: '@pixi/core'
@ -198,10 +200,10 @@ packages:
'@pixi/runner': registry.npmmirror.com/@pixi/runner/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/ticker': registry.npmmirror.com/@pixi/ticker/6.2.0_@pixi+settings@6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5:
registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u:
resolution: {integrity: sha1-OpF9rVBWuC3SW6Mi8JXXSvfAj9A=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/display/download/@pixi/display-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/display/6.2.0
name: '@pixi/display'
@ -213,10 +215,10 @@ packages:
dependencies:
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/extract/6.2.0_a845de5cca34734c46c0139b2ba593be:
registry.npmmirror.com/@pixi/extract/6.2.0_vbc54xgkgrzuyrwaconsxjmtxy:
resolution: {integrity: sha1-zH9kN5pZ+NJ7DFz9BOrd77dLEJ0=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/extract/download/@pixi/extract-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/extract/6.2.0
name: '@pixi/extract'
@ -226,9 +228,9 @@ packages:
'@pixi/math': 6.2.0
'@pixi/utils': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/filter-alpha/6.2.0_@pixi+core@6.2.0:
@ -239,10 +241,10 @@ packages:
peerDependencies:
'@pixi/core': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
dev: false
registry.npmmirror.com/@pixi/filter-blur/6.2.0_40b2282754a92bcb3ceb6a7f9cfa9402:
registry.npmmirror.com/@pixi/filter-blur/6.2.0_iczcqj2uvev4wphlnj7zz6uuai:
resolution: {integrity: sha1-rqWnBNz7hiFEODcaBVH66uB0c0w=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/filter-blur/download/@pixi/filter-blur-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/filter-blur/6.2.0
name: '@pixi/filter-blur'
@ -251,7 +253,7 @@ packages:
'@pixi/core': 6.2.0
'@pixi/settings': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
dev: false
@ -263,10 +265,10 @@ packages:
peerDependencies:
'@pixi/core': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
dev: false
registry.npmmirror.com/@pixi/filter-displacement/6.2.0_b056af2b3c9375aba44e6681d8696765:
registry.npmmirror.com/@pixi/filter-displacement/6.2.0_wblk6kz4sn22xjcom2a5q2lhmu:
resolution: {integrity: sha1-4baMYO7Y9nmVqkKFBLKL92RvSmQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/filter-displacement/download/@pixi/filter-displacement-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/filter-displacement/6.2.0
name: '@pixi/filter-displacement'
@ -275,7 +277,7 @@ packages:
'@pixi/core': 6.2.0
'@pixi/math': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
dev: false
@ -287,7 +289,7 @@ packages:
peerDependencies:
'@pixi/core': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
dev: false
registry.npmmirror.com/@pixi/filter-noise/6.2.0_@pixi+core@6.2.0:
@ -298,10 +300,10 @@ packages:
peerDependencies:
'@pixi/core': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
dev: false
registry.npmmirror.com/@pixi/graphics/6.2.0_2292c53493e3a7889a62a81b6fcdb3d1:
registry.npmmirror.com/@pixi/graphics/6.2.0_ekjmknet4otyrgtcvanw7tnt2e:
resolution: {integrity: sha1-U4XH+dWzic2UP7UyVR/QNq9p0JM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/graphics/download/@pixi/graphics-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/graphics/6.2.0
name: '@pixi/graphics'
@ -315,14 +317,14 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/interaction/6.2.0_24ab942bd213fc419b77bac88d1ec8f4:
registry.npmmirror.com/@pixi/interaction/6.2.0_esvzik6scp6edg3xxlei2hwi6q:
resolution: {integrity: sha1-2cvpuivFL2ijcGe0ZPs14L8aPx8=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/interaction/download/@pixi/interaction-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/interaction/6.2.0
name: '@pixi/interaction'
@ -334,14 +336,14 @@ packages:
'@pixi/ticker': 6.2.0
'@pixi/utils': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/ticker': registry.npmmirror.com/@pixi/ticker/6.2.0_@pixi+settings@6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/loaders/6.2.0_4d894d4535dcfa8217a1c1fcc6f78f83:
registry.npmmirror.com/@pixi/loaders/6.2.0_jweu2rjv3t5ief5byh6mn54pqm:
resolution: {integrity: sha1-PCHoOO6SZGTvjbOt7dZ8XDgBq6U=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/loaders/download/@pixi/loaders-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/loaders/6.2.0
name: '@pixi/loaders'
@ -352,8 +354,8 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/math/6.2.0:
@ -362,7 +364,7 @@ packages:
version: 6.2.0
dev: false
registry.npmmirror.com/@pixi/mesh-extras/6.2.0_9d9c1f12a46a449d2c1bca8cd2ff691b:
registry.npmmirror.com/@pixi/mesh-extras/6.2.0_twob6evenjcj2la3zkgnf73jdm:
resolution: {integrity: sha1-q4wClvkgA2MoOxo1c3ztS1/sfyI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/mesh-extras/download/@pixi/mesh-extras-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/mesh-extras/6.2.0
name: '@pixi/mesh-extras'
@ -375,13 +377,13 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/mesh': registry.npmmirror.com/@pixi/mesh/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/mesh': registry.npmmirror.com/@pixi/mesh/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/mesh/6.2.0_7e07a66fa10ac2a03a54c77871fa0870:
registry.npmmirror.com/@pixi/mesh/6.2.0_pyd2m35bblbkaosuy54hd6qioa:
resolution: {integrity: sha1-ttWth/57OVXiR0/9X/g7Uyg6qS4=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/mesh/download/@pixi/mesh-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/mesh/6.2.0
name: '@pixi/mesh'
@ -395,14 +397,14 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/mixin-cache-as-bitmap/6.2.0_2d464e04a3abe664c4187b3fb50838ab:
registry.npmmirror.com/@pixi/mixin-cache-as-bitmap/6.2.0_fvde4bfdvptgjraypm73kcbyvm:
resolution: {integrity: sha1-5ZMOB/WK8pi6/pMDrUhB92RL+ls=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/mixin-cache-as-bitmap/download/@pixi/mixin-cache-as-bitmap-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/mixin-cache-as-bitmap/6.2.0
name: '@pixi/mixin-cache-as-bitmap'
@ -415,12 +417,12 @@ packages:
'@pixi/sprite': 6.2.0
'@pixi/utils': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/mixin-get-child-by-name/6.2.0_@pixi+display@6.2.0:
@ -431,10 +433,10 @@ packages:
peerDependencies:
'@pixi/display': 6.2.0
dependencies:
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
dev: false
registry.npmmirror.com/@pixi/mixin-get-global-position/6.2.0_636186f97f53d395946b2d4a43fad83a:
registry.npmmirror.com/@pixi/mixin-get-global-position/6.2.0_mnqyn6l7kpjzlfdlfvfeh6wyhi:
resolution: {integrity: sha1-mQQ65kwNe1ybuZ79L5vk5+EGldI=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/mixin-get-global-position/download/@pixi/mixin-get-global-position-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/mixin-get-global-position/6.2.0
name: '@pixi/mixin-get-global-position'
@ -443,11 +445,11 @@ packages:
'@pixi/display': 6.2.0
'@pixi/math': 6.2.0
dependencies:
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
dev: false
registry.npmmirror.com/@pixi/particle-container/6.2.0_39e0071220fe4bb6ab4f282aa5e1181a:
registry.npmmirror.com/@pixi/particle-container/6.2.0_hhqaoera7zf3nk2pfavklyiydi:
resolution: {integrity: sha1-xdIWiJHHLymSaKUSTRnJ4NRcRXU=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/particle-container/download/@pixi/particle-container-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/particle-container/6.2.0
name: '@pixi/particle-container'
@ -460,10 +462,10 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/polyfill/6.2.0:
@ -475,7 +477,7 @@ packages:
promise-polyfill: registry.npmmirror.com/promise-polyfill/8.2.1
dev: false
registry.npmmirror.com/@pixi/prepare/6.2.0_bb1c72bb67895db1f5a2114664971d09:
registry.npmmirror.com/@pixi/prepare/6.2.0_xmohfo3hrfo3d5nccfdgjfy5be:
resolution: {integrity: sha1-Cv0tT5bXhk8R10nW/7wxrIOyxo8=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/prepare/download/@pixi/prepare-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/prepare/6.2.0
name: '@pixi/prepare'
@ -488,11 +490,11 @@ packages:
'@pixi/text': 6.2.0
'@pixi/ticker': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/graphics': registry.npmmirror.com/@pixi/graphics/6.2.0_2292c53493e3a7889a62a81b6fcdb3d1
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/graphics': registry.npmmirror.com/@pixi/graphics/6.2.0_ekjmknet4otyrgtcvanw7tnt2e
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/text': registry.npmmirror.com/@pixi/text/6.2.0_638865d25fe7e5012ba2e65d77640919
'@pixi/text': registry.npmmirror.com/@pixi/text/6.2.0_moeglus747sqck5c4zoxozajde
'@pixi/ticker': registry.npmmirror.com/@pixi/ticker/6.2.0_@pixi+settings@6.2.0
dev: false
@ -514,7 +516,6 @@ packages:
resolution: {integrity: sha1-KfNH9Sexa4CwFDcbU8fSxJfAGxQ=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/sound/download/@pixi/sound-4.0.6.tgz}
name: '@pixi/sound'
version: 4.0.6
engines: {node: '>=12', npm: '>=7', yarn: please-use-npm}
peerDependencies:
'@pixi/core': '>=5'
'@pixi/loaders': '>=5'
@ -522,7 +523,7 @@ packages:
'@pixi/utils': '>=5'
dev: false
registry.npmmirror.com/@pixi/sprite-animated/6.2.0_def23276f715b15ee8a0503c2828bc32:
registry.npmmirror.com/@pixi/sprite-animated/6.2.0_33zde5xxcwyv52faka6cqkf4gi:
resolution: {integrity: sha1-sz3oBRKyNfg72CTTEX4IXqWrm/c=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/sprite-animated/download/@pixi/sprite-animated-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/sprite-animated/6.2.0
name: '@pixi/sprite-animated'
@ -532,12 +533,12 @@ packages:
'@pixi/sprite': 6.2.0
'@pixi/ticker': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/ticker': registry.npmmirror.com/@pixi/ticker/6.2.0_@pixi+settings@6.2.0
dev: false
registry.npmmirror.com/@pixi/sprite-tiling/6.2.0_2292c53493e3a7889a62a81b6fcdb3d1:
registry.npmmirror.com/@pixi/sprite-tiling/6.2.0_ekjmknet4otyrgtcvanw7tnt2e:
resolution: {integrity: sha1-m5JQPgToqQ2TvB+xncna0VkBwHM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/sprite-tiling/download/@pixi/sprite-tiling-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/sprite-tiling/6.2.0
name: '@pixi/sprite-tiling'
@ -551,14 +552,14 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870:
registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa:
resolution: {integrity: sha1-gPO6PwtxTQoTJ5+kogT5V+V2Y7U=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/sprite/download/@pixi/sprite-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/sprite/6.2.0
name: '@pixi/sprite'
@ -572,14 +573,14 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/spritesheet/6.2.0_fd6481d532c700da7c2f6a334e42dc68:
registry.npmmirror.com/@pixi/spritesheet/6.2.0_7vsidvjsy4anu7bpnizu4qw4na:
resolution: {integrity: sha1-xDXAobvrEdvL4APVeaETCH12wvo=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/spritesheet/download/@pixi/spritesheet-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/spritesheet/6.2.0
name: '@pixi/spritesheet'
@ -590,13 +591,13 @@ packages:
'@pixi/math': 6.2.0
'@pixi/utils': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_4d894d4535dcfa8217a1c1fcc6f78f83
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_jweu2rjv3t5ief5byh6mn54pqm
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/text-bitmap/6.2.0_aefff18b8f7bcd968a57c917f9e0bbc7:
registry.npmmirror.com/@pixi/text-bitmap/6.2.0_v377dc4pppgzncsxzel7tyf3y4:
resolution: {integrity: sha1-DEENStKjivAPxATqslCOgBuYXfM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/text-bitmap/download/@pixi/text-bitmap-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/text-bitmap/6.2.0
name: '@pixi/text-bitmap'
@ -613,17 +614,17 @@ packages:
'@pixi/utils': 6.2.0
dependencies:
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_4d894d4535dcfa8217a1c1fcc6f78f83
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_jweu2rjv3t5ief5byh6mn54pqm
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/mesh': registry.npmmirror.com/@pixi/mesh/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/mesh': registry.npmmirror.com/@pixi/mesh/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/text': registry.npmmirror.com/@pixi/text/6.2.0_638865d25fe7e5012ba2e65d77640919
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/text': registry.npmmirror.com/@pixi/text/6.2.0_moeglus747sqck5c4zoxozajde
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/text/6.2.0_638865d25fe7e5012ba2e65d77640919:
registry.npmmirror.com/@pixi/text/6.2.0_moeglus747sqck5c4zoxozajde:
resolution: {integrity: sha1-6wslzP7a9+hWzvYkdkesquebkko=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/text/download/@pixi/text-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/text/6.2.0
name: '@pixi/text'
@ -635,11 +636,11 @@ packages:
'@pixi/sprite': 6.2.0
'@pixi/utils': 6.2.0
dependencies:
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/@pixi/ticker/6.2.0_@pixi+settings@6.2.0:
@ -653,7 +654,7 @@ packages:
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
dev: false
registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6:
registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y:
resolution: {integrity: sha1-15w2HzRVKh8mZX/DvtXl4veTAbM=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@pixi/utils/download/@pixi/utils-6.2.0.tgz}
id: registry.npmmirror.com/@pixi/utils/6.2.0
name: '@pixi/utils'
@ -670,6 +671,12 @@ packages:
url: registry.nlark.com/url/0.11.0
dev: false
registry.npmmirror.com/@tweenjs/tween.js/18.6.4:
resolution: {integrity: sha512-lB9lMjuqjtuJrx7/kOkqQBtllspPIN+96OvTCeJ2j5FEzinoAXTdAMFnDAQT1KVPRlnYfBrqxtqP66vDM40xxQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@tweenjs/tween.js/-/tween.js-18.6.4.tgz}
name: '@tweenjs/tween.js'
version: 18.6.4
dev: false
registry.npmmirror.com/@types/earcut/2.1.1:
resolution: {integrity: sha1-VzoK9gnxcAXHUfb0/+xJz+NY6lE=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/@types/earcut/download/@types/earcut-2.1.1.tgz}
name: '@types/earcut'
@ -697,7 +704,7 @@ packages:
dev: false
registry.npmmirror.com/esbuild-android-arm64/0.13.15:
resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-android-arm64/download/esbuild-android-arm64-0.13.15.tgz}
resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.15.tgz}
name: esbuild-android-arm64
version: 0.13.15
cpu: [arm64]
@ -707,7 +714,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-darwin-64/0.13.15:
resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-darwin-64/download/esbuild-darwin-64-0.13.15.tgz}
resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.15.tgz}
name: esbuild-darwin-64
version: 0.13.15
cpu: [x64]
@ -717,7 +724,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-darwin-arm64/0.13.15:
resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-darwin-arm64/download/esbuild-darwin-arm64-0.13.15.tgz}
resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.15.tgz}
name: esbuild-darwin-arm64
version: 0.13.15
cpu: [arm64]
@ -727,7 +734,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-freebsd-64/0.13.15:
resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-freebsd-64/download/esbuild-freebsd-64-0.13.15.tgz}
resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.15.tgz}
name: esbuild-freebsd-64
version: 0.13.15
cpu: [x64]
@ -737,7 +744,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-freebsd-arm64/0.13.15:
resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-freebsd-arm64/download/esbuild-freebsd-arm64-0.13.15.tgz}
resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.15.tgz}
name: esbuild-freebsd-arm64
version: 0.13.15
cpu: [arm64]
@ -747,7 +754,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-linux-32/0.13.15:
resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-32/download/esbuild-linux-32-0.13.15.tgz}
resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.13.15.tgz}
name: esbuild-linux-32
version: 0.13.15
cpu: [ia32]
@ -757,7 +764,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-linux-64/0.13.15:
resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-64/download/esbuild-linux-64-0.13.15.tgz}
resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.13.15.tgz}
name: esbuild-linux-64
version: 0.13.15
cpu: [x64]
@ -767,7 +774,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-linux-arm/0.13.15:
resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-arm/download/esbuild-linux-arm-0.13.15.tgz}
resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.15.tgz}
name: esbuild-linux-arm
version: 0.13.15
cpu: [arm]
@ -777,7 +784,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-linux-arm64/0.13.15:
resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-arm64/download/esbuild-linux-arm64-0.13.15.tgz}
resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.15.tgz}
name: esbuild-linux-arm64
version: 0.13.15
cpu: [arm64]
@ -787,7 +794,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-linux-mips64le/0.13.15:
resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-mips64le/download/esbuild-linux-mips64le-0.13.15.tgz}
resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.15.tgz}
name: esbuild-linux-mips64le
version: 0.13.15
cpu: [mips64el]
@ -797,7 +804,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-linux-ppc64le/0.13.15:
resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-ppc64le/download/esbuild-linux-ppc64le-0.13.15.tgz}
resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.15.tgz}
name: esbuild-linux-ppc64le
version: 0.13.15
cpu: [ppc64]
@ -807,7 +814,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-netbsd-64/0.13.15:
resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-netbsd-64/download/esbuild-netbsd-64-0.13.15.tgz}
resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.15.tgz}
name: esbuild-netbsd-64
version: 0.13.15
cpu: [x64]
@ -817,7 +824,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-openbsd-64/0.13.15:
resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-openbsd-64/download/esbuild-openbsd-64-0.13.15.tgz}
resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.15.tgz}
name: esbuild-openbsd-64
version: 0.13.15
cpu: [x64]
@ -827,7 +834,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-sunos-64/0.13.15:
resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-sunos-64/download/esbuild-sunos-64-0.13.15.tgz}
resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.15.tgz}
name: esbuild-sunos-64
version: 0.13.15
cpu: [x64]
@ -837,7 +844,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-windows-32/0.13.15:
resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-windows-32/download/esbuild-windows-32-0.13.15.tgz}
resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.13.15.tgz}
name: esbuild-windows-32
version: 0.13.15
cpu: [ia32]
@ -847,7 +854,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-windows-64/0.13.15:
resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-windows-64/download/esbuild-windows-64-0.13.15.tgz}
resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.13.15.tgz}
name: esbuild-windows-64
version: 0.13.15
cpu: [x64]
@ -857,7 +864,7 @@ packages:
optional: true
registry.npmmirror.com/esbuild-windows-arm64/0.13.15:
resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-windows-arm64/download/esbuild-windows-arm64-0.13.15.tgz}
resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.15.tgz}
name: esbuild-windows-arm64
version: 0.13.15
cpu: [arm64]
@ -893,7 +900,7 @@ packages:
dev: false
registry.npmmirror.com/fsevents/2.3.2:
resolution: {integrity: sha1-ilJveLj99GI7cJ4Ll1xSwkwC/Ro=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/download/fsevents-2.3.2.tgz}
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz}
name: fsevents
version: 2.3.2
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@ -947,41 +954,41 @@ packages:
name: pixi.js
version: 6.2.0
dependencies:
'@pixi/accessibility': registry.npmmirror.com/@pixi/accessibility/6.2.0_58fc12b7fd2f37c1abc2f4da2783bf55
'@pixi/app': registry.npmmirror.com/@pixi/app/6.2.0_fb4cab40e9188d5691bb899e79bbe270
'@pixi/compressed-textures': registry.npmmirror.com/@pixi/compressed-textures/6.2.0_7a6daee5d83e639f124ad06bfd63bdec
'@pixi/accessibility': registry.npmmirror.com/@pixi/accessibility/6.2.0_ld6bfn75f434dk6c6tncpa57ku
'@pixi/app': registry.npmmirror.com/@pixi/app/6.2.0_7ngkwqhjdcgvnen3rgphto7coa
'@pixi/compressed-textures': registry.npmmirror.com/@pixi/compressed-textures/6.2.0_pjw25zoyhzrz6esk2bv72y555q
'@pixi/constants': registry.npmmirror.com/@pixi/constants/6.2.0
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_9c056a36e824121fca2a99589f9e1a24
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_cfaf70c04def111481844c29c1e79dd5
'@pixi/extract': registry.npmmirror.com/@pixi/extract/6.2.0_a845de5cca34734c46c0139b2ba593be
'@pixi/core': registry.npmmirror.com/@pixi/core/6.2.0_tqcwunxieqjb7srktfmj7hq2eq
'@pixi/display': registry.npmmirror.com/@pixi/display/6.2.0_z6xxbqcn54irjamejqu4dz452u
'@pixi/extract': registry.npmmirror.com/@pixi/extract/6.2.0_vbc54xgkgrzuyrwaconsxjmtxy
'@pixi/filter-alpha': registry.npmmirror.com/@pixi/filter-alpha/6.2.0_@pixi+core@6.2.0
'@pixi/filter-blur': registry.npmmirror.com/@pixi/filter-blur/6.2.0_40b2282754a92bcb3ceb6a7f9cfa9402
'@pixi/filter-blur': registry.npmmirror.com/@pixi/filter-blur/6.2.0_iczcqj2uvev4wphlnj7zz6uuai
'@pixi/filter-color-matrix': registry.npmmirror.com/@pixi/filter-color-matrix/6.2.0_@pixi+core@6.2.0
'@pixi/filter-displacement': registry.npmmirror.com/@pixi/filter-displacement/6.2.0_b056af2b3c9375aba44e6681d8696765
'@pixi/filter-displacement': registry.npmmirror.com/@pixi/filter-displacement/6.2.0_wblk6kz4sn22xjcom2a5q2lhmu
'@pixi/filter-fxaa': registry.npmmirror.com/@pixi/filter-fxaa/6.2.0_@pixi+core@6.2.0
'@pixi/filter-noise': registry.npmmirror.com/@pixi/filter-noise/6.2.0_@pixi+core@6.2.0
'@pixi/graphics': registry.npmmirror.com/@pixi/graphics/6.2.0_2292c53493e3a7889a62a81b6fcdb3d1
'@pixi/interaction': registry.npmmirror.com/@pixi/interaction/6.2.0_24ab942bd213fc419b77bac88d1ec8f4
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_4d894d4535dcfa8217a1c1fcc6f78f83
'@pixi/graphics': registry.npmmirror.com/@pixi/graphics/6.2.0_ekjmknet4otyrgtcvanw7tnt2e
'@pixi/interaction': registry.npmmirror.com/@pixi/interaction/6.2.0_esvzik6scp6edg3xxlei2hwi6q
'@pixi/loaders': registry.npmmirror.com/@pixi/loaders/6.2.0_jweu2rjv3t5ief5byh6mn54pqm
'@pixi/math': registry.npmmirror.com/@pixi/math/6.2.0
'@pixi/mesh': registry.npmmirror.com/@pixi/mesh/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/mesh-extras': registry.npmmirror.com/@pixi/mesh-extras/6.2.0_9d9c1f12a46a449d2c1bca8cd2ff691b
'@pixi/mixin-cache-as-bitmap': registry.npmmirror.com/@pixi/mixin-cache-as-bitmap/6.2.0_2d464e04a3abe664c4187b3fb50838ab
'@pixi/mesh': registry.npmmirror.com/@pixi/mesh/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/mesh-extras': registry.npmmirror.com/@pixi/mesh-extras/6.2.0_twob6evenjcj2la3zkgnf73jdm
'@pixi/mixin-cache-as-bitmap': registry.npmmirror.com/@pixi/mixin-cache-as-bitmap/6.2.0_fvde4bfdvptgjraypm73kcbyvm
'@pixi/mixin-get-child-by-name': registry.npmmirror.com/@pixi/mixin-get-child-by-name/6.2.0_@pixi+display@6.2.0
'@pixi/mixin-get-global-position': registry.npmmirror.com/@pixi/mixin-get-global-position/6.2.0_636186f97f53d395946b2d4a43fad83a
'@pixi/particle-container': registry.npmmirror.com/@pixi/particle-container/6.2.0_39e0071220fe4bb6ab4f282aa5e1181a
'@pixi/mixin-get-global-position': registry.npmmirror.com/@pixi/mixin-get-global-position/6.2.0_mnqyn6l7kpjzlfdlfvfeh6wyhi
'@pixi/particle-container': registry.npmmirror.com/@pixi/particle-container/6.2.0_hhqaoera7zf3nk2pfavklyiydi
'@pixi/polyfill': registry.npmmirror.com/@pixi/polyfill/6.2.0
'@pixi/prepare': registry.npmmirror.com/@pixi/prepare/6.2.0_bb1c72bb67895db1f5a2114664971d09
'@pixi/prepare': registry.npmmirror.com/@pixi/prepare/6.2.0_xmohfo3hrfo3d5nccfdgjfy5be
'@pixi/runner': registry.npmmirror.com/@pixi/runner/6.2.0
'@pixi/settings': registry.npmmirror.com/@pixi/settings/6.2.0
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_7e07a66fa10ac2a03a54c77871fa0870
'@pixi/sprite-animated': registry.npmmirror.com/@pixi/sprite-animated/6.2.0_def23276f715b15ee8a0503c2828bc32
'@pixi/sprite-tiling': registry.npmmirror.com/@pixi/sprite-tiling/6.2.0_2292c53493e3a7889a62a81b6fcdb3d1
'@pixi/spritesheet': registry.npmmirror.com/@pixi/spritesheet/6.2.0_fd6481d532c700da7c2f6a334e42dc68
'@pixi/text': registry.npmmirror.com/@pixi/text/6.2.0_638865d25fe7e5012ba2e65d77640919
'@pixi/text-bitmap': registry.npmmirror.com/@pixi/text-bitmap/6.2.0_aefff18b8f7bcd968a57c917f9e0bbc7
'@pixi/sprite': registry.npmmirror.com/@pixi/sprite/6.2.0_pyd2m35bblbkaosuy54hd6qioa
'@pixi/sprite-animated': registry.npmmirror.com/@pixi/sprite-animated/6.2.0_33zde5xxcwyv52faka6cqkf4gi
'@pixi/sprite-tiling': registry.npmmirror.com/@pixi/sprite-tiling/6.2.0_ekjmknet4otyrgtcvanw7tnt2e
'@pixi/spritesheet': registry.npmmirror.com/@pixi/spritesheet/6.2.0_7vsidvjsy4anu7bpnizu4qw4na
'@pixi/text': registry.npmmirror.com/@pixi/text/6.2.0_moeglus747sqck5c4zoxozajde
'@pixi/text-bitmap': registry.npmmirror.com/@pixi/text-bitmap/6.2.0_v377dc4pppgzncsxzel7tyf3y4
'@pixi/ticker': registry.npmmirror.com/@pixi/ticker/6.2.0_@pixi+settings@6.2.0
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_c4ab63ddb526c201eb0a33f09a7ed4f6
'@pixi/utils': registry.npmmirror.com/@pixi/utils/6.2.0_ysvwhxnve3bad2ykgpyju7wu6y
dev: false
registry.npmmirror.com/postcss/8.3.11:

BIN
public/bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

136
src/Game/Game.ts

@ -4,12 +4,15 @@ import {
AbstractRenderer,
Ticker,
Loader,
utils,
} from "pixi.js";
import detectOrient from "./detectOrient";
import { EDirection } from "@/enmu";
export default class Game {
constructor() {}
constructor() {
this.init()
}
private static instance: Game = new Game();
public static getInstance(): Game {
@ -23,6 +26,7 @@ export default class Game {
private _renderer: AbstractRenderer;
private _ticker: Ticker;
private _loader: Loader;
private direction: EDirection = EDirection.Portrait;
public get renderer(): AbstractRenderer {
return this._renderer;
@ -37,17 +41,79 @@ export default class Game {
public get loader(): Loader {
return this._loader;
}
public get utils() {
return utils;
}
public info = {
width: 0,
height: 0,
};
getInfo() {
return this.info;
}
getInfo(){
return this.info
setDirection(direction: EDirection) {
this.direction = direction;
this.updateView()
}
updateView() {
let screenWidght = document.documentElement.clientWidth;
let screenHeight = document.documentElement.clientHeight;
this.renderer.resize(screenWidght, screenHeight);
let offsetWidth = 0;
let offsetHeight = 0;
const curDirection = detectOrient();
if (curDirection === EDirection.Landscape) {
offsetWidth = screenHeight;
offsetHeight = screenWidght;
} else {
offsetWidth = screenWidght;
offsetHeight = screenHeight;
}
this.info.width = offsetWidth;
this.info.height = offsetHeight;
const designWidth = 750;
if (this.direction == EDirection.Landscape) {
/// 强制竖屏
if (curDirection === "landscape") {
[screenWidght, screenHeight] = [screenHeight, screenWidght];
this.stage.rotation = -Math.PI / 2;
this.stage.y = screenWidght;
} else {
this.stage.rotation = 0;
this.stage.y = 0;
}
let screenScaleRito = screenWidght / designWidth;
this.stage.scale.set(screenScaleRito, screenScaleRito);
// stage.position.set(0, 0);
this.info.width = offsetWidth / screenScaleRito;
this.info.height = offsetHeight / screenScaleRito;
} else {
/// 强制横屏
if (curDirection === EDirection.Landscape) {
this.stage.rotation = 0;
this.stage.y = 0;
let screenScaleRito = offsetWidth / designWidth;
this.stage.scale.set(screenScaleRito, screenScaleRito);
this.info.width = offsetHeight / screenScaleRito;
this.info.height = offsetWidth / screenScaleRito;
} else {
this.stage.rotation = -Math.PI / 2;
this.stage.y = offsetHeight;
let screenScaleRito = offsetWidth / designWidth;
this.stage.scale.set(screenScaleRito, screenScaleRito);
this.info.width = offsetHeight / screenScaleRito;
this.info.height = offsetWidth / screenScaleRito;
}
}
}
init(direction: EDirection = EDirection.Portrait) {
init() {
let screenWidght = document.documentElement.clientWidth;
let screenHeight = document.documentElement.clientHeight;
const stage = new Container();
@ -65,63 +131,11 @@ export default class Game {
this._renderer = renderer;
document.body.appendChild(renderer.view);
const updateView = () => {
let screenWidght = document.documentElement.clientWidth;
let screenHeight = document.documentElement.clientHeight;
renderer.resize(screenWidght, screenHeight);
let offsetWidth = 0;
let offsetHeight = 0;
const curDirection = detectOrient();
if (curDirection === EDirection.Landscape) {
offsetWidth = screenHeight;
offsetHeight = screenWidght;
} else {
offsetWidth = screenWidght;
offsetHeight = screenHeight;
}
this.info.width = offsetWidth
this.info.height = offsetHeight
const designWidth = 750;
if (direction == EDirection.Landscape) {
/// 强制竖屏
if (curDirection === "landscape") {
[screenWidght, screenHeight] = [screenHeight, screenWidght];
stage.rotation = -Math.PI / 2;
stage.y = screenWidght;
} else {
stage.rotation = 0;
stage.y = 0;
}
let screenScaleRito = screenWidght / designWidth;
stage.scale.set(screenScaleRito, screenScaleRito);
// stage.position.set(0, 0);
this.info.width = offsetWidth/screenScaleRito
this.info.height = offsetHeight/screenScaleRito
} else {
/// 强制横屏
if (curDirection === EDirection.Landscape) {
stage.rotation = 0;
stage.y = 0;
let screenScaleRito = offsetWidth / designWidth;
stage.scale.set(screenScaleRito, screenScaleRito);
this.info.width = offsetHeight/screenScaleRito
this.info.height = offsetWidth/screenScaleRito
} else {
stage.rotation = -Math.PI / 2;
stage.y = offsetHeight;
let screenScaleRito = offsetWidth / designWidth;
stage.scale.set(screenScaleRito, screenScaleRito);
this.info.width = offsetHeight/screenScaleRito
this.info.height = offsetWidth/screenScaleRito
}
}
};
updateView();
window.addEventListener("resize", function () {
updateView();
this.updateView();
window.addEventListener("resize", () => {
this.updateView();
});
const ticker = new Ticker();
ticker.autoStart = true;
this._ticker = ticker;
@ -130,7 +144,7 @@ export default class Game {
this._loader = loader;
}
render(dt?:number){
render(dt?: number) {
this.renderer.render(this.stage);
}

18
src/Game/Sound.ts

@ -1,10 +1,12 @@
import { sound } from '@pixi/sound';
import { sound } from "@pixi/sound";
import { LoaderResource } from "pixi.js";
const Sound = sound.add('my-sound', {
url: "/bg.mp3",
autoPlay: true
});
console.log(Sound);
export default sound
export function addSound(e: LoaderResource) {
sound.add(e.name, {
source: e.data,
singleInstance: true,
autoPlay: false,
});
}
export default sound;

31
src/Game/index.ts

@ -5,7 +5,6 @@ import { EDirection, EP } from "@/enmu";
const gameManager = Game.getInstance();
const stageManager = Stage.getInstance();
gameManager.init(EDirection.Landscape);
const windows: Record<string, IWindow>= {}
const residentList: IWindow[] = []
@ -20,6 +19,7 @@ function defineWindow(name: string, abstractClass: Constructor<IWindow>, type?:
windows[name] = stageClass
}
type Constructor<T> = new (...args: any[]) => T;
interface IWindow {
stage: Container;
@ -28,6 +28,35 @@ interface IWindow {
lateUpdate?(dt: number, name: string): void;
update?(dt: number, name: string): void;
}
// 场景切换监听
stageManager.watchStageChange((stage, lastStage) => {
if (lastStage && lastStage.type === EP.Normal) {
let lastWindow = windows[lastStage.name];
lastWindow.onUnLoad && lastWindow.onUnLoad();
}
if (stage && stage.type === EP.Normal) {
let curWindow = windows[stage.name];
curWindow.onLoad && curWindow.onLoad();
}
});
gameManager.ticker.add((dt: number) => {
if (!stageManager.curStage) return;
let curWindow = windows[stageManager.curStage.name];
residentList.forEach((v) => v.update && v.update(dt, v.stage.name));
stageManager.curStage &&
curWindow &&
curWindow.update &&
curWindow.update(dt, curWindow.stage.name);
gameManager.render(dt);
stageManager.curStage &&
curWindow &&
curWindow.lateUpdate &&
curWindow.lateUpdate(dt, curWindow.stage.name);
residentList.forEach((v) => v.lateUpdate && v.lateUpdate(dt, v.stage.name));
});
export {
gameManager,
stageManager,

79
src/components/Button.ts

@ -1,62 +1,67 @@
import { Text, Graphics, Container, TextStyle } from "pixi.js";
interface IOpts{
text: string
interface IOpts {
text: string;
click(): void;
}
const defaultOpts:IOpts = {
text: ""
}
const defaultOpts: IOpts = {
text: "",
click() {},
};
export default function Button(opts: IOpts) {
let curOpts: IOpts = {} as IOpts
Object.keys(defaultOpts).forEach((key: keyof IOpts) => {
if(opts[key]!=undefined){
curOpts[key] = opts[key]
}else{
curOpts[key] = defaultOpts[key]
export default function Button(opts: Partial<IOpts>) {
let curOpts: Partial<IOpts> = {};
(Object.keys(defaultOpts) as (keyof IOpts)[]).forEach((key) => {
if (opts[key] != undefined) {
curOpts[key] = opts[key];
} else {
curOpts[key] = defaultOpts[key];
}
});
console.log(curOpts);
let textStyle = new TextStyle({fontFamily : 'Arial', fontSize: 50, fill : 0x000000, align : 'center'})
let textStyle = new TextStyle({
fontFamily: "Arial",
fontSize: 50,
fill: 0xffffff,
align: "center",
});
let textStr = new Text(curOpts.text, textStyle);
let xPadding = 60;
let yPadding = 20;
let yPadding = 40;
let button = new Container();
let width = textStr.width + xPadding;
let height = textStr.height + yPadding;
textStr.x = xPadding / 2;
textStr.y = yPadding / 2;
const circle = new Graphics();
circle.name = "circle";
circle.beginFill(0xff0000);
circle.drawRect(0, 0, width, height);
circle.endFill();
circle.interactive = true;
circle.buttonMode = true;
button.addChild(circle);
const rect = new Graphics();
rect.name = "rect";
rect.beginFill(0xff0000);
rect.drawRect(0, 0, width, height);
rect.endFill();
rect.interactive = true;
rect.buttonMode = true;
button.addChild(rect);
button.addChild(textStr);
button.x = 100;
button.y = 50;
button.interactive = true
button.on("touchstart", ()=>{
button.alpha = .8
})
button.on("touchend", ()=>{
button.interactive = true;
button.on("touchstart", () => {
button.alpha = 0.8;
});
button.on("touchend", () => {
// 点击成功
console.log("success");
button.alpha = 1
})
button.on("touchendoutside", ()=>{
button.alpha = 1
})
curOpts.click();
button.alpha = 1;
});
button.on("touchendoutside", () => {
button.alpha = 1;
});
return button;
}

34
src/main.ts

@ -1,26 +1,20 @@
import { EP } from "./enmu";
import { gameManager, stageManager, windows, residentList } from "./Game";
import { EDirection } from "./enmu";
import { gameManager, stageManager } from "./Game";
import { addSound } from "./Game/Sound";
// @ts-ignore
const t = import.meta.globEager("./stages/**/page_*.ts");
// 场景切换监听
stageManager.watchStageChange((stage, lastStage) => {
if (lastStage && lastStage.type === EP.Normal) {
let lastWindow = windows[lastStage.name];
lastWindow.onUnLoad && lastWindow.onUnLoad();
}
if (stage && stage.type === EP.Normal) {
let curWindow = windows[stage.name];
curWindow.onLoad && curWindow.onLoad();
}
gameManager.setDirection(EDirection.Landscape);
stageManager.initStage("loading");
gameManager.loader
.add("my-sound", "/bg.mp3", (e) => addSound(e))
.add("bg", "/bg.png")
.load();
gameManager.loader.onProgress.add((loader) => {
console.log(loader.progress);
});
gameManager.ticker.add((dt: number) => {
let curWindow = windows[stageManager.curStage.name];
residentList.forEach(v=>v.update&&v.update(dt, v.stage.name))
stageManager.curStage && curWindow && curWindow.update && curWindow.update(dt, curWindow.stage.name);
gameManager.render();
stageManager.curStage && curWindow && curWindow.lateUpdate && curWindow.lateUpdate(dt, curWindow.stage.name);
residentList.forEach(v=>v.lateUpdate&&v.lateUpdate(dt, v.stage.name))
gameManager.loader.onComplete.once((loader) => {
console.log(loader.resources);
});
stageManager.initStage("welcome");

45
src/stages/page_loading.ts

@ -0,0 +1,45 @@
import Button from "@/components/Button";
import { gameManager, defineWindow } from "@/Game";
import Sound from "@/Game/Sound";
import { Container, Text } from "pixi.js";
import TWEEN from "@tweenjs/tween.js";
defineWindow(
"loading",
class {
stage: Container = null;
constructor(stage: Container) {
this.stage = stage;
}
onLoad() {
console.log("onLoad loading");
let text = new Text("时间魔法", {
fontSize: 80,
fill: "#fff",
});
text.x = gameManager.getInfo().width / 2 - text.width / 2;
text.y = gameManager.getInfo().height / 2 - text.height / 2 - 500;
this.stage.addChild(text);
const btn = Button({
text: "开始游戏",
click() {
// Sound.play("my-sound")
new TWEEN.Tween(btn).interpolation( TWEEN.Interpolation.Bezier ).to({ x: 100, y: 100, alpha: .2 }, 1000).start();
},
});
btn.x = gameManager.getInfo().width / 2 - btn.width / 2;
btn.y = gameManager.getInfo().height / 2 - btn.height / 2 + 200;
this.stage.addChild(btn);
}
onUnLoad() {
Sound.stop("my-sound");
console.log("onUnLoad loading");
}
update() {
TWEEN.update();
}
}
);

11
src/stages/welcome/circle.ts

@ -1,8 +1,5 @@
import { stageManager } from "@/Game";
import { Graphics} from "pixi.js"
import Sound from "@/Game/Sound";
console.log(Sound);
// import Sound from "@/Game/Sound";
export default new (class Circle{
render(){
@ -15,12 +12,6 @@ export default new (class Circle{
circle.y = 130;
circle.interactive = true;
circle.buttonMode = true;
circle.on("touchend", ()=>{
setTimeout(() => {
Sound.play('my-sound');
}, 2000);
stageManager.changeStage("welcome2")
})
return circle
}
})

16
src/stages/welcome/page_welcome.ts

@ -1,5 +1,6 @@
import Button from "@/components/Button";
import { gameManager,defineWindow } from "@/Game";
import { gameManager,defineWindow, stageManager } from "@/Game";
import Sound from "@/Game/Sound";
import { Container, Text } from "pixi.js";
import Circle from "./circle"
@ -13,14 +14,23 @@ defineWindow("welcome", class{
}
onLoad(){
console.log("onLoad 1");
this.stage.addChild(Circle.render())
const circle = Circle.render()
this.stage.addChild(circle)
circle.on("touchend", ()=>{
stageManager.changeStage("welcome2")
})
let text = new Text("修仙人生日常")
text.x = gameManager.getInfo().width-text.width
text.y = gameManager.getInfo().height-text.height
this.stage.addChild(text)
this.stage.addChild(Button({text: "修仙人生日常"}))
const btn = Button({text: "修仙人生日常"})
btn.on("touchend", ()=>{
Sound.play('my-sound');
})
this.stage.addChild(btn)
}
onUnLoad(){
Sound.stop("my-sound")
console.log("onUnLoad 1");
}
// update(){

1
tsconfig.json

@ -3,6 +3,7 @@
"outDir": "./dist/",
"noImplicitAny": true,
"sourceMap": true,
"lib": ["ES2015", "DOM"],
"module": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,

Loading…
Cancel
Save