Spaces:
Running
Running
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>操作手順</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
line-height: 1.8; | |
padding: 20px; | |
} | |
h1 { | |
color: #333; | |
} | |
ol { | |
padding-left: 20px; | |
} | |
a { | |
color: #1a73e8; | |
text-decoration: none; | |
} | |
a:hover { | |
text-decoration: underline; | |
} | |
.input-example { | |
background: #f8f8f8; | |
padding: 10px; | |
border: 1px solid #ddd; | |
margin: 10px 0; | |
font-family: monospace; | |
} | |
img { | |
max-width: 100%; | |
height: auto; | |
margin-top: 20px; | |
} | |
</style> | |
</head> | |
<body> | |
<script type="module" src="3d.js"></script> | |
<ol> | |
<link rel="stylesheet" href="/front/build/kube-e7c0463/style.css"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'"> | |
<div class="container relative flex flex-col md:grid md:space-y-0 w-full md:grid-cols-12 md:flex-1 md:grid-rows-full space-y-4 md:gap-6 max-w-full bg-linear-to-b dark:via-none from-indigo-100 via-orange-50 to-white dark:from-gray-900 dark:to-gray-925 flex-1"> | |
<section class="pt-16 border-gray-100 col-span-full flex-1 pb-16 md:pb-0"> | |
<div class="dark:from-gray-50-to-white dark:bg-linear-to-b z-10 mx-auto rounded-2xl border bg-white p-4 shadow-sm dark:border-gray-800/80 md:w-96 md:px-5"> | |
<button type="button" class="btn btn-lg w-full" id="open">1.このボタンをクリック</button> | |
</div> | |
</section> | |
</div> | |
<div id="hide"> | |
<li> | |
<div><b>2.下記の画像のように操作し、色の付いていないメッシュを作成する。</b> | |
<img src="img1.png" alt="手順画像"> | |
作成されたメッシュの例: | |
<model-viewer | |
src="model1.glb" | |
alt="例" | |
auto-rotate | |
camera-controls | |
style="height: 350px;"> | |
</model-viewer> | |
</div> | |
</li> | |
<li><b>3.「Apply Texture」を押して色を付ける。</b> | |
結果の例: | |
<model-viewer | |
src="model2.glb" | |
alt="例" | |
auto-rotate | |
camera-controls | |
style="height: 350px;"> | |
</model-viewer> | |
</li> | |
</div> | |
<script> | |
let pipWindow = null; | |
document.getElementById('hide').style.display = 'none'; | |
document.getElementById('open').addEventListener('click', async () => { | |
try { | |
// PiPウィンドウを先に開く | |
if ('documentPictureInPicture' in window) { | |
pipWindow = await documentPictureInPicture.requestWindow({ | |
width: 600, | |
height: 400, | |
}); | |
pipWindow.document.body.style.margin = '0'; | |
pipWindow.document.body.style.padding = '0'; | |
const iframe = pipWindow.document.createElement('iframe'); | |
iframe.src = '3.html'; | |
iframe.style.border = 'none'; | |
iframe.style.width = '100vw'; | |
iframe.style.height = '100vh'; | |
iframe.style.display = 'block'; | |
pipWindow.document.body.appendChild(iframe); | |
} else { | |
document.getElementById('hide').style.display = 'block'; | |
} | |
} catch (error) { | |
console.error('PiPウィンドウ起動エラー:', error); | |
document.getElementById('hide').style.display = 'block'; | |
} | |
}); | |
</script> | |
</body> | |
</html> | |