AR.js
ååã®æ¤è¨¼ ã®ã¤ã¡ã¼ã¸ãã©ããã³ã°ï¼NFTï¼çã§ãã çµè«ã¨ãã¦ã¯ãååã®çµæã¨å ¨ãåæ§ã§ãããARã¨ãã¦ã¯ARãªãã¸ã§ã¯ãã®ä½ç½®ãåãããã®ãé£ãããã¡ãã£ã¨å®æ¦ã§ä½¿ç¨ããã®ã¯å³ããããªã¨ããå°è±¡ã ã£ãã¤ã¡ã¼ã¸ãã©ããã³ã°ã§ãããç°¡åãªç»åèªè¨¼ã®â¦
ãã¤ã¦ã A-Frameã§ãã¼ã«ã¼ã®æ¤ç¥ã¤ãã³ãã使ã£ãã㨠ãããã¾ããããä»åã¯Three.jsã§å®è£ ãã¦ã¿ã¾ããblog.kimizuka.org ã¨ãã£ã¦ããA-Frameãå é¨ã§ã¯Three.jsã使ã£ã¦ããã®ã§ãå®è£ æ¹æ³ã¯ã»ã¨ãã©å¤ããã¾ããã ãã ããèªèæã®ã¤ãã³ãï¼markerâ¦
åç»ã®èæ¯è²ãéæã«ãããã¯ã¹ãã£ã¼ãAR.jsã§ãã¼ã«ã¼ä¸ã«è¡¨ç¤ºãã ð¥
ããããã²ã¨ã¤ã®ã¯ãããã¼åæã§ããⶠèæ¯ãåè²ã®åç»ãã¤ãã â· åç»ã®èæ¯è²ãéæã«ç½®ãæãã¦Canvasã«ã¬ã³ããªã³ã°ãã ⸠Canvasã CanvasTexture ã«è¨å®ããã¨ããæµãã§å®è£ ãã¾ãã ⶠèæ¯ãåè²ã®åç»ãã¤ãã ã²ããã¶ãã« Animate ã使ã£ã¦ã¤â¦
ar-js-org.github.ioAR.jsã®ããã¥ã¡ã³ã ã«ã¯A-Frameç¨ã使ã£ãã³ã¼ããè¨è¼ããã¦ããã®ã§ãããThree.jsã使ã£ãå®è£ ãæ¤è¨¼ãã¾ãã çµè« å ã«çµè«ãæ¸ãã¦ããã¾ãã A-Frame ã使ã£ã¦ã Three.js ã使ã£ã¦ãã¤ã¡ã¼ã¸ãã©ããã³ã°ã®å®è£ ã¯å¯è½ã§ããã â¦
æè¿ã¯ããã£ã±ãAR.jsã®æ¤è¨¼ãè¡ãªã£ã¦ãã¾ããã2ã¤ã®ãã¼ã«ã¼ãåæã«èªèã§ããããæ¤è¨¼ãã¾ãããçµæã¨ãã¦ã¯ãPCçã®Chromeã§ããmobile Safariã§ããåæã«èªèã§ãã¾ããã ããã¤ã¾ã§åæã«ãããã試ãããã¨ãæã£ãã®ã§ãããä»åã¯ä¸æ¦2ã¤ã¾ã§â¦
ããã¾ã§ãARãã¼ã«ã¼ã¯ç½é»ã®ç»åã§ä½æãã¦ãã¾ããã ãããã ãã¡ãã®ãµã¤ã ã§ããã©ã«ãã§è¡¨ç¤ºããã¦ããç»åã¯éãå ¥ã£ã¦ãã¦ããã¼ã£ã¨æ°ã«ãªã£ã¦ã¾ãããjeromeetienne.github.ioã¨ããã®ããpattern-marker.pattãããã¹ãã¨ãã£ã¿ã§éãã¦ã¿ãã¨â¦
AR.jsã®/three.js/examples/mobile-performance.htmlã¨ãããµã³ãã«ãè¦ã¦ãã¦ãTHREEx.ArSmoothedControlsã¨ãããã®ãè¦ã¤ãã¾ãããgithub.comæ©éããµã³ãã«ã®ã³ã¼ããåè㫠以åã®ã³ã¼ã ãä¿®æ£ãã¦ã¿ã¾ãããblog.kimizuka.org ã½ã¼ã¹ã³ã¼ãï¼å ¨æï¼ â¦
ãã¡ãã®ãµã¤ã ã§ARãã¼ã«ã¼ãä½æã¨ããéãPattern Ratioãå¤æ´ããã¨ãã¼ã«ã¼ã«ããç»åã®å¤§ãããå¤æ´ãããã¨ãã§ããã®ã§ãçµæã¨ãã¦ç¸å¯¾çã«ç¸ã®å¤ªããå¤æ´ãããã¨ãã§ãã¾ããjeromeetienne.github.ioãã ãPattern Ratioã0.5以å¤ã«è¨å®ããå ´åâ¦
ããã¾ã§ã A-Frameã使ã£ãWebAR ãå®è£ ãã¦æ¥ããã AR.js + Three.js + Next.jsã使ã£ãWebAR ãå®è£ ãã¦ããããã¾ãããblog.kimizuka.org blog.kimizuka.orgä»åã¯æ¥µéã¾ã§ã·ã³ãã«ã«ãå¿ è¦æä½éã®ã©ã¤ãã©ãªï¼AR.js + Three.jsï¼ã®ã¿ã使ã£ã¦ãç»é¢â¦
AR.js + Three.js + Next.jsï¼React.jsï¼ ã§WebARã³ã³ãã³ããä½ãéãAR.jsã®èªã¿è¾¼ã¿ãã©ãããã®ãã¹ãã¼ããªã®ãããã¼ã£ã¨æ©ãã§ããã®ã§ãããã¨ããããã«ã¹ã¿ã ããã¯ãä½ã£ã¦ã¿ã¾ããã ã½ã¼ã¹ã³ã¼ã useMakerAr.js import { useEffect, useState }â¦
å æ¥ãAR.js + Three.js + Next.jsã§ã¹ãã¼ããã©ã³åãã®ã¦ã§ãARãã¤ããã¾ããã3Dãªãã¸ã§ã¯ãããã©ã¦ã¶ä¸ã«ã3Dãªãã¸ã§ã¯ãã®å½±ãç¾å®ç©ºéã«è¡¨ç¤ºãããã¦ã§ãAR + ããã¸ã§ã¯ã·ã§ã³ãããã³ã°ãä½ãã¾ãããåä»ãã¦ã影絵Rï¼ã«ã²ã¨ã¼ã¢ã¼ã«ï¼ãã§ãâ¦
ä¹ ãã¶ãã«WebARãå®è£ ããæ©ä¼ããããèªåã®è¨äºãèªã¿è¿ãã¦ããã®ã§ããããã¤ã®éã«ãåããªããªã£ã¦ãã¾ããããblog.kimizuka.orgãä½ããã¦ãªãã®ã«å£ããï¼ãã¨æã£ãããã¾ããããæ¤è¨¼ãã¦ã¿ãçµæã <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/master/three.js"></script> <script src="https://cdn.rawgit.com/mrdoob/three.js/master/examples/js/loaders/GLTFLoader.js">
ããã¾ã§WebARã®å®è£ ã«ã¯ãA-Frame + AR.jsã使ã£ã¦ãã¾ããããç´°ãã調æ´ãå¿ è¦ã«ãªã£ã¦ããã®ã§Three.js + AR.jsã§å®è£ ãã¦ã¿ããã¨æãã¾ããaframe.iothreejs.orgA-Frameãå é¨ã§ã¯Three.jsã使ã£ã¦ããã®ã§ãã©ã¤ãã©ãªãã²ã¨ã¤æ¸ããã¤ã¡ã¼ã¸ã§ããARâ¦