ç§ã¯ã²ãŒã ãäœãã®ã奜ãã§ããããã¯ç§ã®è¶£å³ã§ãã åèšã§ãç§ã¯èªç±æéã§çŽ1幎ãVKontakteã®JavaScriptã§ã²ãŒã ãäœæããŸããã çŸåšãã²ãŒã ã¯å®æããçºå£²ãããVKontakteã«ãã£ãŠç®¡çãããã²ãŒã ã«ã¿ãã°ã§å ¥æã§ããŸãã ããã¯ããã²ãŒã ã®äœãæ¹ãã®ãããªèšäºã§ã¯ãªããäœæäžã«ééããåé¡ã«é¢ããã¹ããŒãªãŒã§ãã ãã®æ å ±ããããžã§ã¯ãã®å°é£ãªç¶æ³ãåé¿ããã®ã«åœ¹ç«ã€ããšãé¡ã£ãŠããŸãã åãã£ãŠããã€ãã®ãã°ãç¥ã£ãŠãããªããããã¯ã¯ããã«ç°¡åã ã£ãã§ãããããããããã³ãŒãã«é¢ããŠä»ã®æ±ºå®ãããã§ãããã 詳现ã«ã€ããŠã¯ãkatãžããããã
ãšã³ããªãŒ
ãã°ã®æ¬è³ªãããæ確ã«ããããã«ãã²ãŒã ã«ã€ããŠç°¡åã«èª¬æããŸãã ã²ãŒã ã¯äžåœã®ããºã«ã ã¿ã³ã°ã©ã ãã«åºã¥ããŠããããã®æå³ã¯ãããã€ãã®åçŽãªåœ¢ç¶ããããè€éãªåœ¢ç¶ãåéããå¿ èŠããããšããããšã§ãã å€å žçãªã¿ã³ã°ã©ã ã§ã¯7ã€ã®æšæºæ°åã䜿çšããŸãããç§ã®ã²ãŒã ã§ã¯ããã®ååãä»»æã®æ°ãšçš®é¡ã®æ°åã«äžè¬åããããšã«ããŸããã
æåã¯ãã°ã©ãã£ãã¯ãšã³ãžã³ãšããŠpixi.jsã䜿çšããŸããã ãã®åŸãããã€ãã®çç±ã§ãç§ã¯ãããæŸæ£ãããã¹ãŠããã£ã³ãã¹ã«æãããšã«ããŸããã ããã¯è°è«ã®äœå°ã®ãã決å®ã§ããã説æãããŠãããã°ã®äžéšã¯ãŸãã«ããããçãããã®ã§ãã äžæ¹ãpixiã䜿ãã°ãä»ã«ãé©ãããããŸãã
ãã°ã«ç§»ãåã«ãããã«ããã€ãã®ãã€ã³ãããããŸãã
ãŸããã¿ã€ãã«ã«ããã°ããšããèšèã䜿çšããŸãããã以äžã«èª¬æããç¶æ³ã®äžéšã¯ãã°ã§ã¯ãããŸããã ãã®æ©èœããŸãã¯ã²ãŒã /ãã©ãŠã¶ã®æ£ããããéè«ççãŸãã¯éæšæºã®åäœã§ãããããŸãã ãŸãã¯ç§ãééããå°é£ã
第äºã«ããããžã§ã¯ãã®ãµã€ãºã¯ããã»ã©å€§ãããããŸãããããã¡ãããäœæããéã«ããå€ãã®ééãããããŸããã ãã¹ãŠã説æããã®ã¯æå³ããããŸããã ãŸããªç¶æ³ãè€éãªç¶æ³ããŸãã¯èå³æ·±ãç¶æ³ãèšæ¶ããŸããã ãŸããããããã¹ãŠã®ãã°ã¯ãæµonãªã°ãŒã°ã«ã§ããããŠããããã¯ææ ®æ·±ãã°ãŒã°ã«ã§ããããã«é¢ããããªãã®æ å ±ããããšããäºå®ã«ãã£ãŠçµåãããŠããŸãã ãããã£ãŠãããã§ãããã説æããããšã¯æçšã ãšæããŸãã
第äžã«ãããã€ãã®ãã°ãä¿®æ£ããŠããŸããã ã©ãããã°ããã®ããããããŸã£ããå¯èœãã©ããããããªãããã§ãã ç§ã¯ãŸã ãããã«ã€ããŠæžãå¿ èŠããããšæãã®ã§ãåæ§ã®éçºè ãçŽé¢ããŠããä»ã®éçºè ã¯ã圌ããäžäººã§ã¯ãªãããšãç¥ããå°ãªããšãããã€ãã®åçã®ããã®è³æãåãåã£ãŠããŸãã 誰ããå埩äžèœãªåé¡ãä¿®æ£ããæ¹æ³ãç¥ã£ãŠããã°ãç§ã¯ã³ã¡ã³ãã§çããèããŠããããã§ãã
ãã®æç¹ã§ãé·åŒãå°å ¥ã¯çµäºããæ¬è³ªã«æ»ããŸãã
1çª å šç»é¢ã¢ãŒãïŒfullscreen apiïŒã§èžãã
ãããŠããã«ã¹ã¯ãªãŒã³ã¢ãŒãã®ãµããŒããå°å ¥ãããŠãã1幎以äžãçµã¡ãŸãããããŸã ããã«ãããŸãã ã€ã³ã¿ãŒããããšHabréã®äž¡æ¹ã«å€ãã®èšäºããããŸã ãããšãã°ããã«ãããŸã ã ãããã以åãšåæ§ã«ããã¹ãŠã®ãã©ãŠã¶ãŒã¯ç¬èªã®æ¹æ³ã§ãã¹ãŠãå®è¡ããŸãã
ãã©ãŠã¶ã®æ°ïŒãŸãããŸãã¯ãšã³ãžã³ã®æ°ïŒããã«ã¹ã¯ãªãŒã³APIã®ã¡ãœããã®ååã®ãªãã·ã§ã³ãå€ãããã«èŠããŸãã
ãã¬ãã£ãã¯ã¹èªäœãçŽããããã ãã§ã¯ãããŸããïŒmozãwebkitïŒã IE11ã¯ãmsãšMSã®2ã€ã®ãã¬ãã£ãã¯ã¹ã䜿çšããŸãã äžéšã®ãã©ãŠã¶ã¯ããã«ã¹ã¯ãªãŒã³ã®äžéšã§ãããã«ã¹ã¯ãªãŒã³ïŒhello firefoxïŒã䜿çšããŸãã ãã«ã¹ã¯ãªãŒã³å€æŽã€ãã³ãã¯ã倧æåãªãã§èšè¿°ãããŸãïŒfullscreenchangeïŒãã¡ããããã¬ãã£ãã¯ã¹ä»ãïŒã ããããIE11ã§ã¯ãEdgeã§MSFullscreenChangeãšèšè¿°ãããŠããŸã-fullscreenChangeã
ãŸãããã©ãŠã¶ã®äžéšã¯å šç»é¢èŠçŽ ãç»é¢ã®äžå€®ã«é 眮ããäžéšã¯ããããã£ãåãäœçœ®ã«æ®ããŸãã
ãã«ã¹ã¯ãªãŒã³ã¢ãŒãããªã³ãŸãã¯ãªãã«ããã®ã¯ç°¡åãªããšã®ããã«æããŸãã ãã®çµæãããã¯ãã¹ãŠãç®çã®ãã©ãŠã¶ã§ã®ç®çã®ã¡ãœããã®ååã®æ€çŽ¢ãšé·ããã¹ãã«å€ãããŸãã
èå³ã®ããæ¹ã¯ã CodePenã®çµæãã芧ãã ãã ã ã¯ãã ãã€ã³ããã¯ã¹ããªãã©ãFirefoxãIE11ã§ãã§ãã¯ã€ã³ã æ®å¿µãªãããç§ã¯ãµãã¡ãªãšãšããžããã§ãã¯ã€ã³ããæ¹æ³ããããŸããã誰ãããããè¡ãããšãã§ããã°ãã³ã¡ã³ãã賌èªè§£é€ããŸãã
2çª æ¶ãã圱ïŒcontext.shadowBlurïŒã
å³åœ¢ã«ã«ãŒãœã«ãåããããšã圱ãè¿œå ãããŠåŒ·èª¿è¡šç€ºãããŸãã ã€ãŸããéåžžã®ç»åã«æ¬¡ã®åœ±ãè¿œå ããŸãã
context.shadowBlur = 5 context.shadowColor = â#000â
ãã¹ãŠã®åœ¢ç¶ã§ãããã¯éåžžã®é·æ¹åœ¢ãé€ãæ£åžžã«æ©èœããŸãã 圌ã®åœ±ã¯çŸããŸããã
é·ãéãç§ã¯ãããé£ãããªãããšãèæ ®ããŠããã®ãã°ã«ããå解ãåŸãŸã§å»¶æããŸããã çå£ã«èããæãæ¥ããšãããã¹ãŠãããã»ã©åçŽã§ã¯ãªãããšãå€æããŸããã
é·æéã®æ€çŽ¢ãããŸããŸãªãªãã·ã§ã³ã®è©ŠçšããããŠçµæãšããŠãç§ã¯ããã ããèŠã€ããŸããïŒ
- 圱ã¯å®éã«è¡šç€ºãããŸãããåè§åœ¢ã®ç»åã®äžããã¯èŠããŸãããããã¯ããŒããã¬ã³ããªã³ã°ãã€ãŸããŒããããªãããã§ãã
- ã·ã£ããŠããªãã»ããã«èšå®ãããšããªãã»ããããã®ç¶æ ã§èŠããããã«ãªããŸãããåã³ããŒãããªãã§
- ãã®ãããªå¹æã¯é·æ¹åœ¢ã®å³åœ¢ã§ã®ã¿èŠ³å¯ããã圱ã®ããä»ã®ãã¹ãŠã¯åã ã¡ã§ã
- ãŒã以å€ã®è§åºŠã§é·æ¹åœ¢ãå転ããããšã圱ã¯éåžžéã衚瀺ãããŸã
- ç»åã³ã³ããã¹ãã«é·æ¹åœ¢ã衚瀺ããçŽåãshadowBlurã®å€ã¯5ã§ããã¯ãã§ãããBlur衚瀺ã¯ãŸã ãããŸãã
- ãã®ãã°ãã²ãŒã ãšã¯å¥ã«ãå¥ã®ãã¡ã€ã«ã§ç¹°ãè¿ããšããåäžã®è©Šã¿ã¯æåããŸããã§ãã
ãã¹ãŠã®æ°åã¯åãã³ãŒãã§ç»é¢ã«è¡šç€ºãããŸããã€ãŸããã³ãŒãã«åé¡ã¯ãããŸããã äžæ¹ãã²ãŒã ã³ãŒã以å€ã§ã¯ãã®ãã°ãåçŸããããšã¯ã§ããŸãããã€ãŸããåé¡ã¯ã³ãŒãã«ãããŸãã
ççŽã«èšã£ãŠãç§ã¯ãã®ãã°ãçªãæ¢ããããšã«éåžžã«ããããããŠãããçµæã¯æ¬¡ã®ãšããã§ããäœãåå ã§ãããããããŸããã ä¿®æ£æ¹æ³ãããããŸããã
ããããæŸèæã®äœãæ¹ãšä¿®æ£æ¹æ³ã¯ç¥ã£ãŠããŸãã ç§ãããããšã ã°ã©ãã£ãã¯ãšãã£ã¿ãŒã§åè§åœ¢ã®ç»åãéãã1ãã¯ã»ã«ãéžæãïŒã³ãŒããŒã§ãããã¯æããªãïŒãéæ床ã255ã§ã¯ãªã254ã«ããŸããããã®çµæãç»åã¯å ã®ç»åãšå€èŠäžåºå¥ã§ããŸãããã圱ãã€ãŸããŒããã¯éæ³ã§ãç»åã衚瀺ãããŸãã ãããŠãç§ããããã©ã®ããã«æãã€ããã®ãèããªãã§ãã ããã
çªå·3ã é³å£°ãã³ãŒãã®ãã°ïŒdecodeAudioDataïŒ
ã²ãŒã ã§ãµãŠã³ããåçããã«ã¯ãAudioContextã䜿çšããŸãã ãµãŠã³ãã¯XMLHttpRequestãä»ããŠèªã¿èŸŒãŸããdecodeAudioDataé¢æ°ã䜿çšããŠãã³ãŒããããŸãã ãã¹ãŠãæ£åžžã§ãã
ãã°ããããŠãç§ã¯å€ãã©ãããããã§ã²ãŒã ããã¹ãããããšãåŒãåããŸãããããã¯ãŸã XPããããããã«å¿ããŠå€ãããŒãžã§ã³ã®ChromeããããŸãã ããã§ã次ã®åœ¢åŒã®ãšã©ãŒãçºçããŸããïŒãã£ãããããªãïŒçŽæïŒDOMExceptionïŒãªãŒãã£ãªããŒã¿ããã³ãŒãã§ããŸããã yandexãã©ãŠã¶ã§ãåããšã©ãŒãçºçããŸãã
ãã®ãã°ã§æãèå³æ·±ãã®ã¯ãäºåã«äºæž¬ã§ããªãã£ãããšã§ãã ååšã確èªããã ãã§ããªãŒãã£ãªã³ã³ããã¹ãã®ãµããŒãã確èªã§ããŸãïŒ
window.hasOwnProperty("AudioContext")
ã ãããããã³ãŒããè©Šã¿ãããšãé€ããŠããµãŠã³ãããã³ãŒãã§ãããã©ããã確èªããæ¹æ³ã¯ïŒ
try-catchã³ã³ã¹ãã©ã¯ãã圹ã«ç«ã¡ãŸããã ãšã©ãŒã¯jsã¹ã¯ãªããã§ã¯ãªããã©ãŠã¶ã®ã³ãŒãã§çºçãããããåã«äŸå€ãã¹ããŒããŠã¹ã¯ãªãããåæ¢ããŸãã
1ã€ã®ãã£ãã«ã§wavãã¡ã€ã«ããã³ãŒãããããšãããšãšã©ãŒãçºçããããšãå€æããŸããã ãã¡ã€ã«ã2ãã£ã³ãã«ã«å€æããããmp3ã«æžã蟌ããšããã°ã¯æ¶ããŸãã
ã¯ãã ã®æè¿ã®ããŒãžã§ã³ã§ã¯ããã®ãã°ã¯ãããŸããã
çªå·4ã ã¢ã³ããŒãããã³ããŒã¿ã¹ãã¬ãŒãžã®åã
beforeunloadã€ãã³ããã³ãã©ãŒã§ã²ãŒã ãçµäºãããšããµãŒããŒã«ãªã¯ãšã¹ããéä¿¡ããŠãæåŸã®ãªãŒãã³ã¬ãã«ãä¿åããŸãã
çŽ50ïŒ ã®ã±ãŒã¹ã§ããããããã£ãšé »ç¹ã«ãããŒã¿ã¯ä¿åãããŸããã§ããã ãã©ãŠã¶ãbeforeunloadã€ãã³ããåŠçããã®ã«ã©ããããã®æéãè²»ããããµãŒããŒããªã¯ãšã¹ããåŠçããã®ã«ã©ããããã®æéãè²»ãããããèãããšãããããã€ã³ãã§ã¯ãªãããšã«æ°ä»ããŸããã çãã¯æ¢ã«ããã£ãŠããã°ç°¡åã§ããã éåæã§ã¯ãªããåæãµãŒããŒèŠæ±ã䜿çšããå¿ èŠããããŸãã
ãã¹ãŠåããé©ãã¹ãããš-矀ãã®æ¬èœããŸãã¯ç¿æ £ãšä¿¡å¿µã®åã ããã¥ã¢ã«ãšã¬ã€ãã«æžãããŠããŸãïŒåæãªã¯ãšã¹ãã䜿çšããªãã§ãã ããïŒ éåæãªã¯ãšã¹ãã䜿çšããŠãã ããïŒ ãããŠãã»ãšãã©ã®å Žåããã®ãŸãŸã§ãã
ããŠãåæèŠæ±ã䜿çšã§ããïŒãããŠãã¹ãã§ãïŒãŸãã«ããã§ãïŒ ãã®å Žåãã¢ã³ããŒããåŸ æ©ããåã«ã¹ã¯ãªããã®å®è¡ãäžæåæ¢ãããçµæãè¿ãããªããããããŒã¿ãä¿åããæéããããŸãã
PSæçµçã«ã¯ãåã¬ãã«ã®åŸã«ä¿åããã®ã§ãããä¿¡é Œæ§ãé«ããªããŸããã
5çª ãã£ã³ãã¹+ããã¹ã+ Firefox
ã€ã¢ãªãšã³ãžã³ã®ããªãå€ããã°ã§ããããã¯äºåã«ã¯ç¥ããŸããã§ããããç¡é§ã§ããã firefoxã®ãã£ã³ãã¹ã«ããã¹ãã衚瀺ãããå Žåãããã¹ãã¯ä»ã®ãã©ãŠã¶ãŒïŒãšã³ãžã³ïŒãããæ°ãã¯ã»ã«é«ã衚瀺ãããŸãã ããã¯ã
context.textBaseline = "top"
ããããã£ã䜿çšããå Žåã«ç¹ã«é¡èã§ãã èŠèŠçã«ã¯ã次ã®ããã«ãªããŸãã
ãªãã»ããã¯ãã©ã³ããµã€ãºãã€ãŸã åãã§ã¯ãããŸããã context.textBaselineã®ä»ã®å€ã䜿çšããå Žåããªãã»ããã¯å°ãããªããŸãããç®ã§èŠãŠããŸã ããããŸãããã©ã³ããµã€ãºã20ãã¯ã»ã«ä»¥äžã®ãã¯ã»ã«ã§ãã
ãã®ãã°ã®è°è«ã¯ããã§èŠã€ããããšãã§ããŸã ã
ç§ãè©Šãããã®ïŒ
-
context.textBaseline = âmiddleâ
ã䜿çšããŠãããã¹ããååã®é«ãã«ã·ããããŸãã äžã§èšã£ãããã«ããŸã å°ãççŸããããŸãã - ãã¯ã»ã«ããšã«ããã¹ãã®é«ããæåã§æ±ºå®ããŸãã ã€ãŸã 倧æå/æ°åïŒããšãã°ã0ãŸãã¯TïŒã䜿çšããŸããäžå€®ã®äžäžããã網æãã«åããŸã§ãã¯ã»ã«ã®ãã§ãã¯ãéå§ããŸãã ãããã£ãŠããã©ã³ãã®é«ãã決å®ãããç¢æãåžæããå Žæã«æ£ç¢ºã«è¡šç€ºã§ããŸãã ããããããã¯ããªãè€éã§ããªãœãŒã¹éçŽçã§ãããè€æ°è¡ã®äžç·ä»ãã®åãæ¶ãç·ä»ãããã¹ãã®çµè«ã«ã¯å°é£ããããŸãã ãŸãããã®æ¹æ³ã¯ãæåãåŸããŠããããŸãã¯æšæºå€ã®ã¹ã¿ã€ã«ãæã£ãŠããããŸããŸãªãã©ã³ãã«ã¯é©ããªãå ŽåããããŸãã
- èšç®å€ããµã€ãºãŸãã¯ã¿ã€ãã®å²åã«ããããã¹ããªãã»ããã åäœããªãããªããªã ãã©ã³ããµã€ãºãšãã®ãªãã»ããã®éã«ã¯çŽæ¥çãªçžé¢é¢ä¿ã¯ãããŸããããããã«ããŠããç§ã¯ãããç¥ããŸããã
ãã®çµæã圌ã¯ãã®åé¡ããçæ£é¢ããã解決ããŸããã圌ã¯ãã©ãŠã¶ãšã³ãžã³ã決å®ããå¿ èŠã«å¿ããŠãåã ã®ç¢æããšã«å¿ èŠãªè·é¢ã ãæåã§ããã¹ããã·ããããŸããã å¥åŠãªããšã§ã¯ãªããæãç°¡åãªæ¹æ³ã§ããã
No. 6ã ãã©ãã·ã¥ããŠã¹ã¢ãŠã
ãã®ãã°ã«ã€ããŠæžãã¹ããã©ããèããŸãã ãããæãŸããã®ã¯éåžžã«é£ããã§ããç§ã«ã¯ãããç§ã«æããããã©ããããçããŸããã ããããç§ãéåžžã«ç©æ¥µçã«äœ¿çšããŠããvivaldiãã©ãŠã¶ãŒã§ã¯ããã°ã¯å®å®ããŠæ€åºãããŸãã ãŸããã¯ãã ã§åœŒãæãŸããããšãã§ããŸããïŒããããããã¯ç¢ºãã§ã¯ãããŸããïŒïŒã Firefoxããã³ãªãã©ã§ã¯ããã°ãååŸããããšã¯ã§ããŸããã§ããããããŸãæ©èœããªãã£ãå¯èœæ§ããããŸãã
ã ãããããã¯ãã¹ãŠãã²ãŒã å ã®ãã¿ã³ãæ°åé£ç¶ããŠã¯ãªãã¯ãããšãããŠã¹ãåãããªããšãã«ãŒãœã«ãããã©ã«ãã«èšå®ãããããšã«æ°ã¥ãããšããäºå®ããå§ãŸããŸããã ãã¿ã³ããåºãŠãããã®ããã«ã ããŸããŸãªãªãã·ã§ã³ããã¹ãããåŸãmouseoutã€ãã³ããçªç¶çºçããããããã°ãçºçããããšãå€æããŸããã
ããã§ãã®ãã°ããããã©ããããã¹ãã§ããŸã ã
ç¹°ãè¿ããŸããããã°ã¯å€ããå°ãªããèªä¿¡ãæã£ãŠããã«ãã£ïŒ5ã30åã®ã¯ãªãã¯åŸïŒã§ãã¯ãã ã§ã¯ç¢ºå®ã«ãã£ãããããŸãã ä»ã®ãã©ãŠã¶ã§ã¯ããã°ããã£ããã§ããŸããã§ããã
ãã¹ãã®æ¬è³ªïŒãã³ãéããã³ã³ãœãŒã«ïŒF12ïŒãéããç¢æã®ãã段èœã®äžã«ããŠã¹ã移åããåãããªãããã«æ³šæããŠããŠã¹ãé çªã«ã¯ãªãã¯ãå§ããŸãã ã³ã³ãœãŒã«ã¡ãã»ãŒãžã远跡ããŸãã äžå®åæ°ã¯ãªãã¯ãããšãç¢æãç¹æ» ããŸãã mouseoutã€ãã³ããçºçããŸããã mouseoutã€ãã³ããçºçããããŠã¹ã«ãŒãœã«ãããã©ã«ãã«å€æŽãããåŸãmouseoverã€ãã³ããåã³çºçããã«ãŒãœã«ããã€ã³ã¿ã«å€æŽãããåŸãããŠã¹ã®ããããªåãã§ååãªå¹æãåŸãããšãã§ããŸãã
mouseenter / mouseleaveã€ãã³ãã䜿çšããããšããŸããã ãã¡ã€ã«ãããŒã«ã«ã§ãã¹ãããŸãã ã¯ãªãã¯éžæããªãã«ããŸãã çµæã®ãã©ã¹ãŸãã¯ãã€ãã¹ã¯åãã§ãã
ç§ã¯ãããäœã§ããããªããããªã®ãããããŸããã ç¹å®ã®ãã©ãŠã¶ã®ãã°ããæ³å®ã§ããŸããã ã²ãŒã ã§ã¯ãããã«ã€ããŠäœãããŸããã§ãããäžè¬ã«ãé£ç¶ããŠäœåºŠãæŒãããšãã§ããïŒãŸãã¯å¿ èŠãªïŒãã¿ã³ããªãããã§ãã ã¯ãããããŠãã®ãã°ã§äœãã§ããã®ããæ£çŽã«æãã€ããŸããã§ããã
ããå°ã
圌ã¯ã¿ã€ãã«ã«6çªã瀺ããŸããããããã€ãã®é¢çœãééããæãåºããŸããã ãããã«ã€ããŠç°¡åã«èª¬æãããšãå€ãã®ããšã¯æžãã¹ããã®ã§ã¯ãªãããã§ãã
context.drawImage
ã¡ãœããã¯ãç°ãªãæ°ã®åŒæ°ã§åŒã³åºãããšãã§ããããšãç¥ãããŠããŸãã ç¹ã«ããœãŒã¹ããã³ããŒããŠã³ã³ããã¹ãã«æç»ããé åã®ãµã€ãºãæå®ã§ããŸãã ãããã£ãŠãã¯ãã ã§ã¯ãµã€ãº0x0ã®é åãæç»ã§ããŸãããfirefoxã¯ãšã©ãŒãåºããŸã-ééã£ããµã€ãºã§scãããŸãã
ãã¥ãŒã³ãŒãã®å¥åŠãªãã°
bounds = { left: 0 right: GAME_WIDTH top: 0 bottom: GAME_HEIGHT }
ãã¹ãŠãããŸãããããã«èŠããŸãããäœããã®çç±ã§ãã³ãŒãã®ããã«bounds.topã¯0ã§ã¯ãªãã1e-14ã®ãããªãã®ã§ããã¡ãããŒãã«éåžžã«è¿ãããããã§ã0ã§ã¯ãããŸããããããŠã以äžã®ã³ãŒãããŒããšæ¯èŒãããšãçµæã¯ãã§ã«ç°ãªããŸãã
ããã«ã¯2ã€ã®å¥åŠãªç¹ããããŸãã ãŸãããã®ãã°ã¯require.jsã䜿çšããŠã³ãŒããåäžã®ãã¡ã€ã«ã«ãã«ãããåŸã«ã®ã¿çºçããŸãã ã³ãŒãã¯ç°ãªãã¢ãžã¥ãŒã«-ãã¡ã€ã«ã«ãããŸããããã®ãããªåäœã«æ°ä»ããŸããã§ããã 第äºã«ãäœããã®çç±ã§ããã®ãããªå¥åŠãã¯å€topã§ã®ã¿çºçããŸãããbounds.leftã¯äŸç¶ãšããŠå³å¯ã«ãŒãã§ãã
ãããããé¡ãããŸãïŒ
ããã ãã§ããä»ã«äœãèŠããŠããŸããã§ããã 誰ããäœæ¥ã®çµæã確èªããè©äŸ¡ããŠãã¹ããããå Žåã¯ã ãã¡ãã«ã¢ã¯ã»ã¹ããŠãã ãã ã
ãæž èŽããããšãããããŸããããã®æ å ±ã圹ã«ç«ã€ããšãé¡ã£ãŠããŸãïŒ