* @param {!Node} contextNode Context node. * @param {number} startX Start X coordinate. * @param {number} startY Start Y coordinate. * @param {number} veloX Starting X velocity. * @param {number} veloY Starting Y velocity. * @param {function(number, number):boolean} callback The callb
(contextNode, startX, startY, veloX, veloY, callback, opt_vsync)
| 103 | * @param {!./service/vsync-impl.Vsync=} opt_vsync |
| 104 | */ |
| 105 | constructor(contextNode, startX, startY, veloX, veloY, callback, opt_vsync) { |
| 106 | /** @private @const {!./service/vsync-impl.Vsync} */ |
| 107 | this.vsync_ = opt_vsync || Services.vsyncFor(self); |
| 108 | |
| 109 | /** @private @const {!Node} */ |
| 110 | this.contextNode_ = contextNode; |
| 111 | |
| 112 | /** @private @const */ |
| 113 | this.callback_ = callback; |
| 114 | |
| 115 | /** @private {number} */ |
| 116 | this.lastX_ = startX; |
| 117 | |
| 118 | /** @private {number} */ |
| 119 | this.lastY_ = startY; |
| 120 | |
| 121 | /** @private {number} */ |
| 122 | this.maxVelocityX_ = veloX; |
| 123 | |
| 124 | /** @private {number} */ |
| 125 | this.maxVelocityY_ = veloY; |
| 126 | |
| 127 | /** @private {number} */ |
| 128 | this.velocityX_ = 0; |
| 129 | |
| 130 | /** @private {number} */ |
| 131 | this.velocityY_ = 0; |
| 132 | |
| 133 | const deferred = new Deferred(); |
| 134 | |
| 135 | /** @private {!Promise} */ |
| 136 | this.promise_ = deferred.promise; |
| 137 | |
| 138 | /** @private {!Function} */ |
| 139 | this.resolve_ = deferred.resolve; |
| 140 | |
| 141 | /** @private {!Function} */ |
| 142 | this.reject_ = deferred.reject; |
| 143 | |
| 144 | /** @private {boolean} */ |
| 145 | this.continuing_ = false; |
| 146 | } |
| 147 | |
| 148 | /** */ |
| 149 | start() { |
nothing calls this directly
no outgoing calls
no test coverage detected