Skip to content

Commit

Permalink
Use phaser from CDN in docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
datagutten committed Jul 9, 2024
1 parent ec61f00 commit 7f42a0b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ COPY --from=builder_js /build/topography/topography.json ./assets/topography
COPY --from=builder_js /build/topography/topography.png ./assets/topography

# Copy static files from source
COPY ./src/index.html .
COPY ./src/index_cdn.html ./index.html
COPY ./data ./data
COPY ./info ./info
COPY ./progress ./progress
Expand Down
49 changes: 49 additions & 0 deletions src/index_cdn.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!doctype html>
<html>

<head>

<meta charset="UTF-8" />

<title>mulle.js</title>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/phaser.min.js"></script>
<script src="bundle.js"></script>

<link href="style.css" rel="stylesheet" />

<script>

window.addEventListener("DOMContentLoaded", function(e){
console.debug('Launch');
window.game.setup();
});

</script>

</head>

<body>

<div id="wrapper">

<div id="player"></div>

<div id="settings">
<button class="button" onclick="window.game.scale.startFullScreen();">fullscreen</button>
<a class="button" href="progress/" target="_blank">progress</a>
<a class="button" href="info/" target="_blank">info</a>
</div>

<div id="debug">
<button class="button" onclick="window.game.mulle.debug = !window.game.mulle.debug; this.innerHTML = 'debug ' + (window.game.mulle.debug ? 'on' : 'off');">debug off</button>
<button class="button" onclick="window.localStorage.removeItem('mulle_SaveData')">wipe save</button>
</div>

<div id="cheats"></div>

</div>

</body>

</html>

0 comments on commit 7f42a0b

Please sign in to comment.