-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
262 changed files
with
9,367 additions
and
9,889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<tileset version="1.10" tiledversion="1.10.2" name="external-fantasy" tilewidth="16" tileheight="16" tilecount="132" columns="12"> | ||
<editorsettings> | ||
<export target="external-fantasy..tsj" format="json"/> | ||
</editorsettings> | ||
<image source="tilemap_packed.png" width="192" height="176"/> | ||
<tile id="93"> | ||
<objectgroup draworder="index" id="2"> | ||
<object id="1" type="coin" x="3.27273" y="11.6364"> | ||
<polygon points="0,0 -0.272727,-8.18182 1.54545,-9.90909 7.36364,-9.90909 9.72727,-7.72727 9.72727,0.545455 7.63636,2.27273 2,2.27273"/> | ||
</object> | ||
</objectgroup> | ||
</tile> | ||
<tile id="95"> | ||
<objectgroup draworder="index" id="2"> | ||
<object id="1" x="2" y="2" width="12" height="14"/> | ||
</objectgroup> | ||
</tile> | ||
<tile id="105"> | ||
<objectgroup draworder="index" id="2"> | ||
<object id="1" x="3.45455" y="15.2727"> | ||
<polygon points="0,0 -3.09091,-3.18182 -2.72727,-7.36364 8.27273,-14.4545 12.5455,-11.7273 12.5455,-5.54545 4.27273,-0.0909091"/> | ||
</object> | ||
</objectgroup> | ||
</tile> | ||
</tileset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<tileset version="1.10" tiledversion="1.10.2" name="external-iso-fantasy" tilewidth="16" tileheight="17" tilecount="110" columns="11"> | ||
<grid orientation="isometric" width="16" height="8"/> | ||
<image source="assets/Isometric_MedievalFantasy_Tiles.png" width="176" height="170"/> | ||
<tile id="30"> | ||
<objectgroup draworder="index" id="2"> | ||
<object id="1" x="0.409091" y="0.5" width="7.22727" height="6.18182"/> | ||
</objectgroup> | ||
</tile> | ||
</tileset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Isometric Map Test</title> | ||
<style> | ||
body { | ||
margin: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<canvas id="game"></canvas> | ||
<script src="isometric.js"></script> | ||
</body> | ||
</html> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import * as ex from 'excalibur'; | ||
import { TiledResource } from '@excalibur-tiled'; | ||
|
||
class Player extends ex.Actor { | ||
override onPostUpdate(engine: ex.Engine) { | ||
this.vel = ex.vec(0, 0) | ||
const speed = 64; | ||
if (engine.input.keyboard.isHeld(ex.Keys.Right)) { | ||
this.vel.x = speed; | ||
} | ||
if (engine.input.keyboard.isHeld(ex.Keys.Left)) { | ||
this.vel.x = -speed; | ||
} | ||
if (game.input.keyboard.isHeld(ex.Input.Keys.Up)) { | ||
this.vel.y = -speed; | ||
} | ||
if (game.input.keyboard.isHeld(ex.Input.Keys.Down)) { | ||
this.vel.y = speed; | ||
} | ||
} | ||
} | ||
|
||
const game = new ex.Engine({ | ||
width: 800, | ||
height: 600, | ||
canvasElementId: 'game', | ||
pointerScope: ex.PointerScope.Canvas, | ||
antialiasing: false | ||
}); | ||
game.toggleDebug(); | ||
|
||
const tiledMap = new TiledResource('isometric.tmx', { | ||
useMapBackgroundColor: true | ||
}); | ||
|
||
const loader = new ex.Loader([tiledMap]); | ||
|
||
let currentPointer!: ex.Vector; | ||
game.input.pointers.primary.on('down', (moveEvent) => { | ||
currentPointer = moveEvent.worldPos; | ||
game.currentScene.camera.move(currentPointer, 300, ex.EasingFunctions.EaseInOutCubic); | ||
}); | ||
|
||
game.input.pointers.primary.on('move', (moveEvent) => { | ||
const tile = tiledMap.getTileByPoint('ground', moveEvent.worldPos); | ||
if (tile) { | ||
console.log(tile); | ||
} | ||
}) | ||
|
||
game.input.pointers.primary.on('wheel', (wheelEvent) => { | ||
// wheel up | ||
game.currentScene.camera.pos = currentPointer; | ||
if (wheelEvent.deltaY < 0) { | ||
game.currentScene.camera.zoom *= 1.2; | ||
} else { | ||
game.currentScene.camera.zoom /= 1.2; | ||
} | ||
}); | ||
|
||
game.start(loader).then(() => { | ||
tiledMap.addToScene(game.currentScene); | ||
currentPointer = game.currentScene.camera.pos; | ||
}); |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.