{"id":166,"date":"2023-11-25T23:29:10","date_gmt":"2023-11-25T14:29:10","guid":{"rendered":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/?p=166"},"modified":"2023-11-25T23:29:59","modified_gmt":"2023-11-25T14:29:59","slug":"%e3%81%ae%e8%89%b2%e3%80%85%e3%81%aa%e5%ba%a7%e6%a8%99%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/?p=166","title":{"rendered":"model-viewer\u306e\u8272\u3005\u306a\u5ea7\u6a19\u3092\u53d6\u5f97\u3059\u308b"},"content":{"rendered":"\n<p>&lt;model-viewer&gt;\u306f\u304b\u3093\u305f\u3093\u306b\u4f7f\u3048\u308b\u3002\u3060\u304b\u3089\u3061\u3087\u3063\u3068\u4f4e\u30ec\u30a4\u30e4\u30fc\u306a\u3053\u3068\u3092\u3059\u308b\u3068\u9762\u5012\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<p>THREE.js\u306eAxesHelper\u3092\u5165\u308c\u308b\u3068\u307e\u3042\u3001\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scene\u3092\u53d6\u5f97<\/h2>\n\n\n\n<p>\u307e\u305a\u306f\u3053\u3053\u304b\u3089\u3002\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u3082\u66f8\u3044\u3066\u3042\u308b\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"cosnt modelViewer = document.querySelector(&quot;model-viewer&quot;);\nmodelViewer[Object.getOwnPropertySymbols(mvElement).find(e =&gt; e.description === 'scene')];\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">cosnt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">modelViewer<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">document<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">querySelector<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">model-viewer<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">modelViewer<\/span><span style=\"color: #D8DEE9FF\">[<\/span><span style=\"color: #D8DEE9\">Object<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">getOwnPropertySymbols<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">mvElement<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">find<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">e<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=&gt;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">e<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">description<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">===<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">scene<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)]<\/span><span style=\"color: #81A1C1\">;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:clamp(27.894px, 1.743rem + ((1vw - 3.2px) * 1.571), 48px);\">VR\u30e2\u30fc\u30c9<\/h2>\n\n\n\n<p>\u3053\u308c\u306f\u304b\u3093\u305f\u3093\u3060\u3002<\/p>\n\n\n\n<p>\u8aad\u307f\u8fbc\u3093\u3060\u30e2\u30c7\u30eb\u306f\u3001<em>scene.target<\/em><\/p>\n\n\n\n<p>\u5ea7\u6a19\u306f(0,0,0)\u306b\u56fa\u5b9a\u3055\u308c\u3066\u3001z+\u3092\u5411\u3044\u3066\u3044\u308b<\/p>\n\n\n\n<p>\u30ab\u30e1\u30e9\u306f<em>scene.camera<\/em><\/p>\n\n\n\n<p>\u666e\u901a\u306b\u5ea7\u6a19\u3092\u53d6\u5f97\u3059\u308c\u3070\u3088\u3044<\/p>\n\n\n\n<p>\u306a\u305c\u306a\u3089\u3001\u30b7\u30fc\u30f3\u306f\u52d5\u304b\u306a\u3044\u304b\u3089\u3001\u30ab\u30e1\u30e9\u3082\u30e2\u30c7\u30eb\u3082\u30ed\u30fc\u30ab\u30eb\u306e\u5ea7\u6a19\u7cfb\u304c\u540c\u3058\u3060\u304b\u3089\u3060\u3002<\/p>\n\n\n\n<p>API\u3092\u4f7f\u3048\u3070\u3082\u3063\u3068\u697d\u3060<\/p>\n\n\n\n<p><em>modelViewer.getCametaOrbit()<\/em>\u3084<em>getCameraTarget<\/em>\u304c\u4f7f\u3048\u308b\u3060\u308d\u3046<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AR\u30e2\u30fc\u30c9(webXR API\u306e\u5834\u5408)<\/h2>\n\n\n\n<p>\u3053\u308c\u306f\u3084\u3063\u304b\u3044\u3060\u3063\u305f\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e00\u3001API\u306b\u5b58\u5728\u3057\u306a\u3044<\/p>\n\n\n\n<p>\u8aad\u307f\u8fbc\u3093\u3060\u30e2\u30c7\u30eb\u306f\u540c\u3058\u304f<em> scene.target<\/em><\/p>\n\n\n\n<p> \u3053\u3061\u3089\u3082\u5ea7\u6a19\u306f(0,-(\u30e2\u30c7\u30eb\u306e\u9ad8\u3055\/2),0)\u3001z+\u3092\u5411\u3044\u3066\u3044\u308b<\/p>\n\n\n\n<p class=\"has-luminous-vivid-orange-color has-text-color\"><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ff0000\" class=\"has-inline-color\">\uff03\uff03\u30b7\u30fc\u30f3\u304c\u89aa\u306b\u306a\u3063\u3066\u3044\u308b\u3002\uff03\uff03<\/mark><\/p>\n\n\n\n<p>\u30ab\u30e1\u30e9\u306f<em>scene.xrcamera<\/em><\/p>\n\n\n\n<p class=\"has-contrast-color has-text-color\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#ff0000\" class=\"has-inline-color\">\uff03\uff03<em>xrcamera<\/em>\u306b\u306f\u89aa\u304c\u5c45\u306a\u3044<\/mark><\/strong>\uff03\uff03<\/p>\n\n\n\n<p>\u30ab\u30e1\u30e9\u3092\u52d5\u304b\u305b\u3070<em>xrcamera<\/em>\u304c\u52d5\u304f<\/p>\n\n\n\n<p>\u30e2\u30c7\u30eb\u3092\u52d5\u304b\u3059\u3068<mark style=\"background-color:rgba(0, 0, 0, 0);color:#fd0000\" class=\"has-inline-color\">\uff03\uff03<em>scene<\/em>\u304c\u52d5\u304f\uff03\uff03<\/mark><\/p>\n\n\n\n<p>\u30e2\u30c7\u30eb\u3092\u56de\u3059\u3068<mark style=\"background-color:rgba(0, 0, 0, 0);color:#ff0000\" class=\"has-inline-color\">\uff03\uff03<em>scene<\/em>\u304c\u56de\u308b\uff03\uff03<\/mark><\/p>\n\n\n\n<p>\u30e2\u30c7\u30eb\u306e\u5ea7\u6a19\u306f\u52d5\u304b\u306a\u3044\u3002<\/p>\n\n\n\n<p>\u3088\u3063\u3066\u3001\u30e2\u30c7\u30eb\u306e\u30ef\u30fc\u30eb\u30c9\u5ea7\u6a19\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001<em>scene.position + target.position<\/em> \u304c\u5fc5\u8981\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u3068\u3053\u308d\u3067\u3001<em>THREE.js<\/em>\u306e<em>object3d<\/em>\u306e\u30e1\u30bd\u30c3\u30c9<em>getWorldPosition<\/em>\u3068\u304b\u306f\u3001\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u3002\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3055\u308c\u3066\u3044\u308b\u3057\u3001\u305d\u308c\u304c\u672a\u5b9a\u7fa9\u53c2\u7167\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u304b\u3089\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;model-viewer&gt;\u306f\u304b\u3093\u305f\u3093\u306b\u4f7f\u3048\u308b\u3002\u3060\u304b\u3089\u3061\u3087\u3063\u3068\u4f4e\u30ec\u30a4\u30e4\u30fc\u306a\u3053\u3068\u3092\u3059\u308b\u3068\u9762\u5012\u306b\u306a\u308b\u3002 THREE.js\u306eAxesHelper\u3092\u5165\u308c\u308b\u3068\u307e\u3042\u3001\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u308b\u3002 Scene\u3092\u53d6\u5f97 \u307e\u305a\u306f\u3053\u3053\u304b\u3089\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7],"tags":[],"_links":{"self":[{"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/166"}],"collection":[{"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166"}],"version-history":[{"count":2,"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"predecessor-version":[{"id":169,"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions\/169"}],"wp:attachment":[{"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}