This commit is contained in:
th committed 2026-04-19 22:32:06 +02:00
1 parent fcefd258eb
commit 6b6157d786
23 files changed
+1140 -237

No files matched your search

+8 -8
View File
@@ -324,11 +324,11 @@ export function generateExampleHtml(scene: Scene, options: ExportOptions = {}):
const sceneBoot = generateSceneScriptBody(scene, options)
const aspect = `${scene.canvas.width} / ${scene.canvas.height}`
return `<!doctype html>
<html lang="de">
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Animatr — Beispiel</title>
<title>Animatr — Example</title>
<style>
:root { color-scheme: light dark; }
body {
@@ -383,26 +383,26 @@ export function generateExampleHtml(scene: Scene, options: ExportOptions = {}):
</head>
<body>
<h1>Animatr Export</h1>
<p>Runtime einmal laden, dann beliebig viele Szenen auf einer Seite.</p>
<p>Load the runtime once, then embed as many scenes on the page as you like.</p>
<!-- Runtime: einmal pro Seite -->
<!-- Runtime: once per page -->
<script>
${runtime}
</script>
<div class="stage">
<!-- Szene: pro Animation -->
<!-- Scene: one per animation -->
<script>
${sceneBoot}
</script>
</div>
<div class="usage">
<h2>Einbinden in eine eigene Seite</h2>
<pre>&lt;!-- einmal pro Seite --&gt;
<h2>Embed on your own page</h2>
<pre>&lt;!-- once per page --&gt;
&lt;script src="animatr-runtime.js"&gt;&lt;/script&gt;
&lt;!-- je Animation ein Container + Scene-Script --&gt;
&lt;!-- per animation: one container + scene script --&gt;
&lt;div style="width: 800px; height: 450px;"&gt;
&lt;script src="animation.js"&gt;&lt;/script&gt;
&lt;/div&gt;