{"id":26113,"date":"2025-07-21T06:25:35","date_gmt":"2025-07-20T21:25:35","guid":{"rendered":"http:\/\/www.tyosuke20xx.com\/blog\/?p=26113"},"modified":"2025-07-21T06:25:37","modified_gmt":"2025-07-20T21:25:37","slug":"deeplinkvr","status":"publish","type":"post","link":"http:\/\/www.tyosuke20xx.com\/blog\/?p=26113","title":{"rendered":"DeepLinkVR"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\n&lt;!DOCTYPE html>\n&lt;html lang=\"ja\">\n&lt;head>\n    &lt;meta charset=\"UTF-8\">\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    &lt;title>Verse - \u6b21\u4e16\u4ee3\u30bd\u30fc\u30b7\u30e3\u30eb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af VR\u5bfe\u5fdc&lt;\/title>\n    &lt;link rel=\"stylesheet\" href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.5.2\/css\/bootstrap.min.css\">\n    &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/rita\/1.3.63\/rita-full.min.js\">&lt;\/script>\n    &lt;style>\n        body { font-family: Arial, sans-serif; margin: 0; padding: 0; background: #f0f0f0; }\n        header, .footer { background: linear-gradient(45deg, #6a11cb, #2575fc); color: white; text-align: center; padding: 20px; }\n        .nav-container { background: #2575fc; display: flex; justify-content: center; padding: 10px; position: sticky; top: 0; }\n        .nav-menu a { color: white; text-decoration: none; margin: 0 10px; }\n        .content { max-width: 900px; margin: 20px auto; background: white; padding: 20px; border-radius: 8px; }\n        .cta-button { background: #2575fc; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; }\n        .profile-icon { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }\n        .dark-mode { background: #1e1e1e; color: #ddd; }\n        .timeline { margin-top: 20px; }\n        .timeline-post { border: 1px solid #ddd; border-radius: 8px; padding: 10px; margin-bottom: 10px; background: #fff; }\n        canvas { border: 1px solid #ccc; }\n    &lt;\/style>\n    &lt;script>\n        let posts = JSON.parse(localStorage.getItem('posts') || '&#91;]');\n\n        function saveData() {\n            localStorage.setItem('posts', JSON.stringify(posts));\n        }\n\n        function createPost(content) {\n            posts.unshift({ content: content, likes: 0 });\n            saveData();\n            renderTimeline();\n        }\n\n        function renderTimeline() {\n            const container = document.getElementById('timeline');\n            container.innerHTML = '';\n            posts.forEach((post, index) => {\n                container.innerHTML += `&lt;div class='timeline-post'>&lt;p>${post.content}&lt;\/p>&lt;\/div>`;\n            });\n        }\n\n        function toggleVR() {\n            if (!navigator.xr) {\n                alert('WebXR\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002');\n                return;\n            }\n\n            navigator.xr.requestSession('immersive-vr').then(session => {\n                const vrCanvas = document.createElement('canvas');\n                vrCanvas.width = window.innerWidth;\n                vrCanvas.height = window.innerHeight;\n                vrCanvas.style.width = '100vw';\n                vrCanvas.style.height = '100vh';\n                vrCanvas.style.position = 'fixed';\n                vrCanvas.style.top = 0;\n                vrCanvas.style.left = 0;\n                vrCanvas.style.background = 'black';\n                document.body.appendChild(vrCanvas);\n\n                const ctx = vrCanvas.getContext('2d');\n                ctx.fillStyle = 'white';\n                ctx.font = '30px Arial';\n                ctx.fillText('VR\u30e2\u30fc\u30c9\uff1a\u4eee\u60f3\u7a7a\u9593\u306b\u6ca1\u5165\u4e2d', 50, 100);\n\n                drawVREnvironment(ctx);\n\n                loadUnityAsset(ctx);\n                loadUnrealAsset(ctx);\n\n                session.end().then(() => {\n                    document.body.removeChild(vrCanvas);\n                });\n            }).catch(err => {\n                alert('VR\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u958b\u59cb\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002');\n                console.error(err);\n            });\n        }\n\n        function drawVREnvironment(ctx) {\n            ctx.fillStyle = '#0f0';\n            ctx.beginPath();\n            ctx.arc(200, 200, 50, 0, 2 * Math.PI);\n            ctx.fill();\n            ctx.fillStyle = '#f00';\n            ctx.fillRect(300, 150, 100, 100);\n            ctx.fillStyle = 'cyan';\n            ctx.font = '20px Arial';\n            ctx.fillText('\u4eee\u60f3\u30aa\u30d6\u30b8\u30a7\u30af\u30c8: \u7403\u4f53\u3068\u7acb\u65b9\u4f53', 50, 300);\n        }\n\n        function loadUnityAsset(ctx) {\n            ctx.fillStyle = 'yellow';\n            ctx.font = '20px Arial';\n            ctx.fillText('Unity\u30a2\u30bb\u30c3\u30c8\u8aad\u307f\u8fbc\u307f: \u30ad\u30e3\u30e9\u30af\u30bf\u30fc', 50, 350);\n        }\n\n        function loadUnrealAsset(ctx) {\n            ctx.fillStyle = 'orange';\n            ctx.font = '20px Arial';\n            ctx.fillText('Unreal Engine\u30a2\u30bb\u30c3\u30c8\u8aad\u307f\u8fbc\u307f: \u30b7\u30fc\u30f3', 50, 400);\n        }\n\n        function toggleDarkMode() {\n            document.body.classList.toggle('dark-mode');\n        }\n\n        window.onload = renderTimeline;\n    &lt;\/script>\n&lt;\/head>\n&lt;body>\n    &lt;header>\n        &lt;h1>Verse VR SNS&lt;\/h1>\n        &lt;button class=\"cta-button\" onclick=\"toggleVR()\">\ud83c\udfae VR\u30e2\u30fc\u30c9&lt;\/button>\n        &lt;button class=\"cta-button\" onclick=\"toggleDarkMode()\">\ud83c\udf19 \u30c0\u30fc\u30af\u30e2\u30fc\u30c9&lt;\/button>\n    &lt;\/header>\n\n    &lt;div class=\"nav-container\">\n        &lt;div class=\"nav-menu\">\n            &lt;a href=\"#\" onclick=\"renderTimeline()\">\u30db\u30fc\u30e0&lt;\/a>\n        &lt;\/div>\n    &lt;\/div>\n\n    &lt;div class=\"content\">\n        &lt;h2>\u65b0\u898f\u6295\u7a3f&lt;\/h2>\n        &lt;textarea id=\"postContent\" class=\"form-control\" placeholder=\"\u3044\u307e\u4f55\u3057\u3066\u308b\uff1f\">&lt;\/textarea>&lt;br>\n        &lt;button class=\"cta-button\" onclick=\"createPost(document.getElementById('postContent').value)\">\u6295\u7a3f&lt;\/button>\n\n        &lt;section id=\"timeline\" class=\"timeline\">&lt;\/section>\n    &lt;\/div>\n\n    &lt;div class=\"footer\">&amp;copy; 2025 Verse VR SNS&lt;\/div>\n&lt;\/body>\n&lt;\/html>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[54,87],"tags":[],"class_list":["post-26113","post","type-post","status-publish","format-standard","hentry","category-vr","category-web"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/26113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26113"}],"version-history":[{"count":1,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/26113\/revisions"}],"predecessor-version":[{"id":26114,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/26113\/revisions\/26114"}],"wp:attachment":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}