File size: 3,348 Bytes
da8f4d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
425562c
d23def8
 
da8f4d2
d23def8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90c0537
d23def8
 
 
 
 
 
 
 
 
bbd3ce4
d23def8
c7c1e55
850ad4c
bbd3ce4
850ad4c
9167b1b
 
d23def8
9167b1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d23def8
850ad4c
bbd3ce4
9167b1b
 
 
 
 
bbd3ce4
 
d23def8
da8f4d2
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<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>