Javascript Eyes That Follow - OOPStudios.com JavaScriptでマウスポインタ位置に目玉がついてくるxEyeを実現する「eye.js」のご紹介です。 次のような可愛い(?)目玉がマウスにフォローします。 Math.sqrt, Math.atan2, Math.sin, Math.round など、実際に作るとなると、面倒な数学式を活用する必要がありますが、こうしたライブラリになっていれば実現は簡単ですね。 必要なJSを読み込めば、初期化にJSを1行記述するだけで初期化できる簡単さです。 <script type="text/javascript" src="eyes.js"></script> <div id="myEye" style="width: 100px; height: 100px; background: url('white.