åã®èšäºã§ã¯ããã¬ãŒã ã¯ãŒã¯ã®åºæ¬çãªæŠå¿µãå®éã«è©Šãããã«ãA-Frameã§åºæ¬çãªã·ãŒã³ãäœæããããšããŸããã ãã®èšäºã§ã¯ãA-Frame-ãªãµã€ã¯ã«ã§ã²ãŒã ãäœæããçµéšãå ±æããããšæããŸãã VR ãããžã§ã¯ããªããžããªã¯ã 次ã®ãªã³ã¯ããå ¥æã§ããŸãã
ãªãµã€ã¯ã«ïŒïŒ
ã²ãŒã ãäœæãããšããã¢ã€ãã¢ã¯ãWeb VRãç¥ã£ãŠããã«çãŸããŸããã äžè¬çã«ã¯ãã©ã®ãããªå Žåã§ãWebäžã®ã²ãŒã ã¯ãããŒãœãã«ã³ã³ãã¥ãŒã¿ãŒãã³ã³ãœãŒã«ã¯èšããŸã§ããªããã¢ãã€ã«ããã€ã¹ã«ãšã£ãŠãåªãããããžã§ã¯ããããå£ããšæããŸãã ããããç§ã«ã¯ãã²ãŒã ã¯æãé£ãããã¹ãã ãšæãããŸãã ç§ã¯èªåã«äœãã§ããããæ£ç¢ºã«èãå§ããŸããã ä»ã®ãããžã§ã¯ããèŠãŠãããã«ã³ã³ãããŒã©ãŒã䜿çšããŠäœããæ®ãæ©äŒã«æéãåããŸããã ãããŠãç§ã¯ããªãé·ãéãå¥ã ã®ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ã«åŸäºããŠããçµç¹ã«æ¥ç¶ããŠããã®ã§ãçãã¯èªç¶ã«åºãŠããŸããã ãªãµã€ã¯ã«ã ãŽããåãããŽããšããŠæšãŠãŸãã ãã£ãšç°¡åã«ã§ããããšã ãããããã¹ãŠãããã»ã©åçŽã§ã¯ãªãããšãå€æããŸãããå®éãããã«ã€ããŠã¯ããã«èª¬æããŸãã
ãã¬ãŒã ã¯ãŒã¯ã®éžæ
ã²ãŒã ã®äœæ¥ãéå§ããæç¹ã§ãããŸãéèŠã§ãªããã¬ãŒã ã¯ãŒã¯ã¯2ã€ã ãã§ããïŒReact 360ãA-Frameã æããã«ãA-Frameã¯ã²ãŒã ã®äœæã«æé©ã§ããã ã¯ããä»ã§ãVRããµããŒãããPlayCanvasã²ãŒã ãšã³ãžã³ãããããšãç¥ã£ãŠããŸãããæé ãã§ãã ããã«ãA-Frameã¯ã²ãŒã ã®äœæã«ãšã£ãŠãæªããªãããšãå€æããŸããã
ã©ãããå§ããŸããïŒ
ç§ã¯ãA-Frameã®éçºè ã«ããã²ãŒã ã®å ¬åŒäŸãç 究ããããšããå§ããŸããã ãããã®å©ç¹ã¯ååã§ã¯ãããŸããã A-BlastãA-PainterãMuseumãSuper CraftããããŠGunters of Oasisã æ瀺ããããã¹ãŠã®ãããžã§ã¯ãã®äžã§ãç§ã¯æãA-Blastã奜ãã§ãã-å®å®ã§æãããããçãç©ãšæŠããªããã°ãªããªãã·ã¥ãŒãã£ã³ã°ã²ãŒã ãããã£ãŠãç§ã¯ãã®ã²ãŒã ãç§ã®ãã³ãã¬ãŒããšããŠäœ¿çšããããšèããŸããã ããããããŸããããŸããã§ããã ãããŠããã®çç±ã¯ã²ãŒã ã®æ§é ã«ãããŸããã 圌女ã¯ããŸãã«ãéç¶ãšããŠããŠãèãæãããŠããªãããã«æããŸããã ãããããã以äžã¯å¿ èŠãããŸãããããã£ãšäŸ¿å©ã§ç解ããããäœãããããã£ãã®ã§ãã
æ§é
A-Blastæ§é ã¯ã1ã€ã®ãšã³ããªãã€ã³ãã®ã¿ãè¡šããŸããindex.htmlãã¡ã€ã«ã«ã¯ããã¹ãŠã®ã¢ã»ãããã¡ã€ã³ã®ã²ãŒã ãšã³ãã£ãã£ãã³ã³ãããŒã«ãããã³äžè¬çãªãã¹ãŠã®1ã€ã®ã·ãŒã³ãå«ãŸããŸãã
ã¹ã¯ãªãŒã³ã·ã§ããã§ãããããã«ãå¿ èŠãªã³ã³ããŒãã³ããšã·ã¹ãã ïŒA-Frameã¯Entity Component Systemãã¿ãŒã³ã䜿çšïŒã«å ããŠã匟䞞ãšæµããããŸã-åºæ¬çã«åãã·ã¹ãã ã§ãããäœããã®çç±ã§ç¬èªã®ã©ãããŒããããŸãã äžè¬çã«ããã®ã³ãŒãã¯ç解ãã«ãããšèšããŸãã ããã§ããã®ã³ãŒããã©ã®ããã«æ§æã§ããããèããããšã«ããŸããã æåã®ã¢ã€ãã¢ã¯ãã·ãŒã³ãæ§æèŠçŽ ã«åå²ããããšã§ãã ã«ãŒã¿ãŒãšãã³ãã¬ãŒãã圹ç«ã€ã®ã¯ãªãã§ãããããã«ãããã·ãŒã³ã®ãã®éšåãŸãã¯ãã®éšåãã¬ã³ããªã³ã°ãããŸãã æåãš2çªç®ïŒ5åã§ã¯ãªãïŒãæ€çŽ¢ããåŸãäœãèŠã€ãããŸããã§ããã ç§ã¯èŠåã®æ¯æè ã§ãããèªè»¢è»ãæžãããšã¯ãããŸããããä»åã¯æ±ºæãæžããªããã°ãªããŸããã§ããã ã§ãã2ã3é±éã®ãã¡ã®ã©ããã§ãKevin Ngoã®ãã³ãã¬ãŒãã«åºäŒããŸããã ããããæé ãã§ããã
ã«ãŒã¿ãŒãšãã¿ãŒã³
ãã®ããã a-frame-router-templatesãã·ãŒã³ã«å ¥ããŸã ã 圌ã¯äœãã§ããŸããïŒ åè¿°ã®ããã«ããã®äž»ãªã¿ã¹ã¯ã¯ãã²ãŒã ã®å¿ èŠãªéšåãããšãã°ã¿ã€ãã«ç»é¢ã競æå Žãã²ãŒã ã®çµäºç»é¢ãªã©ãã¬ã³ããªã³ã°ããããšã§ãã ã©ããã£ãŠããã®ïŒ ååãšããŠãå¿ èŠãªãã®ã¯ãã¹ãŠgithubã®ã¢ãžã¥ãŒã«ã®ããã¥ã¡ã³ãã§èŠã€ããããšãã§ããŸãããèŠããã«ã次ã®ãã®ããããŸãã
<a-scene router> ... <!-- Routes --> <a-route id="start-screen" template="start-screen"></a-route> <a-route id="game-field" template="game-field"></a-route> <a-route id="game-over" template="game-over"></a-route> <a-route id="how-to-play" template="how-to-play"></a-route> <!-- End Routes --> ... <!-- Templates --> <a-template name="controls"></a-template> <!-- End Templates --> ... </a-scene>
- ã«ãŒã¿ãŒã³ã³ããŒãã³ããã·ãŒã³ã«è¿œå ããŠããŸãã
- ã¢ããªã±ãŒã·ã§ã³ã®åéšåïŒã·ãŒã³ã®ãã¬ãŒã ïŒã«ã«ãŒããè¿œå ããŸãã ããŒã ç»é¢çšã®1ã€ã®ã«ãŒãã競æå Žçšã®å¥ã®ã«ãŒããªã©ã
- a-templatesã䜿çšããŠãã³ãã¬ãŒããçŽæ¥ã¬ã³ããªã³ã°ãã
- å¿
èŠã«å¿ããŠãã«ãŒããå€æŽããŸã
this.el.systems.router.changeRoute('game-field');
泚 ïŒãã®äŸã§ã¯ã·ãŒã³ã³ãŒããåç §ããŠãããããã«ãŒã¿ãŒã·ã¹ãã ãçŽæ¥åŒã³åºãããšãã§ããŸãã - 次ã®ãããªãã³ãã¬ãŒããèšå®ããŠæ¥ç¶ããŸãã
AFRAME.registerTemplate('game-field', ` <a-sub-assets> <a-asset-item id="glass" src="/assets/models/glass_bottle.gltf"></a-asset-item> ... <audio id="fail" src="/assets/sounds/fail.wav" preload></audio> </a-sub-assets> <a-template name="button" options="text: EXIT; position: 0 1 4; rotation: 0 180 0; event: stop-game"></a-template> <a-entity id="indicator" indicator visible="false" position="0 1 -2" text="align: center; width: 4; color: #00A105; value: -1" ></a-entity> <a-entity game-field-manager></a-entity> `);
æ³šïŒ a-sub-assetsã§ã¯ãa-assetsãšåæ§ã«ã¢ã»ãããèªã¿èŸŒãããšãã§ããŸãããããã©ã«ãã§ãã§ãã¯ããããã¢ã»ãããæ¢ã«è¿œå ãããŠããå Žåã¯ãã«ãŒããå€æŽãããŠãã¢ã»ããã¯å床远å ãããŸããã
泚2ïŒéåžžããã³ãã¬ãŒãã¯ES6ãã³ãã¬ãŒãæååã§ã®ã¿äœ¿çšã§ããŸãã ããããªããšãã¯ãŒã«ã§ã¯ãªãããã¹ããªã³ã°ã+ var +ãã¹ããªã³ã°ãã«å€ããå¯èœæ§ããããŸãã ããšãã°ãKevinã¯ãã³ãã¬ãŒããšã³ãžã³ããµããŒãããŠããŸãã ãããããªããããè€éã«ããŸããïŒ
ãããã£ãŠã ã³ã³ããŒãã³ããã·ã¹ãã ããã³ãã¬ãŒããç¶æ ãã©ã€ãã©ãªãå«ã䟿å©ãªã¢ããªã±ãŒã·ã§ã³æ§é ãäœæã§ããŸãã ãã以äžã®ãã®ã¯ãªãããã¹ãŠãæ£ã«ãããŸãã
ãªããžã§ã¯ããæäœãã
解決ãã¹ãæåã®ã¿ã¹ã¯ã¯ãªããžã§ã¯ãã®æäœã§ããã ã°ã©ãã®ãããªæ©èœãå¿ èŠã§ãã-æããŸãã æåã¯ããã®ãããªã³ã³ããŒãã³ãããŒãããäœæããæ¹æ³ã«ã€ããŠèãå§ããŸããã çŽç²ã«ãã£ãªãã³ã¬ãã«ã§ã¯ããã®ãããªåæ ã¯èš±å®¹ãããŸããã³ã³ãããŒã©ãŒïŒãã¹ã¯ãããã®å Žåã¯ã«ãŒãœã«ïŒããããäœçœ®ããããŸãã ãŸãããã¥ãŒããªã©ã®ç¹å®ã®ãªããžã§ã¯ããããããããã«ã¯äœçœ®ããããŸãã ã³ã³ãããŒã©ãŒã®äœçœ®ãå€æŽããã«ã¯ããªããžã§ã¯ãã®äœçœ®ãå€æŽããå¿ èŠããããŸãã ãã ïŒ ã ãããå®éã«ã¯ãããããããã¯æ©èœããŸããã ãã®ããšãçŽåŸãããããã«ãéåžžã«é·ããªã¹ãããããã€ãã®ç¹ã«èšåããŸãã
- A-Frameã®ã«ãŒãœã«ã¯a-cameraã®åå«ã§ãããçžå¯Ÿåº§æšãæã¡ãŸãã
- ã³ã³ãããŒã©ãŒã®äœçœ®ã¯ååã§ã¯ãããŸãããæ¹åããªããžã§ã¯ããŸã§ã®è·é¢ãã«ã¡ã©ïŒãã¬ã€ã€ãŒïŒã®äœçœ®ãèæ ®ããå¿ èŠããããŸãã
- ç©ççãªããã£ãæã€ãªããžã§ã¯ãã®å Žåããžãªã¡ããªã®åº§æšã¯ããã£ã®åº§æšãšæ¥ç¶ãããŠãããããããã¯ãŸã£ããæ©èœããŸããã
ãŠã£ã«ããŒãã£ãŒæ°ãšåœŒã®å人ãã¡ãa-frame-super-handsãäœã£ãããšã¯è¯ãããšã§ãã åºæ¬çã«ããã®ã©ã€ãã©ãªã«ã¯å¿ èŠãªãã¹ãŠã®ã³ã³ããŒãã³ããå«ãŸããŠããŸãã
- ãããªã³ã°å¯èœ ã ã¬ã€ãã³ã¹ã ã³ã³ãããŒã©ãŒãŸãã¯ã«ãŒãœã«ããªããžã§ã¯ãã®è¡çªãŸãŒã³ïŒéåžžã¯ãªããžã§ã¯ãå šäœïŒã«åããŸã
- ã€ãã ïŒãã£ããã£ã é©åãªãã¿ã³ã䜿çšããŠãªããžã§ã¯ããã€ãã¿ããã©ãã°ããŸã
- äŒžçž®æ§ ïŒäž¡æã§ã€ãã¿ãã¹ãã¬ãã/ã¹ã¯ã€ãŒãº
- ãã©ãã°å¯èœ\ããããå¯èœ ïŒã€ãã³ããç¹å®ã®å Žæã§ã¢ã€ãã ãã¹ããŒãããããå€å¥ããããã«æ¬è³ªçã«å¿ èŠ
äžèšã®ãªããžããªã§ãã¹ãŒããŒãã³ãã®èšå®ãšæ¥ç¶ã«å¿ èŠãªãã¹ãŠãèŠã€ããããšãã§ããŸãã ããã€ãã®ãã¥ã¢ã³ã¹ã«æ³šç®ãããã ãã§ãã
- å³æçšãšå·Šæçšã«å¥ã ã®ããã¯ã¹ã€ã³ãäœæããŸãã ãµããŒããããããã€ã¹ã®ã¿ã€ãããšã«ã³ã³ããŒãã³ããåé¢ããŸãã ããšãã°ãå³æã«ã¯ãoculus-touchãvive-controlsãwindows-motion-controlsã«å ããŠãoculus-go-controlsãšgear-vr-controlsããããŸãã BPã¢ãã€ã«ãã«ã¡ããã®å Žåãå·Šæãé ãå¿ èŠããããŸãã åã³ã³ãããŒã©ãŒã«ã¯ãããã¯ã¹ã€ã³ãã³ããšã¹ãŒããŒãã³ãã³ã³ããŒãã³ãã®äž¡æ¹ãå«ãŸããŠããå¿ èŠããããŸãã äŸ ;
- reycasterã®ãªããžã§ã¯ãïŒ.clsnameãæå®ããå Žåãã³ã³ãããŒã©ãŒã䜿çšããŠååŸã§ããåèŠçŽ ã«è¿œå ããããšãå¿ããªãã§ãã ãããããããªããšãã¹ãŒããŒãã³ãã®1ã€ã®ã€ãã³ãã倱æããŸããã ãã¡ããã coliderEventïŒraycaster-intersectionã®å Žå ã
- ããŠã¹ã§ãã©ãã°ãããšã2D座æšã3Dã¯ãŒã«ãã«æ圱ãããããããã¹ã¯ãããçšã®ã«ãŒãœã«ã䜿çšããããšããå§ãããŸãã
ç©çåŠãè¿œå
ãã¬ãŒã ã«ç©çãè¿œå ããããšã¯å®éã«ã¯éåžžã«ç°¡åã§ãã ããã«ã¯ç¹å¥ãªã·ã¹ãã ããããŸãã ããã¯ã·ãŒã³ãšåºæ¥äžããã«è¿œå ãããç©çåŠã¯ãã§ã«ããªãã®ãã±ããã®äžã«ãããŸãã
<a-scene physics="debug: false"> <a-box dynamic-body position="0 1 -2"></a-box> <a-box id="floor" static-body></a-box> </a-scene>
Mark ïŒ debugïŒtrueã¯ããžãªã¡ããªã«ãã€ã³ããããç©çããã£ã衚瀺ããæ©èœãæå¹ã«ããŸãã ãªããžã§ã¯ãããã¢ãŠãã©ã€ã³åãããå¿ èŠãããå Žåã«äŸ¿å©ã§ãã
å®éãããã¯cannon.jsã®ã©ãããŒã§ããããžãªã¡ããªãšç©çããã£ãæ¯èŒããããã®æ±ãäœæ¥ããã¹ãŠè¡ããŸãã ç¹°ãè¿ããŸããããã®ã·ã¹ãã ã®ä»çµã¿ã«ã€ããŠã¯ããªããžããªã®èª¬æã§èŠã€ããããšãã§ããŸãã ãããŠãç§ã¯èªåã®ã²ãŒã ã«ãšã£ãŠéèŠãª1ã€ã®ç¹ã ãã«çŠç¹ãåœãŠãããšæããŸãã
ãŽãã®ãã¿ã³ãæŒãããšã§ãç¹å®ã®åãèšå®ãããŠããããšã確èªããå¿ èŠããããŸããïŒãã¿ã³ãæŒãç¶ããã»ã©åã倧ãããªããŸãïŒã å€æããããã«ããã®ã¿ã¹ã¯ã¯äžèŠæããã»ã©åçŽã§ã¯ãããŸããã ããŠãäœããããªã«è€éãªã®ã§ããããïŒ -ããªãã¯èšããç§ãã¡ã¯é©çšããImpluseãšåºæ¥äžãã ã ããã§ã¯ãããŸãã...ããã¯ãäœã®äžå¿ã«é©çšããããã¯ãã«ã«æ²¿ã£ãŠãªããžã§ã¯ãã®å転ãèšå®ããŸãã ãã®æ¹æ³ã䜿çšãããšããŠãŒã«ã®ã¿ããšãã¥ã¬ãŒãã§ããŸãã ãã ããå¹³é¢ã«å¯ŸããŠæ£ããè§åºŠã§ãã¯ãã«ãèšå®ãããšãããã·ã¥ã«äŒŒããã®ãåŸãããå ŽåããããŸãã ããããããã¯ç§ãå¿ èŠãšãããã®ã§ã¯ãããŸããã
çµå±ã®ãšããããã®ãã©ã¡ãŒã¿ãŒãèšå®ãããšãã¯é床ãå¿ èŠã§ããããªããžã§ã¯ãã¯æå®ãããæ¹åã«åãå§ããŸãã ãã®æ¹åã¯ãã¯ãã«ã«ãã£ãŠæå®ãããŸãã ãããŠããããã楜ãã¿ãå§ãŸããŸãã ãã®ãã¯ã¿ãŒãèŠã€ããæ¹æ³ã¯ïŒ ç§ã¯2ã€ã®ãªãã·ã§ã³ãèŠã€ããŸããïŒ
- ã³ã³ãããŒã©ãŒïŒãŸãã¯ãã¹ã¯ãããçšã®ã«ã¡ã©ïŒã®ã¯ã©ãŒã¿ããªã³ãååŸããŸããããã¯ã空éã§ã®åããè¡šããŸãã ãã¯ãã«V1 = <1,1,1>ãäœæããããã«æããåãæããŠããã®ãã¹ãŠã«æ¹åãé©çšããŸãã
const velocityVector = new THREE.Vector3(1,1,1); velocityVector.multiplyScalar(this.force); velocityVector.applyQuaternion(controllerQuaternion); this.grabbed.body.velocity.set(velocityVector.x, velocityVector.y, velocityVector.z);
- ã³ã³ãããŒã©ãŒïŒã«ãŒãœã«ïŒã®äœçœ®ãšã¹ããŒãããŠãããªããžã§ã¯ãã®äœçœ®ãèŠã€ããŸãã 2ç¹ã®æ¹åãã¯ãã«ãèšç®ããŸãã ãã¯ãã«ãæ£èŠåããŸãã ãããŠããããåã§æããŸãã
const directionX = (trashPosition.x - zeroPosition.x); const directionZ = (trashPosition.z - zeroPosition.z); const vectorsLength = Math.sqrt(Math.pow(directionX, 2) + Math.pow(directionZ, 2)); const x = (directionX / vectorsLength) * this.force; const y = this.force; const z = (directionZ / vectorsLength) * this.force; this.grabbed.body.velocity.set(x , y, z );
2çªç®ã®ãªãã·ã§ã³ãéžæããã®ã¯ãxãšzã®ã¿ãã«ãŠã³ãã§ããããã§ãã ãããŠããŠãŒã¶ãŒãã³ã³ãããŒã©ãŒãæã£ãŠããã«ãããããããæšãŠããããã¿ããã¹ã±ããã«èœã¡ãããã«åŒ§ã«æ²¿ã£ãŠæããå¿ èŠããã£ãã®ã§ãèªåã§èšå®ããŠãã ããã
ã¢ãã«ã«ã€ããŠã®ããã€ãã®èšè
æåããã ããŒããªã¹ã¿ã€ã«ã®ã²ãŒã ãäœãããšã«ããŸããã ä»æ¥ã®WebGLã¯æ¯èŒââçè€éãªã·ãŒã³ãã¬ã³ããªã³ã°ã§ããŸããããã®ããã©ãŒãã³ã¹ã¯äŸç¶ãšããŠDirectXãVulkanãMantleãªã©ã®é«åºŠãªã©ã€ãã©ãªãããå£ã£ãŠããŸãããŸãããŠãŒã¶ãŒã®ããã€ã¹ã®ããã©ãŒãã³ã¹ã«ãäŸåããŸãã æé ãªäŸ¡æ Œã®BPã¢ãã€ã«ãã«ã¡ããïŒOculus GoãGear VRïŒã«çŠç¹ãåœãŠããã®ã§ãäœããªã¯VRã¢ããªã±ãŒã·ã§ã³ãŸãã¯ã²ãŒã ãäœæããæ°å°ãªããœãªã¥ãŒã·ã§ã³ã®1ã€ã ãšæããŸãã ãã¡ãããããã¯ãã¹ãŠããªã¥ãŒã ã«äŸåããŸãã
ããŠãäœããªã¯éåžžã«äœããªã§ãããããããã¹ãŠè¡ãæ¹æ³ã¯ïŒ ãã¹ãŠãéåžžã«ã·ã³ãã«ã§ãåªãããªãŒãã³ãœãŒã¹ããŒã«BlenderããããŸãã ç§ãä¿¡ããŠã圌ã¯å€ãã®èœåããããŸãããåçŽãªã¿ã¹ã¯ã«ã¯ããŸãé©ããŠããŸããã Blenderã®ã¢ããªã³ã°ã«é¢é£ãããã¬ãŒãã³ã°è³æã¯ãããããããããããèŠã€ããããšã¯é£ãããããŸããã Webéçºã«é¢é£ããããã€ãã®ãã€ã³ãã«æ³šæãéäžããããã£ãã ãã§ãã
- Three-jsãšã¯ã¹ããŒã¿ãŒã¯å€ããªã£ãŠããŸãã GLTFãšã¯ã¹ããŒã¿ãŒãèŠã€ããŠæäŸããå¿ èŠããããŸãã GLTFã¯ãWebçšã«èšèšãããç¹å¥ãªåœ¢åŒã§ãã ã¯ããããã¯JSONã§ãã
- GLTFã¯Cycles RendererããµããŒãããŠããªããããBlender Rendererã䜿çšããå¿ èŠããããŸãã ãããŠããã¯ãã¯ãŒã«ãªçµã³ç®ãè²ã®å€æãã¡ã¿ãªãã¯ã®ãã€ã©ã€ãããªãããšãæå³ããŸãïŒç°ãªãæ¹æ³ã§è¡ãããšãã§ããŸãïŒã
- éžæããã¢ã€ãã ã®ã¿ããšã¯ã¹ããŒãããå¿ èŠããããŸãã è¿œå ã®ã«ã¡ã©ãšã©ã€ãã¯å¿ èŠãããŸãããïŒ ãã¡ã€ã«>ãšã¯ã¹ããŒã> gltf 2.0ã å·ŠåŽã®ã¡ãã¥ãŒã§ã[GLTF 2.0ã®ãšã¯ã¹ããŒã]> [éžæã®ã¿ãšã¯ã¹ããŒã]ãã¯ãªãã¯ããŸãã
- Blenderã®äœçœ®<0ã0ã0>ãããšã¯ã¹ããŒããéå§ããŸãã åãå Žæã§ã¹ã±ãŒãªã³ã°ããããšããå§ãããŸããããã«ãããåŸã§ãã¬ãŒã å ã§ã¹ã±ãŒãªã³ã°ã³ã³ããŒãã³ãã䜿çšããªããªããŸãã
- ãªãµã€ã¯ã«ã®ããã«ãªãŒãã³ã¹ããŒã¹ãæç»ããå ŽåïŒ VRã§ã¯ããã¬ã€ã€ãŒãçè«çã«èŠãããšãã§ããå Žæã«ã®ã¿ãªããžã§ã¯ããè¿œå ããå¿ èŠããããŸãã 家ã®åŸãããªãµã€ã¯ã«ã®äžã§ïŒ ããã€ãã®ããªãŒãããããŠãŒã¶ãŒãããããèŠãããšãã§ããå Žæã«ã®ã¿ãããŸãã ã·ãŒã³ããªãŒããŒããŒãããå¿ èŠã¯ãããŸããã
- ã¢ãã«ã®ãããªã¢ã«ãå€æŽããå¿
èŠãããå Žåã¯ãããŒããããŸã§åŸ
æ©ããã¢ãã«èªäœãååŸãããããããã¹ãŠã®ããŒããåŒãåºãå¿
èŠããããŸãïŒGLTFã«ã¯ã¡ãã·ã¥ã ãã§ãªãæ
å ±ãå«ãŸããŠããŸãïŒ
e.detail.model.traverse((node) => { if (node.isMesh) { node.material.color = new THREE.Color(someColor); } });
çµè«ãšããŠ
ãæž èŽããããšãããããŸããïŒ ãããžã§ã¯ããªããžããªã¯æ¬¡ã®ãªã³ã¯ããå ¥æã§ããŸãã ãã®ã²ãŒã ã«äœãæ°ãããã®ãæã¡èŸŒã¿ãããã¹ãŠã®äººã«ãç§ãã¡ã¯å€§æè¿ã§ãã