slint/examples/slide_puzzle/index.html
2020-12-08 16:13:14 +01:00

64 lines
No EOL
1.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SixtyFPS Slide Puzzle Demo (Web Assembly version)</title>
</head>
<style>
canvas {
width: 100% !important;
height: 100% !important;
}
canvas:focus {
outline: 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;
}
</style>
<body>
<div id="container">
<p>This is the SixtyFPS 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/slide_puzzle.60">
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';
async function run() {
let plaster_font_face = new FontFace("Plaster", `url(./plaster-font/Plaster-Regular.ttf)`);
await plaster_font_face.load();
document.fonts.add(plaster_font_face);
await init();
}
run();
</script>
</body>
</html>