mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
72 lines
1.9 KiB
HTML
72 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>SixtyFPS Slide Puzzle Demo (Web Assembly version)</title>
|
|
</head>
|
|
<style>
|
|
canvas:focus {
|
|
outline: none;
|
|
touch-action: none;
|
|
}
|
|
|
|
body {
|
|
padding: 0px;
|
|
margin: 0px;
|
|
}
|
|
|
|
#container {
|
|
display: grid;
|
|
justify-items: stretch;
|
|
align-content: stretch;
|
|
align-items: stretch;
|
|
flex-direction: column;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
grid-template-columns: auto;
|
|
grid-template-rows: max-content auto max-content;
|
|
}
|
|
|
|
/* beautify ignore:start */
|
|
.spinner:before {
|
|
content: ''; box-sizing: border-box; position: absolute;
|
|
top: 50%; left: 50%; width: 100px; height: 100px;
|
|
margin-top: -10px; margin-left: -10px;
|
|
border-radius: 50%; border: 2px solid transparent;
|
|
border-top-color: #07d; border-bottom-color: #07d;
|
|
animation: spinner 1s ease infinite;
|
|
}
|
|
@keyframes spinner { to { transform: rotate(360deg); } }
|
|
/* beautify ignore:end */
|
|
</style>
|
|
|
|
<body>
|
|
<div id="spinner" style="position: absolute; top: 50%; width: 100%">
|
|
<div class="spinner">Loading...</div>
|
|
</div>
|
|
<div id="container">
|
|
<p>This is the <a href="https://sixtyfps.io">SixtyFPS</a> Slide Puzzle compiled to WebAssembly. Note that the wasm
|
|
build is done for demonstration purposes. Native applications are the real target of the toolkit.
|
|
</p>
|
|
<canvas id="canvas"></canvas>
|
|
<p>
|
|
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/slide_puzzle/">
|
|
View Source Code on GitHub</a> -
|
|
<a
|
|
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/slide_puzzle/slide_puzzle.60">
|
|
Edit in the online code editor
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<script type="module">
|
|
import init from './pkg/slide_puzzle.js';
|
|
init().finally(() => {
|
|
document.getElementById("spinner").remove();
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|