Files

76 lines
4.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>OneCAD Simulation</title>
<meta name="description" content="Open-source CAE modeling in Rust: mesh a part, set up the analysis and solve it, in your browser.">
<!-- OneBSpace: upstream's social-card meta (og: / twitter:) and its og.png copy are
stripped — no social junk in this app's bundle. -->
<link data-trunk rel="rust" data-bin="fieldcraft-web" data-wasm-opt="z" data-weak-refs />
<link data-trunk rel="icon" type="image/svg+xml" href="../../assets/app-icon/icon-small.svg" />
<link data-trunk rel="copy-file" href="../../assets/app-icon/icon.iconset/icon_128x128@2x.png" data-target-path="icons" />
<link rel="apple-touch-icon" href="icons/icon_128x128@2x.png">
<!-- OneBSpace: the Odoo Documents host bridge glue (src/odoo). Copied verbatim
(not hashed): the framework's bundleVersion ?v= on the iframe URL is the
cache buster, like every other OneBSpace app bundle. -->
<link data-trunk rel="copy-dir" href="src/odoo" data-target-path="odoo" />
<style>
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #262c37; }
#fieldcraft_canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#fieldcraft_loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 16px; padding: 0 16px; text-align: center; color: #c3cad6; font: 14px system-ui, sans-serif; pointer-events: none; }
/* OneBSpace: the upstream logo image is gone — a plain wordmark instead. */
#fieldcraft_loading .wordmark { font: 600 clamp(28px, 6vmin, 52px) system-ui, sans-serif;
letter-spacing: 0.18em; text-indent: 0.18em; color: #c3cad6; user-select: none; }
#fieldcraft_loading p { margin: 0; max-width: 32em; }
#fieldcraft_loading.failed { pointer-events: auto; }
#fieldcraft_loading.failed .spinner { display: none; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #4a5468; border-top-color: #c3cad6; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
</style>
</head>
<body>
<canvas id="fieldcraft_canvas"></canvas>
<div id="fieldcraft_loading" role="status">
<span class="wordmark">OneCAD Simulation</span>
<div class="spinner"></div>
<span class="sr-only">Loading OneCAD Simulation&hellip;</span>
<!-- // OneBSpace (OneCAD Simulation): the no-JavaScript note names the fork -->
<noscript><p>OneCAD Simulation needs JavaScript and WebAssembly.</p></noscript>
</div>
<script>
// The page could not load or start the app (no WebAssembly, a failed download): say so
// instead of loading forever. Once the app runs it removes the loading screen.
(function () {
function fail(why) {
var el = document.getElementById("fieldcraft_loading");
if (!el || el.classList.contains("failed")) return;
el.classList.add("failed");
el.textContent = "";
// // OneBSpace (OneCAD Simulation): the failure message names the fork
["OneCAD Simulation could not start: " + why, "It needs a current browser with WebAssembly and WebGPU or WebGL2."].forEach(function (t) {
var p = document.createElement("p");
p.textContent = t;
el.appendChild(p);
});
}
if (typeof WebAssembly !== "object") fail("this browser has no WebAssembly.");
addEventListener("unhandledrejection", function (e) { fail(String(e.reason && e.reason.message || e.reason)); });
})();
</script>
<script>
// OneBSpace: boot the Odoo Documents bridge glue only inside a frame (the
// wasm_app_framework shell). Standalone runs never import it.
// odoo/index.js is src/odoo/index.ts compiled by the addon build script.
try {
if (window.parent !== window) {
import("./odoo/index.js?v=20.0.1.0.0").catch((e) => console.warn("OneCAD Simulation odoo bridge:", e));
}
} catch (e) { /* cross-origin parent (standalone) — skip */ }
</script>
</body>
</html>