Browse Source

made falling scooters mobile ready, moved insta gfx to graphics folder

master
dennisdebel 4 years ago
parent
commit
fd5566c443
  1. BIN
      .DS_Store
  2. 0
      graphics/falling-scooters/README.md
  3. 0
      graphics/falling-scooters/assets/fruit-sprites.json
  4. BIN
      graphics/falling-scooters/assets/tier.png
  5. 11
      graphics/falling-scooters/index.html
  6. 8
      graphics/falling-scooters/index.js
  7. 0
      graphics/falling-scooters/shapes.pes
  8. 0
      graphics/falling-scooters/spritesheet.tps
  9. 0
      graphics/insta/1.jpg
  10. 0
      graphics/insta/2.jpg
  11. 0
      graphics/insta/3.jpg
  12. 0
      graphics/insta/4.jpg
  13. 0
      graphics/insta/5.jpg
  14. 0
      graphics/insta/6.jpg
  15. 0
      graphics/insta/7.jpg
  16. 0
      graphics/insta/8.jpg
  17. 0
      graphics/insta/9.jpg
  18. 0
      graphics/insta/instagrid.psd
  19. 0
      graphics/logo.png
  20. 0
      graphics/logo2.png

BIN
.DS_Store

Binary file not shown.

0
graphics/falling-scooters/README.md

0
graphics/falling-scooters/assets/fruit-sprites.json

BIN
graphics/falling-scooters/assets/tier.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

11
graphics/falling-scooters/index.html

@ -25,14 +25,23 @@
#game
{
width: 100;
height: 100;
margin: 0 auto;
}
#inviteDiv {
color: aquamarine;
font-size: 30px;
position: absolute;
pointer-events: none;
}
</style>
</head>
<body>
<script src="phaser.min.js?v=3100" charset="utf-8"></script>
<script src="index.js" charset="utf-8"></script>
<div id="inviteDiv"><h1>YOU'RE INVITED!<h1></div>
<div id="game"></div>
</body>

8
graphics/falling-scooters/index.js

@ -1,5 +1,7 @@
/*
* This example show how to load complex shapes created with PhysicsEditor (https://www.codeandweb.com/physicseditor)
*
* Scaling via: https://www.joshmorony.com/how-to-scale-a-game-for-all-device-sizes-in-phaser/
*/
@ -9,8 +11,8 @@ var config = {
mode: Phaser.Scale.FIT,
parent: 'game',
autoCenter: Phaser.Scale.CENTER_BOTH,
width: 1024,
height: 600
width: window.innerWidth * window.devicePixelRatio,
height: window.innerHeight * window.devicePixelRatio
}, transparent: true,
backgroundColor: 0xffffff,
scene: {
@ -56,6 +58,8 @@ function create() {
var sprites = ['crate','banana','orange','cherries']; //array to choose random sprite from
this.input.on('pointerdown', function (pointer) {
// var touchX = pointer.x;
// var touchY = pointer.y;
this.matter.add.sprite(pointer.x, pointer.y, 'sheet', sprites[getRandomInt(4)], {shape: shapes.banana});
}, this);
}

0
graphics/falling-scooters/shapes.pes

0
graphics/falling-scooters/spritesheet.tps

0
insta/1.jpg → graphics/insta/1.jpg

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

0
insta/2.jpg → graphics/insta/2.jpg

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

0
insta/3.jpg → graphics/insta/3.jpg

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

0
insta/4.jpg → graphics/insta/4.jpg

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

0
insta/5.jpg → graphics/insta/5.jpg

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

0
insta/6.jpg → graphics/insta/6.jpg

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

0
insta/7.jpg → graphics/insta/7.jpg

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

0
insta/8.jpg → graphics/insta/8.jpg

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 98 KiB

0
insta/9.jpg → graphics/insta/9.jpg

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

0
insta/instagrid.psd → graphics/insta/instagrid.psd

0
logo.png → graphics/logo.png

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

0
logo2.png → graphics/logo2.png

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Loading…
Cancel
Save