page.tsx (1686B)
1 "use client"; 2 3 import { useEffect, useState } from "react"; 4 import { isWasmSupported } from "./components/wasmCheck.ts"; 5 6 const WasmCheck: React.FC = () => { 7 const [isSupported, setIsSupported] = useState<boolean | null>(null); 8 useEffect(() => { 9 setIsSupported(isWasmSupported()); 10 }, []); 11 if (isSupported === null) { 12 return null; 13 } 14 if (isSupported === false) { 15 return <h3>WASMがサポートされていません。</h3>; 16 } 17 return null; 18 }; 19 export default function Home() { 20 return ( 21 <main style={{ paddingTop: "5rem", paddingLeft: "20vw", maxWidth: "60vw" }}> 22 <h1>AIdentity</h1> 23 <h5>Op.31 by Minerva_Juppiter</h5> 24 <br /> 25 26 <article style={{ textAlign: "center" }}> 27 <h3>これはOp.31の全貌です。</h3> 28 29 <a 30 style={{ 31 textAlign: "center", 32 color: "var(--foreground)", 33 textDecorationLine: "none", 34 fontSize: "10rem", 35 }} 36 href="/ctrl" 37 > 38 Play 39 </a> 40 </article> 41 42 <br /> 43 <article> 44 <h2>注意:Attention</h2> 45 <ul> 46 <li> 47 いち素人の実装です.不具合等々ありますが,ご了承ください.issueを投げてもらえば,治せるところは直します. 48 </li> 49 <li>音が出ます。</li> 50 <li>フルスクリーンを要求します。</li> 51 <li> 52 JavaScript及びWASMを使用します。有効になっているか確認してください。 53 </li> 54 <noscript>JavaScriptが無効です。</noscript> 55 <WasmCheck /> 56 </ul> 57 </article> 58 </main> 59 ); 60 }