xfcRSã¯å€æ©èœé«éã¢ã«ãŽãªãºã ã§ãã¹ã ãŒãºãã©ã³ãžã·ã§ã³ã䜿çšããã¿ã€ã«ã¬ã³ããªã³ã°çš/çå€é¢ã®æ§ç¯çš/ã©ã¹ã¿ãŒå ã®ãšããžã®éžæçš/ãã¯ã»ã«ã·ã§ãŒããŒãšããŠã®åŸåŠççš-ãã¯ã»ã«ã¢ãŒãã¹ã±ãŒãªã³ã°8x8ïŒãã©ã³ãã®é«éã©ã¹ã¿ãŒåã«ã¯ãå€æŽãªãã®ã¢ããã¹ã±ãŒã«ã®ããã®ä»ã®çŽ æã¯æšå¥šãããŸããïŒ ã é åèªã®ãã³ãŒã-ãeXpansion Fast Cell-Rounded Squaresã
ãã®èšäºã§ã¯ãäž»ã«ã¹ã ãŒãžã³ã°ã¿ã€ã«ã®ã¬ã³ããªã³ã°ã®ã³ã³ããã¹ãã§æ€èšããŸãã
å©çšèŠçŽã«ã€ããŠã質åãããå Žåã¯ããã¡ãã§ã確èªãã ãã
ã·ãœãŒã©ã¹ïŒ
-ã¬ã³ããªã³ã°-ç»é¢äžã«ãã¬ãŒã ãäœæããããã»ã¹ã ãããè¡ãã¢ã«ãŽãªãºã ãããããã¬ã³ããªã³ã°ããŸãã
-ã©ã¹ã¿ãŒ-ã¹ã¯ãªãŒã³ãã€ã³ãã®é åãŸãã¯ãã¯ã¹ãã£ã€ã¡ãŒãžãã¡ã€ã«ã ã©ã¹ã¿ã©ã€ãºã¯ãããã€ãã®å ¥åããŒã¿ãããã®ãã€ã³ãã®é åãæ§ç¯ããããã»ã¹ã§ãã
-ã¢ããã¹ã±ãŒã«-ããã¯ããã»ã¹ãšãããå®è£ ããã¢ã«ãŽãªãºã ã®ååã§ãããç¹ã«ãµã€ãºã倧ãããªãæ¹åã«ã°ã©ãã£ãã¯ãæ¡å€§ããããã«èšèšãããŠããŸãã ãããã®äž»ãªçŠç¹ã¯ãé床ã®ç²ç¶æ§ããŒãããªã©ã®ç»åæªã¿ã®æªåœ±é¿ã®åºçŸãšã®æŠãã§ãã
-Pixelart-ã©ã¹ã¿ãŒã°ã©ãã£ãã¯ã¹ãé·å¹Žã®ãªãªãŒã¹ã®ãããããç¹å¥ã«ã¬ããã³ã³ãã¥ãŒã¿ãŒãæš¡å£ããŠãããã©ã¹ã¿ãŒã®å€§ããªè§£å床ãæ±ããŠæŠã£ãŠããŸããã
-åŸåŠç-äžè¬çãªå Žåãæäœã«å è¡ããä»ã®ã¢ã«ãŽãªãºã ã®åŸã«æ©èœããã¢ã«ãŽãªãºã ïŒãã®å ŽåãååŠçãšåŒã°ããå ŽåããããŸãïŒã
-ã·ã§ãŒããŒ-äžè¬çãªå Žåããããªã«ãŒãã®ããŒããŠã§ã¢å®è¡çšã«å®è£ ãããåŸåŠçã¢ã«ãŽãªãºã ã
-ã¿ã€ã«ã¯ã空éã®ããŒãã£ã·ã§ã³ã®èŠçŽ ãç¹ã«ã¿ã€ã«ã»ããã®ãã¯ã¹ãã£ã§ãã
-ã¿ã€ã«ã»ãã-ã¢ã«ãŽãªãºã ã«å¿ èŠãªã»ããã®ãã¹ãŠã®ã¿ã€ã«ã1ã€ã®ç»åã«çµã¿ç«ãŠãŸãã
-ããã©ã³ãžã·ã§ã³ã¿ã€ã«ã-ããã§ã¯ããæ¡æ£åããæ§æãã16åã®1ã®ã¿ã€ã«ã§ã2ã€ã®ãã¯ã¹ãã£ãã¹ã ãŒãºã«å¥ã®ãã¯ã¹ãã£ã«ç§»è¡ããŸãã åé ã®ããããã«4åã®1ãéžæããŠçµã¿åãããããšã«ãããçµæã®ç»åãã·ãŒã ã¬ã¹ã«è¿œå ããããã«å¿ èŠãªãã¹ãŠã®ãªãã·ã§ã³ãäœæã§ããŸãã
-Sablet-ããã§ã¯ãã»ã«ã®ååã®äžã®ãããããæ瀺ããããã®ã¢ã«ãŽãªãºã ã¯å®äºããŠããŸãã ããããããã®ã»ã«ã®ãã¯ã¹ãã£ã®äžéšã
-Marshing Squares-äºæ¬¡å ã¹ã«ã©ãŒå Žã§èŒªéãçæããã¢ã«ãŽãªãºã ã en.wikipedia.org/wiki/Marching_squaresãåç §ããŠãã ãã
-茪é-æ£ç¢ºãªäœçœ®ã®è¿äŒŒåå°ã«åœ¹ç«ã€åŸæ¥ã®ã©ã€ã³ã
-è¿äŒŒ-æ£ç¢ºãªäœãã®è¿äŒŒå€ã
-ã©ã¹ã¿ãŒ-ã¹ã¯ãªãŒã³ãã€ã³ãã®é åãŸãã¯ãã¯ã¹ãã£ã€ã¡ãŒãžãã¡ã€ã«ã ã©ã¹ã¿ã©ã€ãºã¯ãããã€ãã®å ¥åããŒã¿ãããã®ãã€ã³ãã®é åãæ§ç¯ããããã»ã¹ã§ãã
-ã¢ããã¹ã±ãŒã«-ããã¯ããã»ã¹ãšãããå®è£ ããã¢ã«ãŽãªãºã ã®ååã§ãããç¹ã«ãµã€ãºã倧ãããªãæ¹åã«ã°ã©ãã£ãã¯ãæ¡å€§ããããã«èšèšãããŠããŸãã ãããã®äž»ãªçŠç¹ã¯ãé床ã®ç²ç¶æ§ããŒãããªã©ã®ç»åæªã¿ã®æªåœ±é¿ã®åºçŸãšã®æŠãã§ãã
-Pixelart-ã©ã¹ã¿ãŒã°ã©ãã£ãã¯ã¹ãé·å¹Žã®ãªãªãŒã¹ã®ãããããç¹å¥ã«ã¬ããã³ã³ãã¥ãŒã¿ãŒãæš¡å£ããŠãããã©ã¹ã¿ãŒã®å€§ããªè§£å床ãæ±ããŠæŠã£ãŠããŸããã
-åŸåŠç-äžè¬çãªå Žåãæäœã«å è¡ããä»ã®ã¢ã«ãŽãªãºã ã®åŸã«æ©èœããã¢ã«ãŽãªãºã ïŒãã®å ŽåãååŠçãšåŒã°ããå ŽåããããŸãïŒã
-ã·ã§ãŒããŒ-äžè¬çãªå Žåããããªã«ãŒãã®ããŒããŠã§ã¢å®è¡çšã«å®è£ ãããåŸåŠçã¢ã«ãŽãªãºã ã
-ã¿ã€ã«ã¯ã空éã®ããŒãã£ã·ã§ã³ã®èŠçŽ ãç¹ã«ã¿ã€ã«ã»ããã®ãã¯ã¹ãã£ã§ãã
-ã¿ã€ã«ã»ãã-ã¢ã«ãŽãªãºã ã«å¿ èŠãªã»ããã®ãã¹ãŠã®ã¿ã€ã«ã1ã€ã®ç»åã«çµã¿ç«ãŠãŸãã
-ããã©ã³ãžã·ã§ã³ã¿ã€ã«ã-ããã§ã¯ããæ¡æ£åããæ§æãã16åã®1ã®ã¿ã€ã«ã§ã2ã€ã®ãã¯ã¹ãã£ãã¹ã ãŒãºã«å¥ã®ãã¯ã¹ãã£ã«ç§»è¡ããŸãã åé ã®ããããã«4åã®1ãéžæããŠçµã¿åãããããšã«ãããçµæã®ç»åãã·ãŒã ã¬ã¹ã«è¿œå ããããã«å¿ èŠãªãã¹ãŠã®ãªãã·ã§ã³ãäœæã§ããŸãã
-Sablet-ããã§ã¯ãã»ã«ã®ååã®äžã®ãããããæ瀺ããããã®ã¢ã«ãŽãªãºã ã¯å®äºããŠããŸãã ããããããã®ã»ã«ã®ãã¯ã¹ãã£ã®äžéšã
-Marshing Squares-äºæ¬¡å ã¹ã«ã©ãŒå Žã§èŒªéãçæããã¢ã«ãŽãªãºã ã en.wikipedia.org/wiki/Marching_squaresãåç §ããŠãã ãã
-茪é-æ£ç¢ºãªäœçœ®ã®è¿äŒŒåå°ã«åœ¹ç«ã€åŸæ¥ã®ã©ã€ã³ã
-è¿äŒŒ-æ£ç¢ºãªäœãã®è¿äŒŒå€ã
å ãèŠæ®ããŠãããã«èšããŸããããã¯æ¹è¯ãããããŒã·ã³ã°ã¹ã¯ãšã¢ã§ã¯ãªãã
æè¡ã...
ã¿ã€ã«ã®16ã®ããªã¢ã³ããžã®å
èš³ã¯äŒŒãŠããŸãããããã¯å€éšã®é¡äŒŒç¹ã«éãããã¢ã«ãŽãªãºã ã¯ãŒãããéçºãããŠããŸãã æ·±ãèŠããšã16ååæã䜿çšããã移è¡ã®ã¿ã«äœ¿çšãããŸãã å®å
šã«å¡ãã€ã¶ãããã¿ã€ã«ãŸãã¯å®å
šã«ç©ºã®ã¿ã€ã«ã«ã¯ãå¥ã®ãã«ãµã€ãºã®ã¿ã€ã«ã䜿çšãããŸãã
Marshing Squaresã®çå€é¢ã¯ãç·ã®äœçœ®ãå¯èœãªéãè¿äŒŒããå ã®ã»ã«ã®ããªã¥ãŒã ãèŠèŠçã«ããŸãå€åãããªãããã«ããŸããããã®ã¢ã«ãŽãªãºã ã¯ãRounded Squaresãšããååã®ç±æ¥ã§ããç·ã®æå°æ²çãå¢å ãããããšããŸãã
Marshing Squaresãšåãæ°ã®ãã§ãã¯ã䜿çšãããšãå¿ èŠãªå ¥åã¿ã€ã«ã»ãããå°ãããªãïŒãããã£ãŠã¢ãŒãã£ã¹ãã®äœæ¥ãå°ãªããªããŸãïŒãææªã®å Žåã¯4åã®1ã®åºåã®ããã«æ倧ã§4åé ããªããŸãïŒå®éã«ã¯ãã»ã«ããããžã®è€éããšæç»æ©èœã®å®è£ ã«äŸåããŸãïŒã¿ã€ã«ãã»ãšãã©éãã¯ãããŸããïŒã
ããããžçã«ã¯ãã¢ã«ãŽãªãºã ã¯äºãã«45床å転ããåãã©ã€ã³ã䜿çšããŸãããMarsing Squaresã®ããã«0ããã§ã¯ãªãã22.5床ãã延æãå§ããŸãïŒããã«ãããæ°Žå¹³ããã³æãã®äž¡æ¹ã®åå°ã§äºãã«å¯Ÿç§°ã«ãªããã¡ããã©2ãã16åã®4ã®ãã¹ãŠã®ãã©ã³ãžã·ã§ã³ãååŸããã«ã¯ããããããŠã³ãŸãã¯éæåã®ã¹ãã©ã€ããããå Žåãã¢ãŒãã£ã¹ãã®äœæ¥éãå°ãªããªããŸããïŒã¹ã ãŒãºãªãã©ã³ãžã·ã§ã³ïŒãã¯ã¹ãã£æ¡æ£ïŒããå¿ èŠãªãå Žåã§ããã»ã«ãäžžããã ãã§ååã§ããã¢ãŒãã£ã¹ããæžããããšãã§ããŸã ïŒèªåçã«avtokompilyatsiyaãåæ§ç¯ããŸãïŒ - ãæŸç©ç·ã®äœåååæã¿ã€ã«ãæç»ãããã¿ã¹ã¯ãŸã§ã
æ瀺ãããäŸã§ã¯ã8蟺ã®å®å šãªå¯Ÿç§°æ§ã®ããã«ãåé 眮ã«ãã£ãŠã®ã¿é·ç§»ãã¯ã¹ãã£ã¿ã€ã«ã®åãè£è¿ãã«ãªã£ãŠããŸãã
Marshing Squaresã®çå€é¢ã¯ãç·ã®äœçœ®ãå¯èœãªéãè¿äŒŒããå ã®ã»ã«ã®ããªã¥ãŒã ãèŠèŠçã«ããŸãå€åãããªãããã«ããŸããããã®ã¢ã«ãŽãªãºã ã¯ãRounded Squaresãšããååã®ç±æ¥ã§ããç·ã®æå°æ²çãå¢å ãããããšããŸãã
Marshing Squaresãšåãæ°ã®ãã§ãã¯ã䜿çšãããšãå¿ èŠãªå ¥åã¿ã€ã«ã»ãããå°ãããªãïŒãããã£ãŠã¢ãŒãã£ã¹ãã®äœæ¥ãå°ãªããªããŸãïŒãææªã®å Žåã¯4åã®1ã®åºåã®ããã«æ倧ã§4åé ããªããŸãïŒå®éã«ã¯ãã»ã«ããããžã®è€éããšæç»æ©èœã®å®è£ ã«äŸåããŸãïŒã¿ã€ã«ãã»ãšãã©éãã¯ãããŸããïŒã
ããããžçã«ã¯ãã¢ã«ãŽãªãºã ã¯äºãã«45床å転ããåãã©ã€ã³ã䜿çšããŸãããMarsing Squaresã®ããã«0ããã§ã¯ãªãã22.5床ãã延æãå§ããŸãïŒããã«ãããæ°Žå¹³ããã³æãã®äž¡æ¹ã®åå°ã§äºãã«å¯Ÿç§°ã«ãªããã¡ããã©2ãã16åã®4ã®ãã¹ãŠã®ãã©ã³ãžã·ã§ã³ãååŸããã«ã¯ããããããŠã³ãŸãã¯éæåã®ã¹ãã©ã€ããããå Žåãã¢ãŒãã£ã¹ãã®äœæ¥éãå°ãªããªããŸããïŒã¹ã ãŒãºãªãã©ã³ãžã·ã§ã³ïŒãã¯ã¹ãã£æ¡æ£ïŒããå¿ èŠãªãå Žåã§ããã»ã«ãäžžããã ãã§ååã§ããã¢ãŒãã£ã¹ããæžããããšãã§ããŸã ïŒèªåçã«avtokompilyatsiyaãåæ§ç¯ããŸãïŒ - ãæŸç©ç·ã®äœåååæã¿ã€ã«ãæç»ãããã¿ã¹ã¯ãŸã§ã
æ瀺ãããäŸã§ã¯ã8蟺ã®å®å šãªå¯Ÿç§°æ§ã®ããã«ãåé 眮ã«ãã£ãŠã®ã¿é·ç§»ãã¯ã¹ãã£ã¿ã€ã«ã®åãè£è¿ãã«ãªã£ãŠããŸãã
éåžžã«ã·ã³ãã«ãªã¿ã€ã«ã¹ã ãŒãžã³ã°ã¹ããŒã ã䜿çšãããŸãã ããã¯ããæ¡æ£åãã«ãã£ãŠå®çŸãããŸãããã®éšåã¯ãåäžã§ã¯ãªãã»ã«ã®ãžã£ã³ã¯ã·ã§ã³ããŸãã¯ã»ã«ãšç©ºã®ã»ã«ã®ãžã£ã³ã¯ã·ã§ã³ã«éããããŸãã ãæ¡æ£åãã¯ããã¹ãŠã®ã¿ã€ãã®ã»ã«ã«å¯ŸããŠæç»ããããã¯ã¹ãã£ã«ç©ºã®ã»ã«ãžã®ã¹ã ãŒãºãªç§»è¡ãåæ ããå¿ èŠããããŸãã
ã€ãŸãããã¹ãŠã®ãã¯ã¹ãã£ã¯ã空ã®ã»ã«ã®ãã¯ã¹ãã£ãä»ããŠçžäºã«åãæž¡ããŸãã ããã«ãããã¢ãŒãã£ã¹ãã®äœæ¥ãå¯èœãªéãé«éåãããŸãïŒ
ã¿ã€ã«ãšã³ãžã³ã®å Žåããããæšæºã§ããããšã«æ³šæããŠãã ããïŒ
誰ã«ãšã£ãŠãåãã§ããåãäžè¬çãªãã¯ã¹ãã£ãŒã«å¯Ÿãããã®ãããªå¶éãæ°ã«å
¥ããªãå Žåã¯ãæ¥ãã§å€æããªãã§ãã ããã äºå®ã¯ãããã¹ãŠã«ãã¹ãŠãã®çŽæ¥çãªç§»è¡ããµããŒããããããäºæ¬¡äŸåé¢ä¿ãç¯ããŠãããããã¿ã€ã«ã»ããã¯ä¹ç®ããŒãã«ã®ããã«æé·ããŸãïŒåŸç¶ã®åè¿œå ã«ã¯ãé¢ä¿ãçµåããããã®ããå€ãã®äœæ¥ãå¿
èŠã§ã-ãä»ã®ãã¹ãŠã®ã¿ã€ã«ãïŒã 人çãªãœãŒã¹ã§ãåé¡ã解決ããå Žåãå°ãªããšããœãããŠã§ã¢ã¬ãã«ã§ã¯ãå æã¡ã¢ãªïŒã¿ã€ã«ã»ããã®ãµã€ãºïŒãšããŒã¿è»¢éã®ãµã€ãºïŒãã©ãŠã¶ãŒã®å ŽåïŒãããŒãããããé床ãããŒãããŸãïŒæ¡æ£ãåçã«ã«ãŠã³ããããå ŽåïŒ;
-å€æ§æ§ãããããå¥ã®æ¹æ³ã¯ããã®ã¢ã«ãŽãªãºã ãå€ãã®äžè¬çãªãã¯ã¹ãã£ã®ã±ãŒã¹ã«é©åãããããšã§ãã äžè¬çãªå Žåãåã¿ã€ãã®ãµãŒãã§ã¹ã¯ãã°ã«ãŒãå ã®ä»ã®ã¿ã€ãã§ïŒå ±éã®ãã¯ã¹ãã£ãä»ããŠïŒ1åã ãæ§æã§ããŸãïŒã€ãŸããã¿ã€ãã®ãã¢ãäžè¬çãªãã¯ã¹ãã£ãäžæã«æ±ºå®ããå¿ èŠããããŸãïŒã ç¹æ®ãªã±ãŒã¹ã¯ãã¯ã¹ãã£ãµã€ã¯ã«ã§ãã ãããŠãå ±éã®ABã«å ¥ããããã«Bãå ¥ããå ±éã®BSã«å ¥ããC ...ãå ¥ããŸããïŒå¿ èŠãªå ŽåãåŸè ã¯æåã®ãµã€ã¯ã«ã«å ¥ããŸãïŒã
-ãŸããæ°ããã¬ãã«ã«ç§»åããå Žåã«ã®ã¿ããã¹ãŠã«å ±éãã移è¡ãã¯ã¹ãã£ã«å€æ§æ§ãå°å ¥ããããã®åªãããªãã·ã§ã³ã§ãã ãã®ãããããŒãæã«äžåºŠãã£ãã·ã¥ãããŸãã ïŒç§ã®æèŠã§ã¯ãããã¯ãã®ã¢ã«ãŽãªãºã ãé©çšããŠåçŽãª2Dã²ãŒã ãäœæããæãå¹æçãªæ¹æ³ã§ãïŒã
-å€æ§æ§ãããããå¥ã®æ¹æ³ã¯ããã®ã¢ã«ãŽãªãºã ãå€ãã®äžè¬çãªãã¯ã¹ãã£ã®ã±ãŒã¹ã«é©åãããããšã§ãã äžè¬çãªå Žåãåã¿ã€ãã®ãµãŒãã§ã¹ã¯ãã°ã«ãŒãå ã®ä»ã®ã¿ã€ãã§ïŒå ±éã®ãã¯ã¹ãã£ãä»ããŠïŒ1åã ãæ§æã§ããŸãïŒã€ãŸããã¿ã€ãã®ãã¢ãäžè¬çãªãã¯ã¹ãã£ãäžæã«æ±ºå®ããå¿ èŠããããŸãïŒã ç¹æ®ãªã±ãŒã¹ã¯ãã¯ã¹ãã£ãµã€ã¯ã«ã§ãã ãããŠãå ±éã®ABã«å ¥ããããã«Bãå ¥ããå ±éã®BSã«å ¥ããC ...ãå ¥ããŸããïŒå¿ èŠãªå ŽåãåŸè ã¯æåã®ãµã€ã¯ã«ã«å ¥ããŸãïŒã
-ãŸããæ°ããã¬ãã«ã«ç§»åããå Žåã«ã®ã¿ããã¹ãŠã«å ±éãã移è¡ãã¯ã¹ãã£ã«å€æ§æ§ãå°å ¥ããããã®åªãããªãã·ã§ã³ã§ãã ãã®ãããããŒãæã«äžåºŠãã£ãã·ã¥ãããŸãã ïŒç§ã®æèŠã§ã¯ãããã¯ãã®ã¢ã«ãŽãªãºã ãé©çšããŠåçŽãª2Dã²ãŒã ãäœæããæãå¹æçãªæ¹æ³ã§ãïŒã
ã¢ã«ãŽãªãºã ã¯ã»ã«ã2x2ã¯ã©ãŒã¿ãŒã«åå²ããåã»ã«ã¯æºåãããã»ããããããå°ããªæ¹åã®ã¿ã€ã«ã§å¡ãã€ã¶ãããŸãã ããããããã¯çµæã§ãã å®éãxfcRSã¯åŸåŠçã¢ã«ãŽãªãºã ã§ãã ãããŠããã¥ãŒã¢ã¯å€éšã®è¿œå ã§ãã XfcRSèªäœã¯ãã»ã«ããããããŸããŸãªæ¹æ³ã§äœ¿çšã§ããã€ã³ããã¯ã¹ããŒãã«ã«æããããã ãã§ãã ãã®ããŒãã«ãšã¯äœã§ãããã©ã®ããã«æ§ç¯ãããã©ã®ããã«äœ¿çšãããŸããïŒ
ãã®èšäºã§ã¯ãåçŽãªãã¹ãã¬ã³ããªã³ã°ã®äŸã瀺ããŸãã ããã¹ããã¬ã³ããªã³ã°ãšã¯ããã¥ãŒå ã®æ¬¡ã®ãã¹ã§ããããããå šäœããŒããã衚瀺ããã®ã§ã¯ãªããå¿ èŠãªå Žæã«è¿œå ã®ãµãã¿ã€ã«ã®ã¿ãæç»ããããšãæå³ããŸãã
æ¥ããã«ã説æãããé ã«èª¬æãå§ããŸãã
1.é·ç§»ãã¯ã¹ãã£
ãããããžããèŠããšãé£æ¥ããã»ã«ã«å¿ããŠã»ã«ãæ§æã§ããã¿ã€ã«ã16åãããŸãã
æãåçŽãªç¶æ³ïŒãã¹ãŠã®é£äººãçããïŒã»ã«ããšããžããŒã¹ã§æ§æãããŠããïŒããšã¯ãé¡æšã«ãã£ãŠèŠããããšãã§ããŸã-ããŒã¹ãé£äººã«ãã£ã€ãããš
ïŒãããå€æŽããåæç¶æ ãšããŸãïŒã
é£äººãçãããªãå Žåã圌ã¯èªåã®äžéšã2ã€ã®äœçœ®ã«ããã·ã¥ããŸãã
ãã¹ãŠã®é£äººããã§ãã¯ãããã¿ã€ã«ã®ãã¹ãŠã®ããŒã¹ãããã«å¿ããŠæŒãåºããããšããããã®4ã€ã®ããŒã¹ã§ã»ã«ã衚瀺ã§ããŸãã
ïŒå¹çã®ããã«ãããšãã°ã»ã«ãå®å šã«å®å šã§ãããå®å šã«ç©ºã§ããããªã©ãåžå£²æ¡ä»¶ã確èªã§ããŸãïŒã
æåã«èããªããã°ãªããªãã®ã¯ãã¹ã ãŒãžã³ã°ã¿ã€ã«ã®åé¡ã®å®åŒåãã©ã®ããã«éžæãããã§ããããã«ãããå®è£ ã容æã«ãªããŸããã質çã«å€§ããªéãã¯ãããŸããã
éåžžã®ã»ã«ãèŠèŠçã«ãå¹³æ»åãããããšã«ãããäžéšã®ã»ã«ãä»ã®ã»ã«ã«ã¯ããŒã«ãããããšã¯æããã§ãã ãããããã¹ãŠã®ãã¯ãªãŒããã人件費ã®ç¹ã§åæ§ã«æå°éã§ããããã§ã¯ãããŸããã
ã»ã«ã2ã€ã®æ¹æ³ã§äžžããããšãã§ããŸã-å ±éã®ãã¯ã¹ãã£ããã®äžã«ã¯ããŒã«ããæ¹æ³ããŸãã¯ãã®é-ã»ã«ãå ã®å¢çãè¶ããŠåŒã£åŒµãæ¹æ³ã 2ã€ã®ãªãã·ã§ã³ã¯ãèŠèŠçã«ã¯ã»ãšãã©æå³ããããŸããã ç§ãã¡ã¯1ã€ãéžæããŸã-èŠç¥ãã¬äººãšäŒããšãããŸãã¯ãã¯ã¹ãã£ãŒããŒãã®ãšãã®ã»ã«ã®çãŸãã®ã¿ã ããã¯ã察è§ã»ã«ãšã®çžäºäœçšãé€å€ããããšãæå³ããŸããããã¯ããããªãæé©åã«ã圹ç«ã¡ãŸãã
ãã®å Žåãé·ç§»ã³ã³ã¿ãŒã¯çæ³çãªåã«æãè¿ããªãããã«ããã®ãæé©ã§ãïŒãã ããããã¯å¶éã§ã¯ãããŸããããããã«è¿ãã»ã©æ»ããã«äžžããããŸãïŒã ã»ã«ã®åšãã®çæ³çãªåã¯æ£ç¢ºã«èšè¿°ãããŸã-è§ãééããŸãïŒããã¯ã¹ã ãŒãºãªé·ç§»ã®å¶éã§ãïŒã 察称æ§ãéèŠã§ããããã¯ãã€ã©ãžã¢ã«ã§ãªããã°ãªããŸããã ããã«ãããèãé åã®æ²ãããæ»ããã«ã§ããŸãã é·ç§»ãã¯ã¹ãã£ãåäžã§ãªãå Žå-ããŒã©ã¹ãæç»ããŸãïŒå ã®ãã¯ã¹ãã£ã®å³ãåç §ããŠãã ããããã³ãã¬ãŒããšããŠäœ¿çšã§ããŸãããã®ã¹ããŒãã¡ã³ãã¯ãã¯ãªãšã€ãã£ãã³ã¢ã³ãºã©ã€ã»ã³ã¹ãšèŠãªãããšãã§ããŸãïŒã
åçã§ïŒ
é»ãã°ãªããã¯å ã®ã»ã«ã瀺ããŠããŸãã è¿åããªãããã«å¹³æ»åãèšç®ã§ããªããšããžé åã¯åœ±ä»ãã§ãã ã€ãŸã çµæã®ã¡ãã·ã¥ã®å¹ ãšé«ãã¯ãã»ã«ã«ãã£ãŠçž®å°ãããŸãã æ®ãã®çœãã°ãªããã¯ãã»ã«ã®ååã®ã€ã³ãã³ãã§é 眮ãããŸã-çµæã®ãµãã»ã«ã€ã³ããã¯ã¹ãããã«æžã蟌ãŸããŸãã
é·ç§»ã®å ã®ãã¯ã¹ãã£ãå·Šäžé ã«è¿œå ãããããããæ瀺ãããå³ã®ãã¹ãŠã®æ²ããåéãããŸãã
æ²ç·ãè©ŠããŠã¿ããå Žåã¯ãå·Šã®ããã¯ã¹ãã£ã®æ¡æ£ãŸãŒã³ã®ããããžãŒãã®åçãèŠãŠãã ããã çœãç·ã¯è«ççãªèŒªéã瀺ããŠããŸãã ãã®äž¡åŽã®é»ãç·ã¯ã蚱容ããããªãã»ããç¯å²ã§ãïŒãã®å Žåãã¿ã€ã«æ¥ç¶ã®é·ç§»ãã€ã³ãã¯ãå·Šããå³ãäžããäžã®ãã¢ã§ãäžå¿ããçè·é¢ã«ããå¿ èŠããããŸãïŒã ããšãã°ãæ¥åãæç»ããŠã¢ã€ãœã¡å¹æãåŸãããšãã§ããŸãïŒã«ã¡ã©ãã¥ãŒã®åŸæïŒã
2. 2ã€ã®ãã§ãã¯-4ã€ã®ã»ã«
çŽ æŽãªã¢ãããŒãã¯ã2ã€ã®é£æ¥ã»ã«ã®çŸåšã®ã»ã«ãšã®åçæ§ããã§ãã¯ããŠããã¹ãŠã®ãµãã»ã«ããã€ãã¹ããããšã§ãã ãã®å Žåãæ€èšŒçµæã¯ãæ¯åãããã¯ã¹ãã£ãŒã®åº§æšã®äžå¿ãžã®ã·ããã§ãïŒå³ãåç §ïŒã æåã¯ããã¹ãŠã®ååã®äžããã¯ã¹ãã£ã®ã³ãŒããŒããŒã¹ãšããŠåãå ¥ããããæ¥ç¶ããããšéãåã圢æããŸãïŒãã¹ãŠã®åŽé¢ã«éãé£äººïŒã åçŽæ¹åã®è¿åãšã®äžçåŒã¯ãéžæãããã¯ã¹ãã£ãŒéšåãåçŽæ¹åã«äžå€®ã«ã·ããããŸãïŒ2ã€ã®äœçœ®ãå察ã®åçŽè§ã®åŸã«éžæãããŸãïŒã ãã§ãã¯åŸã«äœã移åããŠããªãå ŽåïŒéãåå šäœãæ®ã£ãŠããïŒã¯äŸå€ãšããŠæ±ãããšãæãŸãããã»ã«å šäœãååã®äžã§ã¯ãªãäžåºŠã«è¡šç€ºããå¿ èŠããããŸãã
ããã§ãçŽ æŽãªæ¹æ³ã¯çµäºããŸãã
ïŒããã«ã³ãŒãã§ã¯ãã¿ã€ã«ã®åæäœçœ®ã¯0xfc30ã®å®æ°ã«ãªããŸããæ°Žå¹³/åçŽã·ããã¯ãé åã®å¿ èŠãªã»ã«ã®å¯Ÿå¿ããHEXãããã§æ©èœããŸãïŒ
2ã€ã®ã»ã«ã®ç䟡æ§ã®æ€èšŒã¯ãå®éã«ã¯åžžã«4ã€ã®ãµãã»ã«ã«åœ±é¿ãã2ã€ã¯ãããã8ã€ã®ãµãã»ã«ãæã£ãŠããããšã«æ³šæããããšãéèŠã§ãïŒ ïŒé¡ã®ã¡ãœããããïŒãã®8åã®ã¢ã¯ã»ã©ã¬ãŒã·ã§ã³ãååŸããŠãäžæ¬åŠçããŸãã å³ãåç §
ãããã¢ã«ãŽãªãºã ã®ã³ã¢ã§ãïŒJSã®äŸïŒïŒ
function XFCR(map, w, h){ // "eXpansion Fast Cell - Rounded Squares" for(var xfc = [], n = 0, C = map[n - 1], D; n < w * h; xfc[n++ - w - 1] ^= 0xfc30, C = D){ if(C ^ (D = map[n])) xfc[n - w - 1] |= 0x8800, xfc[n - 1] |= 0x0088; if(D ^ map[n â w]) xfc[n - w] |= 0x202, xfc[n - w - 1] |= 0x2020; } return xfc; }
ãããã£ãŠãåãµãã»ã«ã®ä»£ããã«ç®çã®ã»ã«ããã€ãã¹ããçµæã®é åã«å€æŽãå ããã ãã§ãã ãŸããè¿åã®æç¡ã®çµã¿åããã¯ã2ã€ã®ç¬ç«ããèŠå ãšããŠç¥èŠã§ããããšã«æ³šæããŠãã ããïŒäžéšã®è¿åã®ååšã¯xã«æ²¿ã£ãŠãã¯ã¹ãã£ãã·ããããå·ŠåŽã®è¿åã¯yã«æ²¿ã£ãŠãã¯ã¹ãã£ãã·ããããŸãïŒã ãŸããèŠå ã¯ç¬ç«ããŠãããããåæã«äŸåããå¿ èŠã¯ãªããéåæã«åŠçã§ããŸãã ã¡ãªã¿ã«ãxfcRSã¯äžè¬ã«å®å šã«äžŠååãããŠããŸãïŒ
èŠå ãèŠã€ãããšãã察å¿ããX /ã²ãŒã ãçµæã®é åã«é 眮ããŸãïŒããã¯ãã¹ãŠæ³šæãå¿ èŠã§ãããèŠããšãã€ã³ããã¯ã¹ãããã«éåžžã«äŸ¿å©ã«æ ŒçŽãããŠããŸãïŒã
ãªãå€ããããã³ã°ããã®ãã«ã€ããŠã®è§£èª¬
-ãã¡ã¢ãªã¯ä»ããã»ã©éèŠã§ã¯ãªããå Žåãããã«çããŸãããã®å Žåãã¡ã¢ãªå§çž®ã¯å éã«ã€ãªãããŸãã ã»ã«åºæã®åœä»€ã¯ãäžåºŠã«è€æ°ã®ã»ã«ãåŠçããŠåãåãããŸãã ãŸããã¬ã³ããªã³ã°æã«ãã»ã«ãååæããšã«åŠçããå¿
èŠæ§ããã°ããå€æããã«ã¯ã0xfc30ã§ã€ã³ããã¯ã¹ã®å€ãæ¯èŒããã ãã§ååã§ã-ãã®å®æ°ã¯ããã®ã»ã«ã®ç°å¢ãåäžã§ãããç Žæããã«ïŒãããã³ã°ãªãã§ã4ã€ã®ãµãã»ã«ãã¹ãŠãåå¥ã«ãã§ãã¯ããå¿
èŠãããïŒãã«ã¯ã§è¡šç€ºã§ããããšã瀺ããŸãïŒ;
-å®éãçµæã®ãã€ããªåœ¢åŒã«ã¯2åã®æ å ±ãå«ãŸããŠããŸãïŒãã ããåHEXãããã«ã¯ã¿ã€ã«ã®ã¬ãã£ãã£ã¹ãã¬ã€ã¹ã¡ã³ãã€ã³ããã¯ã¹ãæ ŒçŽãããŸããåæã«ã4ã»ã«ã®ã·ããã®åº§æšã2ãã€ãã«æ ŒçŽãããŸãïŒã éåžžã«å€§ããªããªã¥ãŒã ã§çªç¶å®è¡ããå¿ èŠãããå Žåããµãã»ã«ããšã«2ãããã®ã¿ãä¿åã§ããŸãã ãããžãã¯ãå®æ°0xfc30ãã¬ã³ããªã³ã°ããžãã¯ã«å ¥ãããµãã»ã«ã®äœçœ®ãèæ ®ããå¿ èŠããããŸããã4ã€ãã¹ãŠããã€ãå šäœãå æããŸãã ãããŠæ¥µç«¯ãªããªãã¯ã«è¡ããšãæ¡ä»¶ã®å€ã®ã¿ãä¿åããåãµãã»ã«ã«æ£ç¢ºã«ååã®ããããè²»ããããšãã§ããŸã=ïŒãåæã«ãxfcRSã¢ã«ãŽãªãºã ã®æ¬è³ªã¯æ¢ã«ãŒãã«å·»ãæ»ãããŸããããã®æ¬è³ªã¯äŸ¿å©ãªã€ã³ããã¯ã¹ããããæäŸããããšã§é£äººããã°ããæ¯èŒããããã§ãã ïŒã¡ãªã¿ã«ãããšãã°Cã§ã¯ãInt32ã§ããŒããŠã§ã¢ãæå¹ã«ããããšã«ããïŒãµãã»ã«ããšã«ïŒãã€ãã®é åãããã¯ããããšãã§ããŸããããã¯ãã¡ã¢ãªã«ãã£ãŠå€±ãããå¯èœæ§ãé«ããªããŸãããé床ãšå©äŸ¿æ§ã«ãã£ãŠåã¡ãŸãïŒã
-å®éãçµæã®ãã€ããªåœ¢åŒã«ã¯2åã®æ å ±ãå«ãŸããŠããŸãïŒãã ããåHEXãããã«ã¯ã¿ã€ã«ã®ã¬ãã£ãã£ã¹ãã¬ã€ã¹ã¡ã³ãã€ã³ããã¯ã¹ãæ ŒçŽãããŸããåæã«ã4ã»ã«ã®ã·ããã®åº§æšã2ãã€ãã«æ ŒçŽãããŸãïŒã éåžžã«å€§ããªããªã¥ãŒã ã§çªç¶å®è¡ããå¿ èŠãããå Žåããµãã»ã«ããšã«2ãããã®ã¿ãä¿åã§ããŸãã ãããžãã¯ãå®æ°0xfc30ãã¬ã³ããªã³ã°ããžãã¯ã«å ¥ãããµãã»ã«ã®äœçœ®ãèæ ®ããå¿ èŠããããŸããã4ã€ãã¹ãŠããã€ãå šäœãå æããŸãã ãããŠæ¥µç«¯ãªããªãã¯ã«è¡ããšãæ¡ä»¶ã®å€ã®ã¿ãä¿åããåãµãã»ã«ã«æ£ç¢ºã«ååã®ããããè²»ããããšãã§ããŸã=ïŒãåæã«ãxfcRSã¢ã«ãŽãªãºã ã®æ¬è³ªã¯æ¢ã«ãŒãã«å·»ãæ»ãããŸããããã®æ¬è³ªã¯äŸ¿å©ãªã€ã³ããã¯ã¹ããããæäŸããããšã§é£äººããã°ããæ¯èŒããããã§ãã ïŒã¡ãªã¿ã«ãããšãã°Cã§ã¯ãInt32ã§ããŒããŠã§ã¢ãæå¹ã«ããããšã«ããïŒãµãã»ã«ããšã«ïŒãã€ãã®é åãããã¯ããããšãã§ããŸããããã¯ãã¡ã¢ãªã«ãã£ãŠå€±ãããå¯èœæ§ãé«ããªããŸãããé床ãšå©äŸ¿æ§ã«ãã£ãŠåã¡ãŸãïŒã
-ïŒ éèŠïŒ åãçç±ã§ãxfcRSãçµæã®é åãè¿ããŸãŒã³ã¯ãã»ã«ã®ååïŒ1ã€ã®ãµãã»ã«ïŒã§çœ®ãæããããŸãã ãããŠããšããžã»ã«ãèšç®ããããšã¯äžå¯èœã§ãããšããäºå®ã¯äž»ãªãã®ã§ã¯ãããŸããã äž»ãªããšã¯ãã€ã³ããã¯ã¹ãã·ããïŒããã³ããã«å¿ããŠåã°ã«ãŒãåïŒããããšã§ãå®å šã«ããµãã2x2ãµãã»ã«ããã§ãã¯ããŠè¿ éã«èå¥ããã®ã«äŸ¿å©ãªãããã¯ãåŸãããããšã§ãã -äŸïŒç®çã®ã»ã«ã®2x2ãããã¯ãçä¿¡ãããã«ååšããå Žåããã®çµæã茪éã«æ²¿ã£ãŠã»ã«ã®ååã ãå¹³æ»åãããäžå€®ïŒã»ã«ã®åºã«ç§»åïŒã«1ã€ã®ã»ã«å šäœãååšããã€ã³ããã¯ã¹ããç°¡åã«æ±ºå®ã§ããŸãã 空ã®ã»ã«ã®å®çŸ©ã¯å¿ èŠãããŸããããã¹ã¹ã«ãŒã¢ã«ãŽãªãºã ã®å®çŸ©ã«ããã空ã®ã»ã«ã¯æ¢ã«æšæºã®ã¿ã€ã«ã¢ã«ãŽãªãºã ã§æç»ãããŠããããã§ãã äŸã®ã¬ã³ããªã³ã°ã³ãŒãã¯ãåã«ããããã¹ãããããŸãã
ãã¹ãã¬ã³ããªã³ã°ã®äŸïŒ
JSã«é¢ããŠã¯ãèæ¯ã«ç©ºã®ã»ã«ãã¿ãŒã³ãèšå®ãããã£ã³ãã¹ãžã®åºåããµãã»ã«ã«ç§»åããã ãã§ååã§ãã ããã«ãé©å¿åCSSã¹ã±ãŒãªã³ã°ãèšç®ããããšããå§ãããŸãã ãã®äŸã§ã¯ã320x192ã®ãã£ã³ãã¹ã100ïŒ ã§CSSã«åŒã䌞ã°ããŸãã
ããã§ã¯HTMLãæäŸããŸãããfuseã¯ãæ¡æ£ã¿ã€ã«ã»ãããåããIMG 16x16ã§ãã full-8x8ãã«ïŒéããã¯ã¹ãã£ïŒã»ã«ã habr-ãã¯ã»ã«ã¢ãŒãã®ç¢æããã¯ã»ã«ããšã«ããããããã«å€æãããŸãã ããã£ããŒãžã³ã¯0ã«ãªã»ããããããã£ã³ãã¹ã®èæ¯ã¯ã¿ã€ã«ã®ãã空ïŒããŒãžã¥ïŒã»ã«ã§ãã
function draw(map, w, h){// View: //(multipass - empty cell background pattern needed) var sub = XFCR(map, w, h); // Compute sub-tiles by XFCR algorithm for (var n = 0, y = 4, j = h; --j; y += 8, n++){ for (var x = 4, S, i = w; --i; x += 8, n++){ if((S = sub[n]) ^ 0xfc30){ //go sub-tiles 4x4 x4: if(map[n]) ctx.drawImage(fuse, S << 2 & 12, S & 12, 4, 4, x, y, 4, 4); if(map[n+1]) ctx.drawImage(fuse, S >> 2 & 12, S >> 4 & 12, 4, 4, x + 4, y, 4, 4); if(map[n+w]) ctx.drawImage(fuse, S >> 6 & 12, S >> 8 & 12, 4, 4, x, y + 4, 4, 4); if(map[n+w+1]) ctx.drawImage(fuse, S >> 10 & 12, S >> 12 & 12, 4, 4, x + 4, y + 4, 4, 4); }else if(map[n]) ctx.drawImage(full, x, y); //full sub-tile block 4x4 }; }; }
JSã«é¢ããŠã¯ãèæ¯ã«ç©ºã®ã»ã«ãã¿ãŒã³ãèšå®ãããã£ã³ãã¹ãžã®åºåããµãã»ã«ã«ç§»åããã ãã§ååã§ãã ããã«ãé©å¿åCSSã¹ã±ãŒãªã³ã°ãèšç®ããããšããå§ãããŸãã ãã®äŸã§ã¯ã320x192ã®ãã£ã³ãã¹ã100ïŒ ã§CSSã«åŒã䌞ã°ããŸãã
var ctx = cnv.getContext('2d'); ctx.drawImage(habr, 0, 0); //draw text var w = cnv.width >> 3, h = cnv.height >> 3, z = cnv.width / window.innerWidth, //calc dynamic scale - ratio map = ctx.getImageData(0, 0, w, h).data.filter( (x, i) => !(i & 3) ).map(x => x >> 7); //convert pixel data to map cnv.style.width = '100%'; cnv.style.backgroundSize = (8/z)+'px '+(8/z)+'px'; //dynamic scale - background pattern
ããã§ã¯HTMLãæäŸããŸãããfuseã¯ãæ¡æ£ã¿ã€ã«ã»ãããåããIMG 16x16ã§ãã full-8x8ãã«ïŒéããã¯ã¹ãã£ïŒã»ã«ã habr-ãã¯ã»ã«ã¢ãŒãã®ç¢æããã¯ã»ã«ããšã«ããããããã«å€æãããŸãã ããã£ããŒãžã³ã¯0ã«ãªã»ããããããã£ã³ãã¹ã®èæ¯ã¯ã¿ã€ã«ã®ãã空ïŒããŒãžã¥ïŒã»ã«ã§ãã
3.å®è£ ã«é¢ããã³ã¡ã³ã
å®å šãªãœãŒã¹ã³ãŒãã¯github.com/impfromliga/xfcRSãã芧ãã ãã
ãããå®è£ ãããšããè¿ãããæ¥ä»ã¯ãµãã»ã«ïŒå©çšå¯èœãªãµãã»ã«ã®éã§2x2ã«ã°ã«ãŒãåãããŠããïŒã®ãã®ã§ãããšèããããšãéèŠã§ããããã¯ãå¢çã»ã«ã®å€ãèšç®ããæ¹æ³ããªãããã§ãïŒååãªé£æ¥ã»ã«ããããŸããïŒ-è¿ããããã£ãŒã«ãã®ãµã€ãºã¯ãã»ã«ïŒåãšããžããã»ã«ã®ååïŒã ãå°ãããªããŸã
ã©ã®ããã«åŠçãããã¯ãxfcRSã§ã¯é¢ä¿ãããŸããã ãšããžã¯ãµãã»ã«ãªãã§è¡šç€ºã§ããŸããããããã«ã¹ã¯ããŒã«ãå«ãŸããå Žåãå°åœ¢ã¯ç»é¢ã®ãšããžã§èŠèŠçã«ãéããŸããïŒåœ±é¿ããè¿é£ã衚瀺ããããšãïŒã ãã®å Žåãåºåãå ã®ããŒã¿ããã»ã«ã®ååã ãããªãã³ã°ããããã»ã«ããšã«xfcRSã®å ¥åãäºåã«å¢ããããšããå§ãããŸãã
2x2ãµãã»ã«ã®ã°ã«ãŒãã¯ãããã°ãšã³ãã£ã¢ã³ã®é åºã§åäžã®å€ãã€ãŸãã»ã«å€ã«ããã¯ãããŸã
Ab
CD
-ãããåäœã§ãäœããé«ãŸã§ã®æ°åã§ãã ãããŠãã€ã³ããã¯ã¹å€=ïŒïŒD * 16 + CïŒ* 16 + BïŒ* 16 + A
ã ãã åã»ã«ã«1æ¡ã®16é²æ°ããããŸãïŒç®çã®ãŒããã¿ã€ã«ã®ã€ã³ããã¯ã¹ãå«ãŸããŠããŸãïŒã
4.æ¡åŒµæ©èœ/è¿œå æ©èœ
-ãªããªã äžè¬ã«ãxfcRSã¯ã¬ã³ããªã³ã°ã«ã€ããŠã¯äœãèšãããã€ã³ããã¯ã¹ä»ãã®å¢çããŒãã«ã®ã¿ãæäŸããŸãããã®ããŒãã«ã«è¿œå ããŒã¿ãè¿œå ããããšãã§ããŸããããã¯ã倧ããªåäžãªé åå
ã«ããã¹ããé
眮ããã®ã«åœ¹ç«ã¡ãŸãã å€éšããŒã¿ãœãŒã¹ããååŸãããããã®ãã¹ã¯ãåšå²ã®ã»ã«ãå€æŽãããŠããããã¯ãããŸããã ãŸããæåã¯ç©ºã®ã¹ããŒã¹ã«ãé
眮ããããŠããããããã¹ã衚瀺ãããªãããšãèå³æ·±ãã§ãã ãããŠããããèŠã€ããããã«ã¯ãå°éºŠç²ãç¹å¥ã«æ¯ããããå¿
èŠããããŸãïŒç°ãã²ãŒã ãã¶ã€ããŒã®å¥œã¿ã«å¿ããŠéžæããŠãã ããïŒã
-xfcRSã¯ãããŒã«ã«ãšãªã¢ãåŠçããããã«å€æŽã§ããŸãïŒãã®å Žåããããªãã³ã°ããã³ã¹ã ãŒãžã³ã°ããããµãã»ã«ãç®çã®ãµãã»ã«ã«ã©ã®ããã«é¢é£ããããæ³åããå¿ èŠããããŸãïŒã
ããã«ãããããŒã«ã«ãããã®å€æŽãéåžžã«å¹ççã«åæç»ã§ããŸãã
èšäºã®äžéšãšããŠãç§ã¯ãããããŸããã§ããããªããªãåçŽãã®ããã«æŠã£ãŠããããã§ãã ããã«ãã¢ã«ãŽãªãºã ã¯éåžžã«è»œããããéåžžã«é«éã«åäœããç»é¢å šäœãåæç»ããŸãã
-ã¢ã«ãŽãªãºã ãå€æŽããã«ãã©ã¯ã¿ã«ã«æ¡åŒµããŠããçµæã¯å¢å ããŸããã 察è§ã»ã«ãåŠçãããå Žåãé£æ¥ãã2ã€ã®çåŒãåæã«äžèŽããå ŽåïŒ3/4ãŒããã«èšå®ïŒãæ¡åŒµãå¯èœã§ãã ãã¯ã¹ãã£ã¯ãã®ãããªã¹ããŒã çšã«èšèšãããŠããŸãããã以åã®ããã«åäœãããŠãã ããïŒã»ã«ããã§ãã¯ãããšãã«å€ãæŠç®ããã ãã§ãïŒãã空ã®ã»ã«/空ã§ãªãã»ã«ã®ä¿åãããå€ãããã€ãã®ç¯å²ã«æ¡åŒµããå¿ èŠããããŸãã æåŸã®ãã¹ã§ã¯ãå ã®ã¢ã«ãŽãªãºã ãåžžã«äœ¿çšã§ããŸãããªããªããæåŸã®ãã¹ã§ã¯ãã©ã®ãããªå Žåã§ããåæ°ä¿æ°ãã¬ã³ããŒãç解ã§ãã圢åŒå šäœã«ããå¿ èŠãããããã§ãã
-ã¹ã±ãŒãªã³ã°ãã¯ã»ã«ãã£ã«ã¿ãŒãšããŠäœ¿çšãããŠãããããã¢ã«ãŽãªãºã ã¯å ã®ãã¯ã»ã«ããã* 8x8ãå¢å ãããITãè¡ãã¿ã€ã«ã»ããã®åæãµã€ãºã¯16x24pxã®ã¿ã§ãïŒãã¯ã¹ãã£ãŒã¯æ¹åä»ããããŸãïŒæ¹åä»ã/æ¡æ£ã¯ããã«å°ãªããªããŸãïŒ
-ã¢ã«ãŽãªãºã ã䜿çšããŠãã©ã¹ã¿ãªããžã§ã¯ãã®ãšããžãç¹å®ã§ããŸãïŒç¯å²ã®ãã¯ã»ã«ãæ¯èŒããé¢æ°ãè¿œå ããããšã«ããïŒ
-ïŒJSãåç §ïŒèšç®ããããšããžã¯ããã£ã³ãã¹ã«å€ãã®ãã¿ãŒã³ãæç»ããæäœãã°ã«ãŒãåããã®ã«åœ¹ç«ã¡ãŸãã
-xfcRSã¯ãããŒã«ã«ãšãªã¢ãåŠçããããã«å€æŽã§ããŸãïŒãã®å Žåããããªãã³ã°ããã³ã¹ã ãŒãžã³ã°ããããµãã»ã«ãç®çã®ãµãã»ã«ã«ã©ã®ããã«é¢é£ããããæ³åããå¿ èŠããããŸãïŒã
ããã«ãããããŒã«ã«ãããã®å€æŽãéåžžã«å¹ççã«åæç»ã§ããŸãã
èšäºã®äžéšãšããŠãç§ã¯ãããããŸããã§ããããªããªãåçŽãã®ããã«æŠã£ãŠããããã§ãã ããã«ãã¢ã«ãŽãªãºã ã¯éåžžã«è»œããããéåžžã«é«éã«åäœããç»é¢å šäœãåæç»ããŸãã
-ã¢ã«ãŽãªãºã ãå€æŽããã«ãã©ã¯ã¿ã«ã«æ¡åŒµããŠããçµæã¯å¢å ããŸããã 察è§ã»ã«ãåŠçãããå Žåãé£æ¥ãã2ã€ã®çåŒãåæã«äžèŽããå ŽåïŒ3/4ãŒããã«èšå®ïŒãæ¡åŒµãå¯èœã§ãã ãã¯ã¹ãã£ã¯ãã®ãããªã¹ããŒã çšã«èšèšãããŠããŸãããã以åã®ããã«åäœãããŠãã ããïŒã»ã«ããã§ãã¯ãããšãã«å€ãæŠç®ããã ãã§ãïŒãã空ã®ã»ã«/空ã§ãªãã»ã«ã®ä¿åãããå€ãããã€ãã®ç¯å²ã«æ¡åŒµããå¿ èŠããããŸãã æåŸã®ãã¹ã§ã¯ãå ã®ã¢ã«ãŽãªãºã ãåžžã«äœ¿çšã§ããŸãããªããªããæåŸã®ãã¹ã§ã¯ãã©ã®ãããªå Žåã§ããåæ°ä¿æ°ãã¬ã³ããŒãç解ã§ãã圢åŒå šäœã«ããå¿ èŠãããããã§ãã
-ã¹ã±ãŒãªã³ã°ãã¯ã»ã«ãã£ã«ã¿ãŒãšããŠäœ¿çšãããŠãããããã¢ã«ãŽãªãºã ã¯å ã®ãã¯ã»ã«ããã* 8x8ãå¢å ãããITãè¡ãã¿ã€ã«ã»ããã®åæãµã€ãºã¯16x24pxã®ã¿ã§ãïŒãã¯ã¹ãã£ãŒã¯æ¹åä»ããããŸãïŒæ¹åä»ã/æ¡æ£ã¯ããã«å°ãªããªããŸãïŒ
-ã¢ã«ãŽãªãºã ã䜿çšããŠãã©ã¹ã¿ãªããžã§ã¯ãã®ãšããžãç¹å®ã§ããŸãïŒç¯å²ã®ãã¯ã»ã«ãæ¯èŒããé¢æ°ãè¿œå ããããšã«ããïŒ
-ïŒJSãåç §ïŒèšç®ããããšããžã¯ããã£ã³ãã¹ã«å€ãã®ãã¿ãŒã³ãæç»ããæäœãã°ã«ãŒãåããã®ã«åœ¹ç«ã¡ãŸãã
5.çµã¿åããïŒ
-ã¹ã¯ããŒã«ãå®è£ ããããšãxfcRSã¯2Dãããã¡ãŒã«ç°¡åã«é 眮ãããŸããããã¯åã®èšäºã§åæããŸããã => habrahabr.ru/post/280830
-ããã«ãæçš¿ã®ç»åããæ¢ã«èŠãããã«ãé©ãã»ã©å ã®ãã©ã³ãïŒããããããã®ã¹ã¿ã€ã«ãèšå®ã§ããŸãïŒãæç»ããŸãã
6.ã¹ããŒãªãŒã®ããã«
çãŸããŸããïŒé£ãªãã§ã¯ãããŸãããããã楜ããã ãã§ãïŒç§ã¯ã¢ã«ãŽãªãºã ããšãŠãæ°ã«å ¥ã£ãã®ã§ã倧声ã§åŒã¶ããšã«ããŸããã
ç§ã¯ç¥èªãæ¢ãå§ããŸãã.FXAAã¢ã³ããšã€ãªã¢ã·ã³ã°ããŸãã¯xBRãŸãã¯EPXã®ããããã®ã¢ã«ãŽãªãºã ã«äŒŒããã®ã欲ããã£ã-ãšããã§ããã¯ã»ã«ã¢ãŒãã°ã©ãã£ãã¯ã¹ãã¹ã±ãŒãªã³ã°ããŸãïŒã¡ãªã¿ã«ãåŸè ã®æè¿ã®æ€æ»ã®åŸãããã¯ç§ã®ãã®ãšéåžžã«é¡èãªé¡äŒŒæ§ãæã£ãŠããããšãããããŸããïŒã
ããã§ã圌ã¯ãeXpansion Fast Cell RounderããŸãã¯åã«ãRounded Squaresãã®2ã€ã®ãªãã·ã§ã³ãèãåºãããã®çµæã圌ã¯åŸè ã«ãã£ãšåŸãå§ããŸããã
ããããä»ã«äœãç§ã襲ã£ããç¥ã£ãŠããŸããïŒ ãã®çµæãã³ãŒãã§ã¯ãååã®åŸã«ãå®æ°0xfc30ã«å°éããŸããã
ïŒç§ãITãªã¿ã¯ã§ããããã«ããã€ãã³ãªãã®åäžã®ååã¯ãã¹ãŠã®çš®é¡ã®SEOã«é©ããŠããŸããããã®å Žåã2ã€ã¯é¿ããããŸããïŒïŒ
éåœã®å¥ã®èŽãç©ã¯ãé·ç§»ãã¯ã¹ãã£ã®èå³æ·±ããã¿ãŒã³ã®ä»¥åã®çºèŠã§ããïŒ
-çŸãããã¯ã¹ãã£ã®ããŒã«ã衚瀺ããŸãïŒ3Dãããªã¢ã«ãšãã£ã¿ã®ããã«ïŒ
-å®éããã®ããŒã«ã¯4x4ã¿ã€ã«ã®åé 眮ã®ã¿ã䜿çšããŠããã¯ã»ã«åäœã§è£è¿ãããšãã§ããŸãã ã€ãŸã ããŒã¹ã®ãã¯ã¹ãã£ã¯é¢ä¿ãªããè£è¿ãããšãã§ããŸãã
å®éãxfcRSã¯ããã«ã¯çŽ°é·ããªããŸããã§ãããããšãã°ãå€ããã¹ãã§ã¯ãè¿œå ã®æ»ããããèŠèŠçã«ç¢ºèªãããã ãã®ã¿ã€ã«ã»ããã®çŽ æŽãããäœçœ®ã«æ°ä»ããŸããã§ããã
ã¡ãªã¿ã«ãã¬ã€ã¢ãŠãã«ã¯å¥ã®å¯©çŸçãªã¿ã¹ã¯ããããŸãããã¿ã¹ã¯ã§ã¯ãªããç§ã«æ©ãŸããã質åã§ãã åãè£è¿ãã«ãããã®ãããªç°åžžã«çŽ æŽãããæ©äŒãèæ ®ããŠããã¯ã¹ãã£ãä¿åããããç°¡æœãªæ¹æ³ã¯ãããŸããïŒã¢ã€ãã¢ã¯ãããŸããïŒ
ããŠããã¶ãŒãã®å ŽåïŒ
åçç·šéçšã®ã·ã³ãã«ãªã³ãŒãïŒã¢ãã€ã«ã¯ãã ã®ãµããŒãä»ãïŒ
onload = window.ontouchstart = onmousedown = function(e){ //Controll: e = e || window.event; e.preventDefault ? e.preventDefault() : e.returnValue = false; var E = e.touches ? e.touches[0] : e, n = E.pageX * z / 8 + w * (E.pageY * z / 8 | 0) | 0; map[n] = !map[n]; ctx.clearRect(0, 0, cnv.width, cnv.height); draw(map, w, h); }
ã¹ã¯ãªãŒã³ã·ã§ããïŒ
ã©ã€ããã¢codepen.io/impfromliga/pen/qNOazj
以äžã§ãã èšäºããã£ãšé »ç¹ã«æžãããã£ãã®ã§ããã第äžã«ãè¯å¿ã¯æåŸãŸã§ããŸããããªãã£ããã®ãã¬ã€ã¢ãŠãããããšãèš±å¯ããŠããŸããã第äºã«ãå®è£ èªäœããã説æãç解ããã®ã«æéããããããšãããããŸãããããã¯åžžã«è±å¯ã§ã¯ãããŸãã...
ã³ã¡ã³ããæ¹å€ãææ¡ãã³ã³ã¹ãã©ã¯ããäºåã«ããããšãïŒ
ãšããã§ãæéã¯éããªãåŸåããããå€ãã®äººãããªãã蹎ããããªãã®çºèŠã«é¢å¿ã瀺ããŸãã
ãããŸã§èªãã§ãããããã©ããããããšãããããŸããïŒ
ãŸãåŸã§ã