mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-24 03:54:34 -04:00
55 lines
1.2 KiB
HTML
55 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<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>
|
|
<div id="canvasArea"></div>
|
|
|
|
<!-- GDJS_CUSTOM_HTML -->
|
|
<script>
|
|
|
|
(function() {
|
|
//Initialization
|
|
gdjs.registerObjects();
|
|
gdjs.registerBehaviors();
|
|
gdjs.registerGlobalCallbacks();
|
|
|
|
var game = new gdjs.RuntimeGame(gdjs.projectData, {}/*GDJS_ADDITIONAL_SPEC*/);
|
|
|
|
//Create a renderer
|
|
var canvasArea = document.getElementById("canvasArea");
|
|
game.createStandardCanvas(canvasArea);
|
|
|
|
//Bind keyboards/mouse/touch events
|
|
game.bindStandardEvents(window, document);
|
|
|
|
//Load all assets and start the game
|
|
game.loadAllAssets(onAssetsLoaded);
|
|
function onAssetsLoaded() {
|
|
game.startStandardGameLoop();
|
|
}
|
|
})();
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|