ä»®æ³çŸå®ããã³æ¡åŒµçŸå®ã¯ç©æ¥µçã«éçºãããŠãããäžçãå é ããæš©å©ã䞻匵ãå§ããŠããŸãã ããã«ããããã®æè¡ã®çšéã¯å€æ§ã§ãããã²ãŒã ã ãã«éå®ãããŸããã ãŸãããã©ãŠã¶ãŒã§VR / ARãã¯ãããžãŒãæäœããããŒã«ã®åºçŸã«ãããé¢å¿ã¯ããã«é«ãŸã£ãŠããŸãã WebVRãšåŒã°ããJavaScript APIã䜿çšããŠãMVPïŒMinimum Viable ProductïŒWebãããžã§ã¯ããå®éšããŠäœæã§ããŸãã ãããäœã§ãããã©ã®ããã«åäœããããç解ããŸãããã ãããŠããã®éåžžã«WebVR APIãªãã§è¡ãããšã¯å¯èœã§ããïŒ
ãã®èšäºã¯ã¬ã€ãã³ã¹ã®ã¿ãç®çãšããŠãããWebVR APIãšWeb ARã®å®è£ ã«é¢ããäžé£ã®èšäºã®æåã®èšäºã§ãã ãããã¯ãåºãŠããããããŸããŸãªææ³ãšãã¬ãŒã ã¯ãŒã¯ã䜿çšããŠããå ·äœçãªäŸã瀺ããªãããåŒãç¶ãéçºãç¶ããŸãã ç§ã®å人çãªçµéšãå ±æããèšäºã§WebVRã䜿çšããåºæ¬çãªååãWeb ARã®äœææ¹æ³ãiOSãæã£ãŠããå Žåã®å¯ŸåŠæ¹æ³ãããã³ä»æ¥ãã¹ãŠãéçºã§ããããã€ã¹ã«ã€ããŠæ€èšããããšæããŸãã
Tutu.ruã§ã¯ãããã³ããšã³ãã®ã·ã¹ãã ã¢ãŒããã¯ããšããŠåããŠããŸãã ç§ã¯ããŸããŸãªRnDïŒç 究éçºïŒã¿ã¹ã¯ã«åŸäºããŠããŸãã VR / ARã®ãããã¯ã¯ãç§ã®ä»äºãšçŽæ¥äº€ãããã®ã§ã¯ãããŸããããç§ãã¡ã¯ãã§ã«ãã®æè¡ã芳å äºæ¥ã®æèã§å¿çšããããšãäŒç€Ÿã§èããŠããŸãã æªæ¥ã®ãã¯ãããžãŒã¯åžžã«ç§ãé äºããããã³ããšã³ãã¹ã¿ãã¯ãæ¬åœã«å¥œãã§ãã ããããç§ã¯ãã¹ãŠããã©ãŠã¶ã§ã§ãããšããã¢ã€ãã¢ã奜ãã§ãã ããã«ããå€ãã®å¶éã課ããããããã€ãã®å°é£ãçããŸãã ãããããããã¯ãã¹ãŠè§£ãããã®ã§ããããã°ãããããšå®å šã«æ°Žå¹³ã«ãªããŸãã
足ã¯ã©ãããæé·ããŸãã
ä»æ§èªäœã¯2014幎ã«æžãæ»ãããŸããããæåã®ããŒãžã§ã³ã¯2016幎ã®åãã«Mozillaã«ãã£ãŠå°å ¥ãããŸããã ãã®åŸãæåã®å®å šãªãã©ããWebVR APIä»æ§ãå°å ¥ãããŸããã ãã®ä»æ§ã§ã¯ãOculus Riftãªã©ã®ããŸããŸãªVRããã€ã¹ãæäœããããã®ãœãããŠã§ã¢ã€ã³ã¿ãŒãã§ã€ã¹ã«ã€ããŠèª¬æããŸãïŒå®éããã®ä»æ§ã¯ããšããšoculusã§äœæãããŸããïŒã ãã®ä»æ§ã¯ãGoogleã®Brandon JonesãšMicrosoftã®Justin Rogersã®æ¯æŽãåããŠéçºãããŸããã
æ°ããWebVRä»æ§ã®ãµããŒãã¯ãFirefoxãšã¢ãã€ã«Chromeã§æ¢ã«å®è£ ãããŠããŸãïŒããæ£ç¢ºã«ã¯ãå®è£ ã®çšåºŠãšãã¥ã¢ã³ã¹ã«ã€ããŠã¯åŸã§èª¬æããŸãïŒã ãããŠããã¯ãä»æ¥ãææ¥ã®æè¡ãèªç±ã«å®éšããŠè©Šãããšãã§ããããšãæå³ããŸãã ã䜿ãã®ãã©ãŠã¶ãå€ããå¥åŠããŸãã¯æŽæ°ãããŠããªãå Žå-ããããã¹ãŠã®ããã®ããªãã¡ã€ã«ããããŸãã
ãªãWebVR APIãå¿ èŠãªã®ã§ããïŒ
WebVR APIã¯ãããã€ã¹ãæäœããããã®ãœãããŠã§ã¢ã€ã³ã¿ãŒãã§ã€ã¹ã§ãã 圌ã¯3Dã°ã©ãã£ãã¯ã¹ã«ã€ããŠäœãç¥ããŸããã ã°ã©ãã£ãã¯ã¹ã®æäœãã·ãŒã³ã®ã¬ã³ããªã³ã°ãå æºã®ã€ã³ã¹ããŒã«ããã®ä»ãã¹ãŠã¯ããã°ã©ããŒã®å³ããè©ã«ããã£ãŠããŸãã WebVR APIã䜿çšãããšãããã€ã¹ãžã®ã¢ã¯ã»ã¹ãæœè±¡åã§ããŸãã ãã®APIã¯ãç»åãããã€ã¹ããã®æ©èœãæè¡ç¹æ§ã«é¢ããæ å ±ãååŸããããã®ããŒã«ãæäŸããŸãããç»åèªäœãš3Dã®äžçã¯ãHTMLãCSSãWebGLãCanvasãªã©ã®æ¢ã«éŠŽæã¿ã®ããWebãã¯ãããžãŒã䜿çšããŠæç»ããå¿ èŠããããŸã...
WebVR APIã¯ãäœæ¥ã®ããã®ããã€ãã®åºæ¬çãªãªããžã§ã¯ããæäŸããŸãã
- ããã²ãŒã¿ãŒ-ããã€ã¹ã®ãªã¹ããååŸããã¢ã¯ãã£ãã決å®ã§ããŸãã
- VRDisplay-ãããã»ãããé ãè£ çããŠãããã©ããããã¬ãŒã ã«é¢ããæ å ±ãç®ã瀺ããŸãã
- VRPose-ããã€ã¹ã®äœçœ®ãšåããé床ãšæ¹åã«é¢ããæ å ±ã
- VREyeParameters-åã ã®ç®ã«ãããªãã¬ã³ããªã³ã°ããæ¹æ³ã«é¢ããæ å ±ã
- VRFrameData-å¥ã®ç®ã«æ圱ããããã®ã·ãŒã³ãã¬ãŒã ã«é¢ããæ å ±ã
ãªããžã§ã¯ãã®å®å šãªãªã¹ãã¯ã次ã®ãœãŒã¹ã§å ¥æã§ããŸãã
- developer.mozilla.org/en-US/docs/Web/API/WebVR_API
- msdn.microsoft.com/en-us/library/mt806281ïŒv = vs. 85ïŒ.aspx
ããã«ã¡ã¯VRã®äžç
JavaScriptã§VRããã€ã¹ãæäœããããã®ç°¡åãªå®åã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
navigator.getVRDisplays().then(displays => { if (displays.length < 1) { return console.warn('No displays found!'); } displays.forEach(vrDisplay => { buildVRDisplay(vrDisplay) }) }); function buildVRDisplay(vrDisplay) { // const frameData = new VRFRameData; // vrDisplay.getFrameData(frameData); // const rightEye = vrDisplay.getEyeParameters('left'); const onAnimationFrame = () => { // vrDisplay.requestAnimationFrame(onAnimationFrame); }; vrDisplay.requestAnimationFrame(onAnimationFrame); }
ãã®ã³ãŒãã¯ãWebVR APIã䜿çšããäœæ¥ãã©ã®ããã«èŠãããã®ã¢ã€ãã¢ãäžããå¿ èŠããããŸãã 以äžã§ãã詳现ãªäŸãæ€èšãããã©ãŠã¶ã®ãµããŒããšããã€ã¹ã«ã€ããŠè©±ããŸãããã
䜿çšããããã€ã¹
VRã«ã€ããŠè©±ããšãã圌ãã¯Oculus Riftãªã©ãæãåºããŸãã WebVRã«ã€ããŠè©±ããŠããå Žåããã©ãŠã¶ã®éçºãæåŸ ããŠãããšèããã®ã¯çã«ããªã£ãŠããŸãã
ä»æ¥ãæãã¢ã¯ã»ã¹ãããã人æ°ã®ããããã€ã¹ã¯ãããããCardboardããã€ã¹ïŒãŸãã¯VRBoxãšãåŒã°ããŸãïŒã§ãã ã¢ãã€ã«VRããã€ã¹ãªã¹ãã¯ãæã«ãªã¹ãã§ããŸãã
- Google Cardboard
- Google DaydreamïŒCardboardããã€ã¹ã®æ°ããããŒãžã§ã³ïŒ;
- ãã¹ãŠã®ã¹ããŒããã©ã³ã¢ãã«çšã®ããŸããŸãªäžåœèªVRBoxã
- Samsung GR VRïŒç§ã®æèŠã§ã¯ãVRãã«ã¡ãããšCardboardããã€ã¹ã®æ©èœã®åªããçµã¿åãããããã«ã¯Oculus Storeãžã®ã¢ã¯ã»ã¹ããããŸãïŒã
noname vrbox
ã¬ã³ãºã§ãã¯ã·ã³ã°ããã ãã§ãã 圌ãã¯ããµã ã¹ã³GR VRã®ã³ããŒãŸã§ãéåžžã«ç°ãªãããŒãžã§ã³ããããŸãããä»»æã®é»è©±ã¢ãã«ã®Bluetoothçµç±ã§æ¥ç¶ããŸãã ãããã¯ãããŸããŸãªåœ¢åŒã®èŠå ãšããŸããŸãªèšèšã§äœãããŠããŸãã ã©ã®OSã®ã©ã®ã¹ããŒããã©ã³ã§ãåäœããBluetoothãžã§ã€ã¹ãã£ãã¯ãè³Œå ¥ã§ããŸãã å質ã¯éåžžã«è¯å¥œã§ãã¬ã³ãºã«é¢ããèŠæ ã¯ãããŸããã ãã¹ãŠã®å¡©ã¯ãã¹ããŒããã©ã³ããã£ã¹ãã¬ã€ãµã€ãºãç»é¢è§£å床ã«å«ãŸããŠããŸãã
Xiaomi VRBox
ç¹åŸŽïŒããŒãºããªããžã®ã¹ã¯ãªãŒã³ã®ããã©ã€ã³ããŸãŒã³ããã¿ããããã¹ã¿ã€ã©ã¹ã®åçã§åäœããæ©æ¢°åŒãããã¥ã¬ãŒã¿ãŒãã¿ã³ã®ååšïŒãšã³ãžãã¢ãçãã:)ïŒã ãžãããŒã
ãµã ã¹ã³GR VR
æ©èœïŒUSBãä»ããŠããã¯ã¹ã«æ¥ç¶ãããã«ã¡ããäžã®ã¿ããããã«ãšãã¿ã³ã®ååšã æ¥ç¶æã«ãOculusæ©èœãæå¹ã«ãªããé»è©±ã¯Oculusäºæããã€ã¹ã®ãµããããŸãã
Google段ããŒã«
ç¹åŸŽïŒå°ããªäžžãç£ç³ã®åœ¢ã§äœããããã¿ã³ã®ååšã ãã®ã¢ããªã±ãŒã·ã§ã³ã§ã¯ãç£å Žã®å€åãå èµç£åèšã«ãã£ãŠèªã¿åããããã®å€åã¯Cardboard察å¿ããã€ã¹ã®ãã¿ã³ã¢ã¯ã·ã§ã³ãšããŠã«ãŠã³ããããŸãã
Google Daydream
æ©èœïŒCardboardãšã®äž»ãªéãã¯ããã培åºçã§äŸ¿å©ãªãããã»ãããšã²ãŒã ãããã®ååšã§ãã ããã¯å®å šãªVRBoxã§ããã段ããŒã«ã§ã¯ãããŸãã:)
ãããã«ã€ããŠã話ããŸãã Chromeãã©ãŠã¶ãŒãšVRBoxã®ããªãšãŒã·ã§ã³ãåããã¹ããŒããã©ã³ããæã¡ã®å Žåã¯ããã§ã«WebVRã®ã¢ã¯ã·ã§ã³ããã§ãã¯ã€ã³ã§ããŸãã æé©ãªãªãã·ã§ã³ã¯ãChrome CanaryãŸãã¯Samsung Internetã§ãã ãã¡ãããç§ã¯äŸå€ã«ã€ããŠèšããªããã°ãªããŸãã-ããã¯iOSã§ãã ãã ããããªãã¡ã€ã«ãä»ããŠVRã䜿çšã§ãããããiOSããã€ã¹ããããã¢ãå©çšã§ããŸãïŒå®è£ ã«ãã£ãŠç°ãªããŸãïŒã ç¹°ãè¿ããŸãããWebVR APIã¯3Dã°ã©ãã£ãã¯ã¹ã«é¢ãããã®ã§ã¯ãªãããšãç解ããå¿ èŠããããŸãããŸãããã®VR APIèªäœã䜿çšããã«ïŒãŸãããŸãã¯ããªãã¡ã€ã«ã䜿çšããŠïŒiOSã®äžã§ãWebVRã¯ãŒã«ããäœæã§ããŸãã
ãŸããéåžžã¯éçºãè¡ããããã¹ã¯ããããã©ãŠã¶ãŒãŠã£ã³ããŠããVRã®äžçãèŠãããšãã§ããŸãã ãŸãããã«ã¡ãããªãã§äžçãæ§ç¯ããã次ã«ç»åãå åŠãã¢ã«åå²ããæ©èœãæ¢ã«è¿œå ãããŠããŸãã ãããè¡ãã«ã¯ãFirefox NightlyãŸãã¯Chromeããã®ãã©ã°ã€ã³ã§äœ¿çšããŸãïŒWebVR API Emulationã ãµããŒããæå¹ã«ãªã£ãŠããChrome CanaryããŸãã¯Chromiumã®ç¹å¥ãªã¢ã»ã³ããª... ...
ãã©ãŠã¶ã®ãµããŒããšã¯äœã§ããïŒ
ãã®ãããä»æ¥ãWebVR APIã¯æ¬¡ã®ãã©ãŠã¶ã§å€ããå°ãªãããµããŒããããŠããŸãã
- Hololensã®Microsoft Edgeã
- HTC Viveäžã®Mozilla Servoã
- Firefox Nightly;
- Chrome CanaryïŒ ã¯ããŒã ãã©ã°ãæå¹ã«ããå¿ èŠããããŸãïŒ// flags /ïŒenable-webvr ïŒ;
- AndroidåãChrome Canary
- Chrome for AndroidïŒDaydreamããã€ã¹ãããŒãžã§ã³56以éãå«ãïŒ;
- HTC ViveãOculusãAndroidã®Chromium;
- Chromium WebVR BuildïŒ https://webvr.info/get-chrome/ ïŒ;
- ãµã ã¹ã³ã€ã³ã¿ãŒãããïŒãµã ã¹ã³GR VRïŒ;
- Oculus CarmelïŒããã¯WebVRãã©ãŠã¶ãŒã§ãSamsung GR VRã§ãå©çšå¯èœã§ãïŒ;
- iOS ChromeïŒå·çæç¹ã§ããªãã¡ã€ã«ã䜿çšïŒ;
- iOS SafariïŒå·çæç¹ã§ããªãã¡ã€ã«ã䜿çš...ïŒ;
- ChromeïŒçŸæç¹ã§ã¯ããªãã¡ã€ã«ã䜿çš...ïŒ;
- FirefoxïŒ...äžã®ããªãã¡ã€ã«ã䜿çšïŒã
äºææ§ããŒãã«ã®å®å šãªãªã¹ãã¯ããã«ãããŸã ã
WebVR APIãµããŒããæå¹ã«ããããšãå¿ããªãã§ãã ããã
PolyphilesãšãµããŒãã©ã€ãã©ãª
ããã€ã¹ãWebVR APIããµããŒãããŠããªãå Žåã¯ãããŒãžã«æ¥ç¶ã§ããpolyfillã䜿çšãããããã©ãŠã¶ã«ç¹å¥ãªæ¡åŒµæ©èœã䜿çšã§ããŸãã ããªãã¡ã€ã«ãªã³ã¯ïŒ github.com/googlevr/webvr-polyfill
ChromeåãWebVR APIãšãã¥ã¬ãŒã·ã§ã³
ãªã³ã¯ã«è¿œå ã§ããŸãïŒ chrome.google.com/webstore/detail/webvr-api-emulation/gbdnpaebafagioggnhkacnaaahpiefil
ãã®ãã©ã°ã€ã³ã«ã€ããŠã¯ãããã€ãã®èšèãå¥ã ã«èšã䟡å€ããããŸãã WebVR APIã®ãšãã¥ã¬ãŒã·ã§ã³ãè¿œå ããã ãã§ãªããããŸããŸãªæäœãè¡ããDevToolsã«çµ±åããããšãã§ããŸãã
WebVR-UI
ããã€ã¹ãVRããã€ã¹ã§ã¯ãªãå ŽåïŒããã³ã¹ããŒããã©ã³ã®ãã©ãŠã¶ãŒãåãªããã©ãŠã¶ãŒã§ããå ŽåïŒãwebvr-uiã©ã€ãã©ãªã䜿çšããŠãããã»ããã¢ãŒãã«åãæ¿ããVRã€ã³ã¿ãŒãã§ã€ã¹ãåäœæã§ããŸãã ãã®ã©ã€ãã©ãªã䜿çšãããšãVRã¢ãŒãã«åãæ¿ããããã®ãã¿ã³ãåããçŸããUIã€ã³ã¿ãŒãã§ã€ã¹ãäœæã§ããŸãã ãããžã§ã¯ããžã®ãªã³ã¯ïŒ github.com/googlevr/webvr-ui
æ°è¡ã®ã³ãŒããè¿œå ããããšã«ããïŒ
var renderer = new THREE.WebGLRenderer(); var options = {}; var enterVR = new webvrui.EnterVRButton(renderer.domElement, options); document.body.appendChild(enterVR.domElement);
ãã®ã©ã€ãã©ãªã¯A-Frameãã¬ãŒã ã¯ãŒã¯ãšäºææ§ããããéåžžã«åªããŠããŸãã ã³ãŒãã«å±æ§ãè¿œå ããã ãã§ãã
<a-scene webvr-ui> ... </a-scene>
ãããŠã䟿å©ãªVRã€ã³ã¿ãŒãã§ãŒã¹ã«ã¢ã¯ã»ã¹ã§ããŸãã WebVRãå©çšå¯èœãªå Žåã¯ãVRã¢ãŒãã«åãæ¿ããããã«æ±ããããŸãããã以å€ã®å Žåã¯ãVRã¢ãŒããªãã§ãã¢ã¢ãŒãã§Webã¢ããªã±ãŒã·ã§ã³ãèµ·åããããšããå§ãããŸãã
ãã®ã©ã€ãã©ãªã¯é«åºŠã«ã«ã¹ã¿ãã€ãºå¯èœã§ãããããç¬èªã®ã«ã¹ã¿ã ãã¿ã³ãäœæã§ããŸãã
ã©ãããã°äžçãæ§ç¯ã§ããŸããïŒ
VRã®äžçã«åå ããã«ã¯ã3Dã°ã©ãã£ãã¯ã¹ã®æäœæ¹æ³ãåŠã¶å¿ èŠããããŸãã WebGLããŒãããåŠç¿ããå Žåãããã¯å°é£ãªäœæ¥ã®ããã§ãã ããããæãç°¡åãªæ¹æ³ã¯ãThreejsãD3.jsãªã©ã®æ¢è£œã®ã©ã€ãã©ãªããŸãã¯VRïŒMozillaããŒã ã®A-Frameãªã©ïŒãæäœããããã®å°çšãã¬ãŒã ã¯ãŒã¯ã䜿çšããããšã§ãã ãã§ã«ãReactã®ãã¡ã³ããã³FBã®è žããåºãŠãããã¹ãŠã®ãã®ã®ããã®React VRã®ãã¬ãã¥ãŒãªãªãŒã¹ããããŸãã ããããããã¯å¥ã®èšäºã®ãããã¯ã§ãã
ã¿ã€ãVR
A-Frameãã¬ãŒã ã¯ãŒã¯ã䜿çšãããšãæå°éã®åŽåã§VRã®äžçãæ§ç¯ã§ããŸãã A-Frameã¯ãä»®æ³çŸå®åãã®Webã¢ããªã±ãŒã·ã§ã³ããã³Webãµã€ããäœæããããã®HTMLãã¬ãŒã ã¯ãŒã¯ã§ãã ãã©ãŠã¶ã§çµæãèŠããšã3Dç»åã衚瀺ããWebããŒãžã®ããã«èŠãããªããžã§ã¯ããæäœãããæäœãããã§ããŸãã å šäœåã¯WebGLã䜿çšããŠæç»ããããã¬ãŒã ã¯ãŒã¯ã®äž»ãªã¿ã¹ã¯ã¯ãHTMLããŒã¯ã¢ãããšåæ§ã«ãããã³ããšã³ãã¬ã³ããªã³ã°çšã«éåžžã®æ¹æ³ã§3次å ã®äžçãäœæã§ããã·ã³ãã«ãªããŒã«ãæäŸããããšã§ãã ãã¬ãŒã ã¯ãŒã¯èªäœã¯Threejsã«åºã¥ããŠãããé«ã¬ãã«ã®ã¢ãã€ã³ã§ãã
A-Frameãã¬ãŒã ã¯ãŒã¯ã¯ãäžé£ã®å¹Ÿäœããªããã£ããä»ããŠ3Dã·ãŒã³ãäœæããŸãã åºæ¬çãªã³ã³ããŒãã³ãããŸã ãªãå Žåã¯ãããè€éãªã³ã³ããŒãã³ããè¿œå ããããç¬èªã®ã³ã³ããŒãã³ããè¿œå ããããšãã§ããŸãã ã·ãŒã³ãªããžã§ã¯ãã«ã¯ãäœçœ®ãå転ãã¹ã±ãŒãªã³ã°ãªã©ã®äžè¬çãªå¹ŸäœåŠçããããã£ã䜿çšã§ããŸããããã«ãã«ã¡ã©ãšå æºã®äœçœ®ãèšè¿°ããããšãã§ããŸãã
A-Frameã«ã¯ã3Dã¯ãŒã«ãããããã°ã§ããåªããã€ã³ã¹ãã¯ã¿ãŒããããŸãã
å€ãã®è¯ãäŸãããã«ãããŸã ã
ãããã¯ç解ãããããããããåŠç¿ããåŸãéåžžã«è¿ éã«æåã®ãHello VRã¯ãŒã«ãããäœæã§ããŸãã A-Frameã¯ARéçºã«ã䜿çšã§ããŸãã A-Frameã詳ãã調ã¹ãŠã¿ããšãããã§å¥ã®èšäºå šäœã«ã€ããŠã話ãã§ããŸãïŒãã®ãããã¯ã«èå³ãããå Žåã«è¡šç€ºãããŸãïŒã
React VR
ReactVRã¯Reactjsã«åºã¥ããã¬ãŒã ã¯ãŒã¯ã§ãã é¢å¿ããããæçš¿ã®è©äŸ¡ãé«ãå Žåã¯ãå¥ã®èšäºãäœæããŸã...ä»ã®ãšããããªã³ã¯ãæ®ããŠãã ããïŒ
developer.oculus.com/blog/introducing-the-react-vr-pre-release
èšäºãè¯ãè©äŸ¡ãåŸãŠãèªè ããã®ãããã¯ã«èå³ãæã£ãŠããããšã瀺ããããããã«ã€ããŠå¥ã®èšäºãäœæããŸãã
WebVRãªãã§ãã§ããŸããïŒ
åè¿°ã®ããã«ãWebVR APIèªäœã¯ãVRããã€ã¹ã䜿çšããå ŽåããŸãã¯ãã£ã¹ãã¬ã€ã«é¢ããç¹æ§ãååŸããããç»åãã¬ã³ããªã³ã°ãããããå Žåã«ã®ã¿å¿ èŠã§ãã ããããã¢ãã€ã«VRã«ã€ããŠè©±ããŠããå Žåãç©ççã«ã¯1mã®ç»é¢ã§äœæ¥ããŠããŸãã ããããã¹ãã¬ãªãã¢ããšãã¥ã¬ãŒãã§ããŸããWebVRAPIã¯ã2ã€ã®ç©çãã£ã¹ãã¬ã€ã§åäœããããã«ãç»é¢ã§ã®äœæ¥ãæœè±¡åããã³ã«ãã»ã«åããã®ã«åœ¹ç«ã¡ãŸãã åæã«ãã³ãŒãã¯ã¯ãã¹ãã©ãããã©ãŒã ã«ãªããããšãã°ãOculusã®Carmelãã©ãŠã¶ã§WebVRã¢ããªã±ãŒã·ã§ã³ãå®è¡ã§ããããã«ãªããŸãã
WebVR APIã䜿çšããThreejsã®3Dã¯ãŒã«ãã®äŸ
ããã§ã¯ããã¹ãŠã®ãã©ãŠã¶ã§éå§ããWebVRãããžã§ã¯ããäœæã§ãããããã§ãå®åæã䜿çšããäŸã瀺ããŸãã iOSã§ãã
æºåå®äºãã¢ïŒ webvr.majorov.su/sample1
<!DOCTYPE html> <html lang="en"> <head> <title>Web VR boilerplate demo</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, shrink-to-fit=no"> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/> <style> body { width: 100%; height: 100%; background-color: #000; color: #fff; margin: 0px; padding: 0; overflow: hidden; } /* Position the button on the bottom of the page. */ #ui { position: absolute; bottom: 10px; left: 50%; transform: translate(-50%, -50%); text-align: center; font-family: 'Karla', sans-serif; z-index: 1; } a { color: white; } </style> </head> <body> <div id="ui"> <div id="vr-button"></div> <a id="magic-window" href="#">Try it without a headset</a> </div> </body> <script>WebVRConfig = { BUFFER_SCALE: 0.5 }</script> <script src="node_modules/es6-promise/dist/es6-promise.min.js"></script> <script src="node_modules/three/build/three.min.js"></script> <script src="node_modules/three/examples/js/controls/VRControls.js"></script> <script src="node_modules/three/examples/js/effects/VREffect.js"></script> <script src="node_modules/webvr-polyfill/build/webvr-polyfill.min.js"></script> <script src="node_modules/webvr-ui/build/webvr-ui.min.js"></script> <script> var lastRenderTime = 0; // VRDisplay. var vrDisplay; var boxSize = 5; // THREE.Objects. var scene; var cube; var controls; var effect; var camera; // VR UI var vrButton; function onLoad() { // three.js WebGL . var renderer = new THREE.WebGLRenderer({antialias: true}); renderer.setPixelRatio(window.devicePixelRatio); // DOM document.body.appendChild(renderer.domElement); // scene = new THREE.Scene(); // var aspect = window.innerWidth / window.innerHeight; camera = new THREE.PerspectiveCamera(75, aspect, 0.1, 10000); controls = new THREE.VRControls(camera); controls.standing = true; camera.position.y = controls.userHeight; // VR stereo effect = new THREE.VREffect(renderer); effect.setSize(window.innerWidth, window.innerHeight); var loader = new THREE.TextureLoader(); loader.load('img/box.png', onTextureLoaded); // 3D var geometry = new THREE.BoxGeometry(0.5, 0.5, 0.5); var textureLoader = new THREE.TextureLoader(); var texture0 = textureLoader.load('img/1.jpg'); var texture1 = textureLoader.load('img/1.jpg'); var texture2 = textureLoader.load('img/0.jpg'); var texture3 = textureLoader.load('img/0.jpg'); var texture4 = textureLoader.load('img/2.jpg'); var texture5 = textureLoader.load('img/0.jpg'); var materials = [ new THREE.MeshBasicMaterial({map: texture0}), new THREE.MeshBasicMaterial({map: texture1}), new THREE.MeshBasicMaterial({map: texture2}), new THREE.MeshBasicMaterial({map: texture3}), new THREE.MeshBasicMaterial({map: texture4}), new THREE.MeshBasicMaterial({map: texture5}) ]; var material = new THREE.MultiMaterial(materials); cube = new THREE.Mesh(geometry, material); cube.position.set(0, controls.userHeight, -1); scene.add(cube); window.addEventListener('resize', onResize, true); window.addEventListener('vrdisplaypresentchange', onResize, true); // Initialize the WebVR UI. var uiOptions = { color: 'black', background: 'white', corners: 'square' }; vrButton = new webvrui.EnterVRButton(renderer.domElement, uiOptions); vrButton.on('exit', function () { camera.quaternion.set(0, 0, 0, 1); camera.position.set(0, controls.userHeight, 0); }); vrButton.on('hide', function () { document.getElementById('ui').style.display = 'none'; }); vrButton.on('show', function () { document.getElementById('ui').style.display = 'inherit'; }); document.getElementById('vr-button').appendChild(vrButton.domElement); document.getElementById('magic-window').addEventListener('click', function () { vrButton.requestEnterFullscreen(); }); } function onTextureLoaded(texture) { texture.wrapS = THREE.RepeatWrapping; texture.wrapT = THREE.RepeatWrapping; texture.repeat.set(boxSize, boxSize); var geometry = new THREE.BoxGeometry(boxSize, boxSize, boxSize); var material = new THREE.MeshBasicMaterial({ map: texture, color: 0x01BE00, side: THREE.BackSide }); skybox = new THREE.Mesh(geometry, material); skybox.position.y = boxSize / 2; scene.add(skybox); setupStage(); } // Request animation frame loop function function animate(timestamp) { var delta = Math.min(timestamp - lastRenderTime, 500); lastRenderTime = timestamp; cube.rotation.y += delta * 0.0006; if (vrButton.isPresenting()) controls.update(); effect.render(scene, camera); vrDisplay.requestAnimationFrame(animate); } function onResize(e) { effect.setSize(window.innerWidth, window.innerHeight); camera.aspect = window.innerWidth / window.innerHeight; camera.updateProjectionMatrix(); } function setupStage() { navigator.getVRDisplays().then(function (displays) { if (displays.length > 0) { vrDisplay = displays[0]; if (vrDisplay.stageParameters) { setStageDimensions(vrDisplay.stageParameters); } vrDisplay.requestAnimationFrame(animate); } }); } function setStageDimensions(stage) { var material = skybox.material; scene.remove(skybox); var geometry = new THREE.BoxGeometry(stage.sizeX, boxSize, stage.sizeZ); skybox = new THREE.Mesh(geometry, material); skybox.position.y = boxSize / 2; scene.add(skybox); cube.position.set(0, controls.userHeight, 0); } window.addEventListener('load', onLoad); </script> </html>
次ã®èšäºã§ã¯ãWebVRã®éçºã®è©³çŽ°ãããã«è©³ãã調ã¹ãããšãã§ããŸãã ãã€ã©ãŒãã¬ãŒãã§githubã«ãªã³ã¯ããŸãïŒ github.com/borismus/webvr-boilerplate
Web ARã¯ã©ãã§ããïŒ
Web ARïŒæ¡åŒµçŸå®ïŒ-ãã©ãŠã¶ã§äœæããããšãã§ããŸãã ãããããWebAR APIãã¯ååšãããWebãã¯ãããžãŒã«å®è£ ãããæ¡åŒµçŸå®ã®åãªãæå®ã§ãã
æè¡çã«ã¯ããã¹ãŠã®äœæ¥ã¯WebVRã§ã®äœæ¥ãšãŸã£ããåãã§ãããããã«WebRTCã䜿çšããŠWebã«ã¡ã©ãããããªã¹ããªãŒã ãååŸããŸãã ããã«ããã¬ãŒã ããšã®åŠçã®ããžãã¯ãèšè¿°ããŠãå¿ èŠãªãªããžã§ã¯ããæ€çŽ¢ããŸãã ãããŠãWebVRã®å Žåã®ããã«ããããªã¹ããªãŒã ã®èæ¯ã«å¯ŸããŠ3Dã·ãŒã³ããã§ã«æç»ããŠããŸãã ãããŠãARã¯å¿ ããããããã»ããã®ååšãæå³ããããã§ã¯ãªãããšèšããªããã°ãªããŸããã ãPockemon GOïŒããæãåºããŠãã ãã-ããã¯ARãããžã§ã¯ãã§ãããVRãã«ã¡ããã¯ãããŸããã ãããã£ãŠãARãããžã§ã¯ããäœæããããã«ãVRãã«ã¡ãããçšæããå¿ èŠã¯ãããŸããã ããããåæã«ãVRãšARã®æŠå¿µã¯ãããã€ãã®ãã©ã¡ãŒã¿ãŒãšãã¯ãããžãŒã§äº€å·®ããå¯èœæ§ããããŸãã
ãµããŒãã¯äœã§ããïŒ
WebRTCããµããŒãããããã«ããŸããã¹ãŠãããã«ãããŸãã ãããã£ãŠãWeb ARã¯ãã¹ãŠã®Androidããã€ã¹ã«å®è£ ã§ãããšèšããŸãã iOSã§ã¯-ãããããããæ¬åœã«ãããå Žåã¯...
iOSããã€ã¹ã§äœãããŸããïŒ
WebVRã«ã€ããŠè©±ããŠããå ŽåãiOSããã€ã¹ã§ã¯ãã¹ãŠãããªãã¡ã€ã«ãä»ããŠå®è£ ã§ããŸãïŒãŸãã¯WebVR APIã䜿çšããã«ããã¹ãŠãèªåã§èšè¿°ããå é床èšããã®ä»ã®ã»ã³ãµãŒãä»ããŠè¿œè·¡ã¢ã¯ã·ã§ã³ãå®è£ ããèªåã§åçãæã¡è² ãããŠ2ã€ã®ãã£ã¹ãã¬ã€ããšãã¥ã¬ãŒãããŸãïŒã ARã«ã€ããŠè©±ããšãWebRTCã®ãµããŒãããªãããããã¹ãŠãæªãã§ãã ããããArgonjsã®ãããªãããžã§ã¯ãããããŸãã ããã¯ãA-FrameããŒã¹ã®ãã¬ãŒã ã¯ãŒã¯ãšããã¡ããç¹å¥ãªãã©ãŠã¶ãŒã§æ§æããããããžã§ã¯ãã§ãã
ãžã§ãŒãžã¢å·¥ç§å€§åŠã«ããã¢ã«ãŽã³4
âãããžã§ã¯ããžã®ãªã³ã¯ïŒ argonjs.io
âãã¢ïŒ argonjs.io/samples
ãã©ãŠã¶ã®æ¬è³ªã¯ç°¡åã§ãã2ã€ã®å±€ããããŸãã 1ã€ã®å±€ã¯Webkitãšã³ãžã³ã§ã2çªç®ã®å±€ïŒèæ¯ïŒã¯ã«ã¡ã©ããã®ãããªã¹ããªãŒã ã®åºåã§ãã ãã©ãŠã¶ãŒã«ã¯ç¬èªã®APIããããæåã®ããŒãžã§ã³ã®PhoneGapã®åäœã«äŒŒãŠããŸãïŒãã®ãããžã§ã¯ãã®éçºã®å€æãã«ã³ããŒã·ã£ã«ã2008幎ã«è©Šãããå Žåãããã¯æ¡åŒµJS APIãåããç¹å¥ãªiPhoneãã©ãŠã¶ãŒã§ããïŒã
åæã«ãArgonjsã¯iOSçšã®VRéçºã«ã䜿çšã§ããŸãã ããæ£ç¢ºã«ã¯ãMVPãå®è¡ããŸãã JSã§VR / ARåãã®ã¯ãã¹ãã©ãããã©ãŒã ã¢ããªã±ãŒã·ã§ã³ãéçºããå¿ èŠãããå Žåã¯ãReact VRãšçµã¿åãããReact Nativeã®æ¹åã«ç®ãåããããPhoneGapã«ãã¹ãŠãè©°ã蟌ãããšãã§ããŸãã
éèŠïŒ AppStoreã«ã¯ããã€ãã®ãã©ãŠã¶ãŒããŒãžã§ã³ããããŸãã çŸæç¹ã§ã¯ãããŒãžã§ã³4ãããŠã³ããŒãããå¿ èŠããããŸããããŠã³ããŒãããªããšããã¬ãŒã ã¯ãŒã¯ã¯èµ·åããŸããã
itunes.apple.com/us/app/argon4/id1089308600?mt=8
ã²ãŒã ãããã«ã€ããŠã¯ã©ãã§ããïŒ
ããã¯ãè¿œå ã®ãããã¯ã§ãã Bluetooth APIãšGamepad APIãæ±ããŸãã ãããã¯ãã©ãŠã¶ã«ããããã¹ã¯ããããšã¢ãã€ã«ããã€ã¹ã®äž¡æ¹ã§ãµããŒããããŠããŸãïŒããã§ãããã©ãŠã¶ã«ã¯ãã¥ã¢ã³ã¹ãšãæ°ã«å ¥ãã®ãªã¹ãããããŸãïŒã ããã¥ã¡ã³ãã調æ»ããããããæäœããæ¹æ³ãåŠç¿ããŸãã ã²ãŒã ããããšVRã®äžçãšã®çžäºäœçšã«ã€ããŠ-ããã¯å¥ã®èšäºïŒãŸãã¯ããã€ãã®èšäºïŒã®ãããã¯ã§ãããç°¡åã«èšããšããã§ã¯ãããŸããã
ãŠãŒã¹ã±ãŒã¹ãšã¢ããªã±ãŒã·ã§ã³
Tutu.ruã«ã€ããŠè©±ãå ŽåãVR / ARãå®éã«äœ¿çšããã±ãŒã¹ã䜿çšããããã®ã¢ã€ãã¢ãæ¢ã«ãããŸãã ããšãã°ããããã¯Toursãããžã§ã¯ãã®3Dã®ã£ã©ãªãŒã§ãã å°ãæŽç·Žããã360ã®ã®ã£ã©ãªãŒãVRãã«ã¡ããã«é©åãããããšãã§ããèªå® ã«VRããã¯ã¹ãæã£ãŠãã人ãªã誰ã§ãããã¬ãŒã³ã¹ã®å¹æã§å°æ¥ã®ããã«ãšããŒãããèŠããããšãã§ããŸãã Trainãããžã§ã¯ãã®3Dã®ã£ã©ãªãŒã«ãåãææ³ãé©çšã§ããŸãããã®ãããžã§ã¯ãã§ã¯ãè»ãå åŽããèŠãããšãã§ããSapsanã®VRãã«ã¡ããããå ŽæãçŽæ¥éžæã§ããŸãã åæ§ã«ãå°æ¥çã«ã¯ãéœåžéãã¹ãå©çšã§ããããã«ãªããŸãã ãŸãã ãšã¯ã¹ã«ãŒã·ã§ã³ãããžã§ã¯ãã§ã¯ãå°æ¥ã®ãšã¯ã¹ã«ãŒã·ã§ã³ã®ãã¢ãã¬ãã¥ãŒãè¡ãããšãã§ããŸãã
å¥ã®ã±ãŒã¹ã¯ã ãªãã©ã€ã³ã®ãªãã£ã¹ã§ã®èŠ³å 客ã®åš¯æ¥œã§ãã 芳å 客ãéèªããã³ãã¬ããã®ä»£ããã«ãã¢ãŒãããŒãžã£ãŒã«åºåãã®ãåŸ ã£ãŠããéã«ãSamsung GR VRãã«ã¡ãããå ¥ããŠæ è¡ã«ã¿ãã°ãå床äœæããããšã§ãé©åãªãã¢ãŒããã±ãŒãžãéžæã§ããŸãã ARããŒããéçºãããããªãã©ã€ã³ãªãã£ã¹ã«é¡§å®¢ã®åš¯æ¥œã®ããã«æ å ±ã¹ã¿ã³ããããŸããŸãªé¢çœããã®ã眮ãããšãã§ããŸãã å€çŽãžã®åå¿ãåžžã«è¯å®çã§ã¯ãªãããã«ã¯ã©ã€ã¢ã³ãããã³ãã¬ãããã¹ãããã§ããå Žåãã¯ã©ã€ã¢ã³ãã¯æ°æè¡ã®ããªãºã ãéããŠç€ºãããåãåºåãç¥èŠããæºè¶³ããããšãã§ããŸãã
äžè¬çã«ãæ³ååã®éé¿ããããŸãã ç§ãã¡ã®äŒç€Ÿã®æèã§ãŠãŒã¶ãŒäºäŸãäŒããŸãããããããã¯ãã¹ãŠããã«ãªã¹ããããŠããããã§ã¯ãããŸããã äžççã«èšãã°ãã¯ãŽã³ãšå°ããªãããªãŒã䜿çšãããŠãŒã¶ãŒã±ãŒã¹ãèãåºãããšãã§ããŸãã