Canvasでボールをはねさせる

DEMO JavaScript (function(win, doc, ns) { "use strict"; // x方向を反転させる function _reverseX(rad) { return (180 - rad) % 360; } // y方向を反転させる function _reverseY(rad) { return (360 - rad) % 360; } function Ball(obj) { var _this = this; _init(); function _init() { _this.x = obj.x; _this.y =…