mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-21 17:45:25 -04:00
ff15a37da7
* This allows a game hosted on a website to have a proper icon and orientation when a shortcut to it is added to the home screen on Android or iOS
56 lines
1.3 KiB
HTML
56 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<link rel="manifest" href="manifest.webmanifest">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
|
|
<meta name="theme-color" content="#000000" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #000000;
|
|
overflow: hidden;
|
|
}
|
|
#canvasArea {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* GDJS_CUSTOM_STYLE */
|
|
</style>
|
|
<!-- Libs and GDJS core files : -->
|
|
<!-- GDJS_CODE_FILES -->
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<!-- GDJS_CUSTOM_HTML -->
|
|
<script>
|
|
|
|
(function() {
|
|
//Initialization
|
|
var game = new gdjs.RuntimeGame(gdjs.projectData, {}/*GDJS_ADDITIONAL_SPEC*/);
|
|
|
|
//Create a renderer
|
|
game.getRenderer().createStandardCanvas(document.body);
|
|
|
|
//Bind keyboards/mouse/touch events
|
|
game.getRenderer().bindStandardEvents(game.getInputManager(), window, document);
|
|
|
|
//Load all assets and start the game
|
|
game.loadAllAssets(function() {
|
|
game.startGameLoop();
|
|
});
|
|
})();
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|