mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-28 06:14:10 +00:00

Harmonize demos to use `data-slint-auto-resize-to-preferred="true"`. Otherwise it seems like they are using the minimum size now which is way too small for these demos
39 lines
1.2 KiB
HTML
39 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> -->
|
|
<!-- SPDX-License-Identifier: MIT -->
|
|
|
|
<html>
|
|
<!--
|
|
This is a static html file used to display the wasm build.
|
|
In order to generate the build
|
|
- uncomment the #wasm# lines in Cargo.toml
|
|
- Run `wasm-pack build --release --target web` in this directory.
|
|
-->
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Slint OpenGL Underlay Example (Web Assembly version)</title>
|
|
<link rel="stylesheet" href="https://slint.dev/css/demos-v1.css">
|
|
</head>
|
|
|
|
<body>
|
|
<p>This is the <a href="https://slint.dev">Slint</a> OpenGL Underlay example compiled to WebAssembly. It
|
|
demonstrates an OpenGL rendered scene under a Slint scene.</p>
|
|
<div id="spinner" style="position: relative;">
|
|
<div class="spinner">Loading...</div>
|
|
</div>
|
|
<canvas id="canvas" data-slint-auto-resize-to-preferred="true"></canvas>
|
|
<p class="links">
|
|
<a href="https://github.com/slint-ui/slint/blob/master/examples/opengl_underlay/">
|
|
View Source Code on GitHub</a>
|
|
</p>
|
|
<script type="module">
|
|
import init from './pkg/opengl_underlay.js';
|
|
init().finally(() => {
|
|
document.getElementById("spinner").remove();
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|