Skip to content

Commit

Permalink
Update html5 extras
Browse files Browse the repository at this point in the history
  • Loading branch information
aglitchman committed Oct 24, 2024
1 parent 18e7891 commit 1cdd17c
Showing 1 changed file with 0 additions and 82 deletions.
82 changes: 0 additions & 82 deletions examples_html5/manifests/web/engine_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,87 +7,5 @@
<meta property="og:title" content="Scene3D Playground" />
<meta property="og:description" content="Web build of the example scene from Scene3D. Scene3D is a collection of assets to help you developing 3D games with the Defold game engine. Use included prefabs to quickly prototype structures, levels, and to test game mechanics. Try out ideas quickly!" />
<meta property="og:image" content="https://github.com/indiesoftby/defold-scene3d/raw/main/cover_opengraph.jpg" />
<style>
#loading {
color: #fff;
float: left;
font-weight: bold;
font-family: sans-serif;
font-size: 14px;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: 0px;
padding-top: 12px;
}
.link,
.button,
#loading {
margin-right: 12px;
margin-left: 12px;
}
.canvas-app-container {
background: #1f1f1f;
filter: none;
}
.canvas-app-canvas {
background-size: 60%;
}
</style>
</head>
<body>
<div id="app-container" class="canvas-app-container" merge="keep">
<div id="canvas-container" class="canvas-app-canvas-container">
<canvas
id="canvas"
class="canvas-app-canvas"
tabindex="1"
width="{{display.width}}"
height="{{display.height}}"
></canvas>
</div>
<div class="buttons-background">
{{#html5.show_fullscreen_button}}
<div class="button" onclick="Module.toggleFullscreen();">Fullscreen</div>
<div id="loading">Loading... 0%</div>
{{/html5.show_fullscreen_button}}
{{#html5.show_made_with_defold}}
<div class="link">
<a href="https://defold.com" target="_blank">Defold</a> +
<a href="https://github.com/indiesoftby/defold-scene3d" target="_blank">Scene3D</a>
</div>
{{/html5.show_made_with_defold}}
</div>
</div>
<script id="engine-setup" type="text/javascript">
(function () {
var statusText;
var setStatus = function (status) {
statusText = status;
var el = document.getElementById("loading");
if (el) el.innerText = status;
};

Progress.addListener(function (percentage) {
if (isNaN(percentage)) return;
var el = document.getElementById("loading");
if (el && !statusText) {
if (percentage == 100) {
el.innerText = "";
} else {
el.innerText = "Loading... " + percentage.toFixed(0) + "%";
}
}
});

extra_params.unsupported_webgl_callback = function () {
setStatus("ERROR: WebGL is not supported by your browser.");
};

extra_params.can_not_download_file_callback = function () {
setStatus("ERROR: Can't download files.");
};
})();
</script>
</body>
</html>

0 comments on commit 1cdd17c

Please sign in to comment.