* Whether the pointer is released during the current frame, if there is no parameter, return whether any pointer released during the current frame. * @param pointerButton - The pointerButtons on a mouse device * @returns Whether the pointer is released during the current frame
(pointerButton?: PointerButton)
| 137 | * @returns Whether the pointer is released during the current frame |
| 138 | */ |
| 139 | isPointerUp(pointerButton?: PointerButton): boolean { |
| 140 | if (this._initialized) { |
| 141 | if (pointerButton === undefined) { |
| 142 | return this._pointerManager._upList.length > 0; |
| 143 | } else { |
| 144 | return this._pointerManager._upMap[_pointerBin2DecMap[pointerButton]] === this._engine.time.frameCount; |
| 145 | } |
| 146 | } else { |
| 147 | return false; |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * @internal |