49 lines
1.3 KiB
HTML
49 lines
1.3 KiB
HTML
<!doctype html>
|
|
<!-- Copyright 2024 Mark Callow.
|
|
SPDX-License-Identifier: Apache-2.0 -->
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>libktx.js Demo with WebGL</title>
|
|
<link rel="stylesheet" href="../webgl.css" type="text/css">
|
|
<link rel="shortcut icon" href="../ktx_favicon.ico" type="image/x-icon" />
|
|
<style>
|
|
body {
|
|
/* Set margins to center the page. */
|
|
margin: 2em auto 2em auto;
|
|
max-width: 55em;
|
|
}
|
|
/* Center the canvas too. */
|
|
canvas {
|
|
display: block;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
#panel {
|
|
color: white;
|
|
background-color:rgba(0.3, 0.3, 0.3, 0.3);
|
|
padding: 0.5em;
|
|
max-width: 55em;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="panel">
|
|
<h2>libktx Read-only Javascript Binding Test</h2>
|
|
<p>This test uses the read-only Javascript binding for libktx,
|
|
which has been compiled to Javascript using Emscripten. It uses a
|
|
KTX2 file with a Basis Universal-compressed payload. It has
|
|
transcoded the images to <b id='format'>FORMAT</b>.
|
|
</p>
|
|
</div>
|
|
<p></p>
|
|
|
|
<canvas id="glcanvas" width="640" height="480"></canvas>
|
|
</body>
|
|
|
|
<script src="../gl-matrix.js"></script>
|
|
<script src="../libktx_read.js"></script>
|
|
<script src="libktx-read-test.js"></script>
|
|
</html>
|