mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
64 lines
No EOL
1.6 KiB
HTML
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/">
|
|
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> |