Grimoire.js provides effective structure to make use of WebGL representational power in Web development.
Grimoire.js provides effective structure to make use of WebGL representational power in Web development.
åã®è¨äºã§ã3Dã¢ãã«ã®ãã¯ããã®æç»ã«æåãã¾ããããã ç¾ç¶ã¯ã¢ãã«ã®å¤å½¢ã表示åºæ¥ãã ããªã®ã§ããã£ããããã¾ã§è¡¨ç¤ºåºæ¥ãããã«ã¯è²ãå¡ã£ã¦ã¿ããã¨ããã§ããä»åã®è¨äºã§ã¯ãè²ãå¡ããã¯ã¹ãã£ãè²¼ã£ã¦ã¿ã¾ããã¾ããæå¾ã«å¥ã®ã¢ãã«ã表示ãã¦ããã¯ã¹ãã£ã®å¨åã«ã¤ãã¦ããç´¹ä»ãããã¨æãã¾ãã åã®è¨äºã¯ãã¡ãâ çWebGLå ¥é:åé³ãã¯ã®ç¾éº3Dã¢ãã«ã表示ãã(ä¸ç·¨) MTLãã¼ã¿ã®èªã¿è¾¼ã¿ã表示 ãã®1ã®è¨äºã§æºåããæãOBJãã¡ã¤ã«ã¨å ±ã«MTLãã¡ã¤ã« ãçæããããã¨ãè¦ãã¦ããã£ãããã§ãããããåã®è¨äºã§ç´¹ä»ããã¨ãããOBJãã¡ã¤ã«ã¯ããªã´ã³ã®ãã¼ã¿ãå®ç¾©ãããã®ã§ããããè²ã®æ å ±ã¯ä¸åããã¾ããã§ããããããã®ãã¼ã¿ã¯ãMTLï¼ãããªã¢ã«ï¼ãã¡ã¤ã«ã«å®ç¾©ããã¦ãã¾ããã¨ããããã§ãä»åã¯è²ãã¤ããããã«ãããªã¢ã«ãã¡ã¤ã«ãæ±ãã¾ãã ãããªã¢ã«ãã¡ã¤ã«ã®ãã©ã¼ããã
åã®è¨äºã§ã¯ã大å¤é·ãã³ã¼ããæ¸ãã¦ããã£ã¨ããªã´ã³ã1æã ã表示ããããã¨ã«æåãã¾ããã次ã«ç®æãã¯ããã¯ããã¢ãã«ã®è¡¨ç¤ºã§ãã åã®è¨äºã¯ãã¡ãâ çWebGLå ¥é:åé³ãã¯ã®ç¾éº3Dã¢ãã«ã表示ãã(åç·¨) ã¢ãã«ãã¼ã¿ã®èªã¿è¾¼ã¿ã表示 ã¾ãã¯åã®è¨äºã§æºåã§ç¨æããããã¯ããã¢ãã«ã®ãã¼ã¿ãJavaScriptã§èªã¿è¾¼ã¿ã¾ããåã®æºåã§ã¯miku.objãmiku.mtlã®2ã¤ã®ãã¡ã¤ã«ãåºåããã¾ããããªãã¨ãªãçºããã°ãããããã«ãOBJãã¡ã¤ã«ã®æ¹ã¯é ç¹ãªã©ã®ãã¼ã¿ãMTLãã¡ã¤ã«ã®æ¹ãè²ãªã©ã®ãã¼ã¿ã¨ãªã£ã¦ãã¾ããã¾ããOBJãã¡ã¤ã«ã®ãã¼ã¿ãèªã¿è¾¼ãã§ããã®å 容ãåºåãã¦ã¿ã¾ãããã OBJãã¡ã¤ã«ã®ãã©ã¼ããã OBJãã¡ã¤ã«ã®ãã©ã¼ãããã¯ããããã§å°ã調ã¹ãã°ãã¡ãã®ãµã¤ãçã§è©³ãã説æããã¦ãã¾ãããåºæ¬çã«ã¯é ç¹ãã¼ã¿ããã¯ã¹ãã£ãã¼ã¿ãæ³ç·ãã¼ã¿ãããªã´ã³å®
Special Thanks to @hagat and @teehah for reviewing my articles! è¿å¹´ãWebGLã«æµè¡ã®å ããåºã¦ãã¾ãããWebGLã¨ã¯ããã©ã¦ã¶ã«ä½ããã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ãããã¨ãªããJavaScriptããGPUã使ç¨ãã3Dã®è¡¨ç¤ºãå¯è½ã¨ããæè¡ã§ãããã©ã°ã¤ã³ã®ã¤ã³ã¹ãã¼ã«ãå¿ è¦ãªãã¨ã¯ããä»ã¾ã§ã¯å¯¾å¿ãã©ã¦ã¶ãå°ãªããã¾ãå®ç¨çã§ã¯ããã¾ããã§ããããå æ¥ã®iOS8ã§æ£å¼ã«å¯¾å¿ããããã¨ã§ã¢ãã¤ã«ãã©ã¦ã¶ã«ããã¦å¯¾å¿çãè·³ãä¸ãããã¹ãã¼ããã©ã³ã«ããã¦ãã©ã¦ã¶ãã¼ã¹ã§3Dã®ã²ã¼ã çãä½ããå¯è½æ§ãæ¥æ¿ã«é«ã¾ãã¾ããã ä»åWebGL Advent Calendarã®ä¸ç°ã¨ãã¦ãçWebGLã§3Dã®ãªãã¸ã§ã¯ãã表示ããã¨ããã¾ã§ææ¦ãã¦ã¿ã¾ããWebGLã«ã¯three.jsãå§ãã¨ãã¦æç¨ãªã©ã¤ãã©ãªãããããããã大æµã®å ´
ãã®ææ¸ã¯ WebGL ã使ã£ãã³ã³ãã³ãã®åä¸ã®ããã® Tips ã«ã¤ãã¦æ¸ãã¾ãããããã®ææ¡ã«å¾ããã¨ã§ãå¤ãã®æ©å¨ã¸ã®äºææ§ãé«ããããããã©ã¼ãã³ã¹ãä¸ãããã¨ã«ããªãã¾ãã WebGL ã®ã¨ã©ã¼ãåºããªãããã«æ³¨æãã¾ããããã¨ã©ã¼ã¯ getError() ã§å¾ããã¾ãããFirefox ã§ã¯ webgl.verbose ã®è¨å®ãæå¹ã«ãããã¨ã§ãã¦ã§ãã³ã³ã½ã¼ã«ã« WebGL ã®ã¨ã©ã¼ã¨è¦åãåºåãã¾ããã¦ã¼ã¶ã¼ã®ã³ã³ã½ã¼ã«ã«ã¨ã©ã¼ãåãåºãå¿ è¦ã¯ãªãã§ãããï¼ï¼è¨³è¨»ï¼ããã©ã¼ãã³ã¹ã®çç±ããããä¸åç §ï¼ #ifdef GL_ES ã¯çµ¶å¯¾ã«ä½¿ã£ã¦ã¯ããã¾ãããåæã®ä¾ã§ã¯ããã使ããã¦ãã¾ããããWebGL ã§ã¯å¿ ã true ã«ãªãã®ã§å¿ è¦ããã¾ããã ãã©ã°ã¡ã³ãã·ã§ã¼ã㧠highp 精度ã使ãã®ã¯ããã¾ããããmediump ã代ããã«ä½¿ãã¾ããããhighp ã使ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}