Commit graph

825 commits

Author SHA1 Message Date
Richard Davey
6cd17618b1 Moved time to getter and fixed checkDown. 2019-02-08 13:32:54 +00:00
Richard Davey
7f91956c09 Added time property and preStep. 2019-02-08 13:32:44 +00:00
Richard Davey
916a13cf9d resetKeys doc update. Fix #4345 2019-02-07 00:31:10 +00:00
Robert Kowalski
b94f655405
Only needs to be cleared once.
No need for the duplicate clearing of this, and quick fix.
2019-02-06 11:38:50 -05:00
Robert Kowalski
8cd8b6f98e
Stops pointerover from being triggered if pointerup has been.
In 3.16.1 if you trigger pointerup and then move to another button, the past buttons pointerover event gets triggered. This clears that and stops that from happening by stopping pointerover from being triggered if pointerup has been.
2019-02-06 11:27:22 -05:00
Richard Davey
4cfa29a524 Added flag to help avoid cursor reset issue 2019-02-04 23:29:10 +00:00
Richard Davey
d04232ae54 JSDoc fixes 2019-02-04 11:45:17 +00:00
Richard Davey
348306cafb Lots more jsdoc fixes and new documentation 2019-01-31 14:47:50 +00:00
Richard Davey
3d5d84c01f Stop listener 2019-01-29 23:22:29 +00:00
Richard Davey
1c0acc2342 Needs to listen for the PROCESS event, plus emit keydown_ as well. 2019-01-29 23:21:54 +00:00
Richard Davey
fb0c4af780 Trim the keycodes 2019-01-29 23:21:34 +00:00
Richard Davey
eb78cf90c6 Swapped to using the Scene iteration approach instead of an event, as it fixes the issue with Scene ordering and global priority. Fix #4327 #4321 2019-01-29 01:05:27 +00:00
Richard Davey
aa967cdbc0 Removed process listener. 2019-01-29 01:04:09 +00:00
Richard Davey
6d77884b92 Removed un-needed methods and reset keys on focus loss. Fix #4134 2019-01-24 11:55:34 +00:00
Richard Davey
508df48512 Apply buttons check in move handler too. 2019-01-23 23:17:52 +00:00
Richard Davey
67679f58f6 Return actual booleans from button checks and reset buttons to zero correctly. 2019-01-23 23:00:29 +00:00
Richard Davey
8111d8062e Pointer.up and Pointer.down now use a hasOwnProperty check for the existance of the buttons property on the event, causing it to be set even if equal to zero, which it is when there are no buttons down 2019-01-23 22:34:48 +00:00
Richard Davey
b3bc1cebfd Support the Input Manager useQueue flag. 2019-01-23 15:51:42 +00:00
Richard Davey
b60a2df8ad Refactor of the Input Manager to allow for direct DOM Event dispatching. 2019-01-23 15:51:26 +00:00
Richard Davey
9651d4dba1 New Input Manager process event. 2019-01-23 15:50:57 +00:00
Richard Davey
fb5882f078 Updated docs 2019-01-23 15:29:23 +00:00
Richard Davey
1eccff1e3b Fixed jsdoc links and markdown bullet lists 2019-01-18 15:20:56 +00:00
Richard Davey
bc962c25dc All listeners use the new Events 2019-01-18 13:41:43 +00:00
Richard Davey
1d85795360 Listen for the new Events 2019-01-17 11:31:22 +00:00
Richard Davey
f934066864 Added Key Events. 2019-01-17 11:17:25 +00:00
Richard Davey
dde0233efd Added Gamepad Events 2019-01-17 10:35:13 +00:00
Richard Davey
c3ab9ddee3 Added Input Manager events 2019-01-17 10:35:02 +00:00
Richard Davey
e4902e3b2c Removed old event docs 2019-01-17 10:34:41 +00:00
Richard Davey
e364b64a57 Added the rest of the input events! 2019-01-16 13:12:07 +00:00
Richard Davey
01905f0cb6 Added lots of the Input Events 2019-01-16 12:13:30 +00:00
Richard Davey
078d0c0e1d Added new EventData typedef 2019-01-16 12:13:14 +00:00
Richard Davey
aa341854c7 Happy New Year 2019-01-15 16:20:22 +00:00
Richard Davey
e882218fc4 Renamed boot to core and updated events accordingly 2019-01-15 16:17:04 +00:00
Richard Davey
d161c7f253 Corrected jsdocs 2019-01-11 19:16:43 +00:00
Richard Davey
9bed15bc53 Moving lots of functionality to the Scale Manager
* `InputManager.scaleManager` is a new property that is a reference to the Scale Manager. This is populated in the `boot` method.
* The `InputManager.transformX` method has been removed. This is now available in the ScaleManager.
* The `InputManager.transformY` method has been removed. This is now available in the ScaleManager.
* The `InputManager.scale` property has been removed. This is now available in the ScaleManager under `displayScale`.
* The `InputManager.resize` method has been removed as this process is now handled by the ScaleManager.
* The `InputManager.updateBounds` method has been removed as this process is now handled by the ScaleManager.
* The `InputManager.getOffsetX` method has been removed as it's no longer required.
* The `InputManager.getOffsetY` method has been removed as it's no longer required.
* The `InputManager.getScaleX` method has been removed as it's no longer required.
* The `InputManager.getScaleY` method has been removed as it's no longer required.
2019-01-11 12:12:06 +00:00
Richard Davey
21c9326e07 Change when dragState is populated. Fix #4278 2019-01-05 10:03:11 +00:00
Richard Davey
730c84e3e3 Draggable Game Objects would not work if you had multiple Scenes running in parallel, with draggable objects in both of them. Only the top-most Scene would work fully. Items in the bottom Scene would never finish their drag cycle, causing them to get stuck. Fix #4249 2019-01-04 16:34:59 +00:00
Richard Davey
9a7058915c Removed dragState property. 2019-01-04 16:34:53 +00:00
Richard Davey
36f08d83e6 The processDomCallbacks method in the Input Manager wasn't correctly clearing the once arrays. Responsibility for this has now been passed to the queue methods queueTouchStart, queueTouchMove, queueTouchEnd, queueMouseDown, queueMouseMove and queueMouseUp. Fix #4257 2019-01-04 14:03:21 +00:00
Richard Davey
7aabb98b8e Re-enabled IM 2018-12-18 17:29:15 +00:00
Richard Davey
b8fbd0d2c0 keydown and keyup events now fire for every possible key, no matter if they exist in the KeyCodes list or not. 2018-12-12 16:50:04 +00:00
Richard Davey
50502cfb63 Added emitOnRepeat boolean 2018-12-07 19:28:25 +00:00
Richard Davey
1df20f9070 Keyboard events can now be blocked on a local or global level. 2018-12-06 11:35:16 +00:00
Richard Davey
715e6d3c15 Added key capturing methods. 2018-12-05 16:07:47 +00:00
Richard Davey
114d61cf59 Added capture handling and event queue. 2018-12-05 16:02:29 +00:00
Richard Davey
97805afab0 Input Manager now creates Keyboard Manager. 2018-12-05 16:01:39 +00:00
Richard Davey
7431f0a621 No longer required. 2018-12-05 15:58:53 +00:00
Richard Davey
dd051ddc03 Added event handlers and event emitter. 2018-12-05 15:58:44 +00:00
Richard Davey
606a3832c1 Moving to a global keyboard manager for the DOM events. 2018-12-05 11:16:45 +00:00
Richard Davey
1b28080575 Added pointerupoutside and pointerdownoutside events. 2018-11-29 13:44:42 +00:00
Richard Davey
5b5b83d269 Added downElement and upElement properties 2018-11-29 13:44:18 +00:00
Richard Davey
a065bf1b46 Added global touchstart handler. 2018-11-29 13:42:40 +00:00
Richard Davey
b8f7ecb317 Removed Vec2 and added global handlers with capture tests. 2018-11-29 13:42:26 +00:00
Richard Davey
f2de618b24 Touch Manager will now handle focus events as well. 2018-11-28 13:13:44 +00:00
Richard Davey
5623515c41 Mouse Manager will track over and out states and auto focus. 2018-11-28 13:13:25 +00:00
Richard Davey
4b50065dfd Touch Manager will track over and out canvas states. 2018-11-28 13:11:13 +00:00
Richard Davey
4a312f16db Input Plugin will now emit a gameover or gameout event and has an isOver property. 2018-11-28 13:10:54 +00:00
Richard Davey
0d2197d9f7 Added new isOver property and method handlers. 2018-11-28 13:10:25 +00:00
Richard Davey
524892f095 Fixed angle value and facing direction 2018-11-26 15:42:53 +00:00
Richard Davey
a74616b090 Added getDistanceX and getDistanceY 2018-11-26 15:35:18 +00:00
Richard Davey
41e64b9f53 Added time property, getDistance, getDuration and getAngle. 2018-11-26 13:11:24 +00:00
Richard Davey
d2cb4a4006 Pass the time to Pointer.reset 2018-11-26 13:10:54 +00:00
Richard Davey
b437efa642 Removed un-used function 2018-11-26 11:29:13 +00:00
Richard Davey
f51de18bb2 Updated docs and added quick bail-out clause 2018-11-26 11:27:02 +00:00
Richard Davey
93a76475ea The Input Plugin was emitting a preUpdate event, with the capital U, instead of preupdate. This has now been corrected. Fix #4185 2018-11-26 11:13:25 +00:00
Richard Davey
d596fbd8c0 Added distance property. 2018-11-24 13:04:14 +00:00
Richard Davey
f6efccb29a Added motionFactor property. 2018-11-24 12:52:20 +00:00
Richard Davey
c32a69acaf Added midPoint and updateMotion calculations 2018-11-24 12:47:19 +00:00
Richard Davey
0f97be3624 Restored pointer smoothing 2018-11-24 12:47:01 +00:00
Richard Davey
390f34c8d9 Removed test code 2018-11-24 12:46:49 +00:00
Richard Davey
51a9b3bd4a Recording positon tests 2018-11-23 19:06:59 +00:00
Richard Davey
21fa1960f3 Testing delta store 2018-11-23 19:06:47 +00:00
Richard Davey
b9fb1ddbf4 Added call to updateMotion 2018-11-23 18:58:13 +00:00
Richard Davey
1650857878 Removed debug tests 2018-11-23 16:26:49 +00:00
Richard Davey
370ccb6854 Removed debug properties. 2018-11-23 16:25:31 +00:00
Richard Davey
69a0dcc9cf Remove debug data. 2018-11-23 16:23:47 +00:00
Richard Davey
d6bee1bbd1 Working through event debugging - don't pull this version unless you want logs everywhere! 2018-11-22 17:18:31 +00:00
Richard Davey
7c00bd4dc8 Added Pointer.velocity and Pointer.angle as they're so common for gesture calculations. 2018-11-20 17:03:22 +00:00
Richard Davey
0c43da0211 Fixed jsdoc link, added smooth factor setter and updated transformPointer method. 2018-11-19 15:31:06 +00:00
Richard Davey
57084cb65e Added Pointer.smoothFactor property, and pass new boolean to input manager. 2018-11-19 15:30:42 +00:00
Richard Davey
578158cfcb Updated docs 2018-11-13 17:04:31 +00:00
Richard Davey
8de7973c92 Added new captures array. 2018-11-13 15:09:18 +00:00
Richard Davey
837cc4e86d Swapped hit area size detection priority 2018-11-12 23:19:49 +00:00
Richard Davey
696e3dc6b8 Prevent non-modified keys only 2018-11-12 23:01:30 +00:00
Richard Davey
d8b0bf7a29 Added metaKey support 2018-11-12 23:00:56 +00:00
Richard Davey
5f92b05fd7 Added game config keyboard capture flag for global preventDefault handling. 2018-11-12 22:22:12 +00:00
samme
7ff8d51f98 Docs for input and physics events 2018-10-24 12:14:44 -07:00
Richard Davey
37876f93ab
Merge pull request #4124 from wmateam/hotfix/forgotten-keycode
Add forgotten keycode and letters
2018-10-19 13:18:28 +01:00
Mohammad Javad Afkari
4b5d8d0878 + add forgotten keyCode (firefox in windows) 2018-10-19 11:42:57 +03:30
Richard Davey
c9b7ce3938 The Mouse Manager class has been updated to remove some commented out code and refine the startListeners method. 2018-10-18 22:04:41 +01:00
Mohammad Javad Afkari
0dfdeb1f92 + forgotten keyCode (firefox) 2018-10-18 22:44:24 +03:30
Richard Davey
557955e057 Merging Scale Manager and Spine Plugin back into master 2018-10-18 14:59:27 +01:00
Richard Davey
61008f4eda 3.15.1 Release 2018-10-16 16:24:43 +01:00
Richard Davey
8db61274f7 Swapping to American-English spelling for consistency
~sigh~ it looks so wrong
2018-10-16 15:23:36 +01:00
Richard Davey
c23f701456 The Touch Manager, Input Manager and Pointer classes all now handle the touchcancel event, such as triggered on iOS when activating an out of browser UI gesture, or in Facebook Instant Games when displaying an overlay ad. This should prevent issues with touch input becoming locked on iOS specifically. Fix #3756 2018-10-16 11:44:36 +01:00
Richard Davey
dab510f03d The Touch Manager has been rewritten to use declared functions for all touch event handlers, rather than bound functions. This means they will now clear properly when the TouchManager is shut down. 2018-10-16 11:44:15 +01:00
Richard Davey
8dff537b12 Added TOUCH_CANCEL constant. 2018-10-16 11:43:40 +01:00
Richard Davey
7daa8b9d45 Added touchcancel handler and wasCancelled property 2018-10-16 11:42:54 +01:00
Richard Davey
f29126c482 KeyboardPlugin.resetKeys is a new method that will reset the state of any Key object created by a Scene's Keyboard Plugin. 2018-10-16 11:35:44 +01:00
Richard Davey
4b1c762296 Updated @memberOf to @memberof 2018-10-10 10:49:13 +01:00
Richard Davey
1e7251ba97 Commented out resize, soon to be removed 2018-10-10 10:47:13 +01:00
Richard Davey
a9063604dc Replace @readOnly with @readonly 2018-10-09 13:40:00 +01:00
Richard Davey
b3f3f6a9b5 If a Game instance is destroyed without using the removeCanvas argument, it would throw exceptions in the MouseManager after the destroy process has run, as the event listeners were not unbound. They're not unbound, regardless of if the parent canvas is removed or not. Fix #4015 2018-10-01 12:55:54 +01:00
Richard Davey
e92a01985e If you destroyed a Game Object that had a custom cursor set during one of its input events the cursor didn't correctly reset. Fix #4033 2018-09-14 14:48:53 +01:00
Richard Davey
b1771a17dd Updated InputPlugin event specificity flow and added stopPropagation support 2018-09-12 12:38:08 +01:00
Richard Davey
4ba3b37608 Added Pointer.getDistance method 2018-09-12 01:03:56 +01:00
Richard Davey
e01013d418 Formatting 2018-09-12 01:03:41 +01:00
Richard Davey
2df27a4db8 Resolution adjust 2018-09-04 15:13:48 +01:00
Richard Davey
89967af66b Fixed Camera input resolution 2018-09-04 14:04:48 +01:00
Dhruv Yadav
0fd6d9d7dc Fixed a trailing spaces issue from the addKey(string) whitespace update 2018-08-30 21:58:54 +05:30
Dhruv Yadav
75319233f2 Styling updates for addKey(string) whitespace fix 2018-08-30 21:53:19 +05:30
Dhruv Yadav
f29892b73f Fixed addKeys(string) whitespace issue 2018-08-30 21:36:36 +05:30
Richard Davey
0c4de357cf The Input Manager has gained a new private property _tempMatrix2. This is used internally in the hitTest checks to avoid constant matrix creation. 2018-08-29 16:08:04 +01:00
Richard Davey
5c091f4ff9 Merge branch 'master' of https://github.com/photonstorm/phaser 2018-08-29 11:57:33 +01:00
Richard Davey
7041bd99ec The InputManager.inputCandidate method, which determines if a Game Object can be interacted with by a given Pointer and Camera combination, now takes the full camera status into consideration. This means if a Camera is set to ignore a Game Object you can now longer interact with it, or if the Camera is ignoring a Container with an interactive Game Object inside it, you cannot interact with the Container children any more. Previously they would interact regardless of the Camera state. Fix #3984 2018-08-29 11:57:30 +01:00
spontoreau
e922f378f4
Add CursorKeys type to Phaser.Input.Keyboard namespace 2018-08-26 22:28:21 +02:00
Richard Davey
6efb88b24b
Merge pull request #3900 from thejonanshow/upgrade_konami_code
Correct Konami code in createCombo documentation.
2018-08-20 18:30:18 +01:00
James Simpson
e4ccc8ec2d
Use correct frame name in pixel perfect hit test
`gameObject.frame.key` doesn't exist and was passing an undefined value to `getPixelAlpha`. This just changes it to the correct `gameObject.frame.name` value.
2018-08-16 12:23:10 -05:00
Jonan Scheffler
7c525b00fa Correct Konami code in createCombo documentation. 2018-08-07 14:25:48 -07:00
Richard Davey
5aafad5f88 Don't process events if the manager has been removed 2018-07-31 11:33:18 +01:00
Richard Davey
6a3274b483 Removed redundant code 2018-07-19 13:21:59 +01:00
Richard Davey
20f1b37256 eslint fix and log update 2018-07-18 15:06:56 +01:00
Richard Davey
3bc6eba718 Removed incorrect resolution multiplication and used updated camera viewport 2018-07-18 14:31:45 +01:00
Richard Davey
fb4f28bb01 Testing resolution input 2018-07-17 23:26:40 +01:00
Richard Davey
61954dedcb Added checkDown method and related properties. 2018-07-13 11:13:32 +01:00
Richard Davey
cced09bad6 Added Pointer.prevPosition and getInterpolatedPosition method 2018-07-11 12:34:00 +01:00
Richard Davey
88eb4f4ce9 The Pointer.camera property would only be set if there was a viable Game Object in the camera view. Now it is set regardless, to always be the Camera the Pointer interacted with. 2018-06-27 12:45:03 +01:00
Richard Davey
7aa46657c2 Tidying up jsdocs and changing float to number 2018-06-26 23:19:14 +01:00
Hua
821504a893 Skip drag checking on a draging Game Object
Skip drag checking on a draging Game Object to prevent multi-drag issue.
2018-06-19 10:33:22 +08:00
Richard Davey
6456ef10a6 Touch pointer total fix
The InputManager would only create 1 Pointer, even if Touch input was enabled in the config, which meant you couldn't use touch events unless you first called `addPointer` or specified one in the config. Now, it Touch is enabled in the config, it'll always create 2 pointers by default.
2018-06-13 13:51:04 +01:00
Richard Davey
9d52b6ac91 Fixed jsdoc errors 2018-06-12 17:05:39 +01:00
Richard Davey
d6c2b1104b Replace KeyboardManager with KeyboardPlugin 2018-06-12 14:44:51 +01:00
Richard Davey
d058674a39 eslint fix 2018-06-11 14:42:50 +01:00
Richard Davey
f26bd913e9 Disable Camera.cull because #3679 excludes everything in view (and reverting it includes everything, so no point even culling atm) 2018-06-11 14:04:15 +01:00
Richard Davey
5313343730 Pointers capped at 10 max. 2018-06-11 13:39:28 +01:00
Richard Davey
dfce514024 Fixed docs and added useHandCursor helper. 2018-06-11 11:50:37 +01:00
Richard Davey
c74c1cbb32 Added setDefaultCursor method and custom css cursor handling. 2018-06-11 11:36:02 +01:00
Richard Davey
da436b0ce7 Added custom cursor property 2018-06-11 11:35:40 +01:00
Richard Davey
5c7e624260 setInteractive will now take a configuration object as the only argument, allowing for easier setting of more complex input values 2018-06-11 11:35:31 +01:00
Richard Davey
5889737183 Preparing for cursor change support 2018-06-08 19:04:12 +01:00
Richard Davey
44569fe20c Added useHandCursor boolean 2018-06-08 19:04:01 +01:00
Richard Davey
140e743a8d Added docs and fixed lint issue 2018-06-08 18:24:08 +01:00
Richard Davey
4304811dde Added new Pixel Perfect input handler and makePixelPerfect method. 2018-06-08 17:50:47 +01:00
Richard Davey
87c950a5ea Fixed jsdocs 2018-06-08 16:18:39 +01:00
Richard Davey
529442f134 Only install the plugin if set in Scene settings / Game Config 2018-06-08 16:18:32 +01:00
Richard Davey
8148b14cc3 Removed references to the Gamepad 2018-06-08 16:18:20 +01:00
Richard Davey
680d34b3c4 Convert Gamepad Manager to an Input Plugin 2018-06-08 16:17:58 +01:00
Richard Davey
02554984fe Removed KeyboardManager and replaced with KeyboardPlugin
The `KeyboardManager` class has been removed. It has been replaced with `KeyboardPlugin` which is now an Input level plugin, that registers itself with the new `InputPluginCache`. The Input Plugin class (which belongs to a Scene) will now automatically inject registered plugins into itself on boot. Every Scene has its own instance of the Input Plugin (if enabled in the scene plugins), which in turn has its own instance of the KeyboardPlugin. The `InputManager` no longer has any reference to the Keyboard class at all. The benefits of this are two-fold: First, it allows you to now entirely exclude all of the keyboard classes from a custom build, saving a lot of space if not required. Secondly, it means that the Scenes themselves are now responsible for keyboard events, where-as before they were entirely global. This means a Scene can be paused and stop processing keyboard events, and stop having its Key objects updated, while another Scene can still carry on doing this. It also prevents key related callbacks in sleeping Scenes from being fired (which resolves issue #3733, thanks @JoeMoov2)
2018-06-08 15:16:35 +01:00
Richard Davey
11c5c35149 The new Input Plugin cache 2018-06-08 15:15:36 +01:00
Richard Davey
fc0069d9da Removed all references to keyboard 2018-06-08 15:15:21 +01:00
Chris Andrew
f8ee35d46a Fixed Gamepad lint errors, tweaked some Graphics docs. 2018-06-07 18:36:27 +01:00
Richard Davey
5f1fff6d48 Merge branch 'master' of https://github.com/photonstorm/phaser 2018-06-07 16:36:36 +01:00
Richard Davey
cfa436f158 Added new methods 2018-06-07 16:36:32 +01:00
Chris Andrew
8d926754cb Fixed lint issues in Gamepad and GamepadManager. 2018-06-07 16:04:27 +01:00
Richard Davey
0180a684ca Added leftStick and rightStick properties and shoulder buttons 2018-06-07 14:30:16 +01:00
Richard Davey
aa8d207485 Recoded gamepad event flow, moved to direct handlers, exposed first 4 pads, added full docs 2018-06-06 23:05:10 +01:00
Richard Davey
4c4a415dc3 Added docs, axis and button getters 2018-06-06 23:04:38 +01:00
Richard Davey
1518551c43 Added docs, destroy method, and updated update 2018-06-06 23:04:11 +01:00
Richard Davey
12b6825854 Added docs and destroy method 2018-06-06 23:03:59 +01:00
Richard Davey
b18183fb9f Added docs 2018-06-06 23:03:44 +01:00
Richard Davey
a2c20a9aa7 lint fixes 2018-06-05 01:08:32 +01:00
Richard Davey
8b7256cb86 Pointers now iterate the full camera list, starting at the top. Fix #3631. 2018-06-04 22:14:58 +01:00
Richard Davey
719a2eedca Interactive Objects inside of Containers would still fire their input events even if the Container (or any ancestor) was set to be invisible. Objects now check their ancestor tree during the input cull and now properly skip input events if not visible. Fix #3620 2018-06-04 21:04:27 +01:00
Richard Davey
f411edf987 Added jsdocs. 2018-06-04 17:11:53 +01:00
Richard Davey
c847f3459e addKey and removeKey can take Key objects now. Plus finished the docs. 2018-06-04 17:03:31 +01:00
Richard Davey
7a01354a8a Added to the docs 2018-06-04 16:49:11 +01:00
Richard Davey
97fa3ab2c0 KeyboardManager.addKeys can now take either an object or key codes, or a comma-separated string, as its input. 2018-06-04 16:49:03 +01:00
Richard Davey
9eec66654f Keyboard Manager updates
* KeyboardManager.handler has been removed as it's no longer used internally.
* The KeyboardManager.captures property has been removed as it can be more effectively handled by polling the `keys` object instead.
* The Keyboard Manager will no longer process key down or up events if its `enabled` property is set to false.
* The Keyboard Manager will now call `event.preventDefault` on the native DOM event as long as the Key exists in the keys array and has its `preventDefault` property set to `true` (which is the default). This means you can now control specifically which key prevents default on the browser, where-as before every key added did so.
2018-06-04 15:57:52 +01:00
Richard Davey
f280fb118b Typo fix 2018-06-04 15:57:41 +01:00
Richard Davey
6906e6bd15 Hundreds more jsdocs completed. 2018-06-04 15:19:25 +01:00
Richard Davey
61c5f76d63 Added transformPointer method which Pointer now uses. 2018-06-04 15:19:11 +01:00
Richard Davey
3b30fcff89 Added jsdocs 2018-06-04 13:24:47 +01:00
Richard Davey
7c0c3cd5a8 Updated hitTest call and added jsdocs 2018-06-04 13:23:51 +01:00
Richard Davey
4115b10c80 Added jsdocs 2018-06-04 13:23:34 +01:00
Richard Davey
285b811625 Pointer has two new properties worldX and worldY which contain the position of the Pointer, translated into the coordinate space of the most recent Camera it interacted with. 2018-06-04 13:23:27 +01:00
Chris Andrew
fd715f9a34 Fixed lint error in InputManager.update(). 2018-05-31 15:19:35 +01:00
Richard Davey
594fc3e27b Added new dom callback support, streamlined the event flow, moved to consts 2018-05-30 00:33:51 +01:00
Richard Davey
f79ee26945 Proxy to the dom callback methods 2018-05-30 00:33:28 +01:00
Richard Davey
bdc95217ae Calls new manager queue methods 2018-05-30 00:33:16 +01:00
Richard Davey
5db2bf5cbd Moved the event switch block from strings to consts 2018-05-30 00:32:45 +01:00
Richard Davey
45c373f9f4 Multi-touch support working properly up to 10 pointers and mouse re-enabled. 2018-05-29 16:55:52 +01:00
Richard Davey
57e32761df Started work on multi-touch support. 2018-05-25 19:28:18 +01:00
Richard Davey
20d702c011 Added identifier properties for multi-touch 2018-05-25 19:28:02 +01:00
Richard Davey
700a26a196 Input systems listen to Input Manager events rathern than being directly hooked in 2018-05-25 19:27:26 +01:00
Richard Davey
57c2ccbf5e Formatting fix and doc update 2018-05-24 14:03:29 +01:00
Richard Davey
37f75fd233
Merge pull request #3675 from tjb295/master
Bug: #3645 issue with clearing GameObjects from this._list. Called qu…
2018-05-24 13:51:55 +01:00
Richard Davey
8aa116ca4b The dragend event would be broadcast even if the drag distance or drag time thresholds were not met. Fix #3686 2018-05-22 21:24:50 +01:00
Thomas Back
67b2cea130 Bug: #3645 issue with clearing GameObjects from this._list. Called queueForRemoval() from the clear function in inputPlugin.js, since this.clear(Gameobject) called again in preupdate when removed from this._list, checked the case for if GameObject.input already set to null properties 2018-05-18 10:33:43 -07:00
Richard Davey
4c1703768d Docs update 2018-05-18 17:37:20 +01:00
Richard Davey
ef2b8d68b6 setInteractive now works on non-zero sized Containers. Sorting fixed. 2018-05-18 12:48:12 +01:00
Richard Davey
2f4358fed4 The keycodes for 0 to 9 on the numeric keypad have been added. You can now use them in events 2018-05-15 15:57:26 +01:00
Richard Davey
350cb037b7 All systems now register themselves with the new PluginCache 2018-05-15 12:51:50 +01:00
Richard Davey
d595da49fd Now use the prestep event to update instead 2018-05-11 01:50:02 +01:00
Richard Davey
be330e609e Moved PluginManager to new location 2018-05-10 17:14:33 +01:00
Richard Davey
349a95bc4b Updating to 3.6.0 2018-04-19 14:45:45 +01:00
Richard Davey
895c9f9694 Missing module fix 2018-04-19 12:39:28 +01:00
Richard Davey
32ce8d7947 jsdoc fixes and removed un-used ResetKey file. 2018-04-19 12:30:38 +01:00
Richard Davey
55965c748f jsdoc fixes 2018-04-18 12:13:49 +01:00
Richard Davey
1be486fab4 destroy only called once, no matter how many times the Scene restarts. Fix #3581 2018-04-17 12:25:45 +01:00
Richard Davey
07a55e5d1f Removed debug call and merged Scene Systems boot and start sequences. Fix #3579 2018-04-17 02:34:07 +01:00
Richard Davey
18585de81d Lots of jsdoc fixes 2018-04-16 14:43:24 +01:00
Richard Davey
ce7d67297f Moving from 3.4.1 to 3.5.0 so we can release new camera fx and scene transitions 2018-04-15 12:44:47 +01:00
Richard Davey
b5ba6a6afb Added enabled property 2018-04-14 04:23:11 +01:00
Richard Davey
6b2307594a Scene plugin flow overhaul
Every Plugin has been updated to correctly follow the same flow through the Scene lifecycle. Instead of listening for the Scene 'boot' event, which is only dispatched once (when the Scene is first created), they will now listen for the Scene 'start' event, which occurs every time the Scene is started. All plugins now consistently follow the same Shutdown and Destroy patterns too, meaning they tidy-up after themselves on a shutdown, not just a destroy. Overall, this change means that there should be less issues when returning to previously closed Scenes, as the plugins will restart themselves properly.
2018-04-13 17:12:17 +01:00
Richard Davey
5612336d47 Containers flag 2018-04-12 22:46:46 +01:00
Richard Davey
2e722b0a92 debugging tests 2018-04-12 16:28:14 +01:00
Richard Davey
ad4109aece Updated sortHandlerGO to handle any depth containers. 2018-04-12 02:11:40 +01:00
Richard Davey
60cd5ab22b Tighter dropzone test and container warning 2018-04-11 11:25:31 +01:00
Richard Davey
04990d6870 Input checks for container parents 2018-04-09 16:42:51 +01:00
Christian Panadero
c08f769351 Add keyboardManaged#createCursorKeys typedefs 2018-04-06 18:17:58 +01:00
José Maria
100eafe1a4
fix drag/overlap interaction
changes: when dragend resets draglist. 
this fixes overoutevents from a gameobject not firing after being drag.
2018-04-04 18:09:18 -03:00
Richard Davey
c251eceaf6 jsdoc fixes 2018-04-04 14:43:53 +01:00
Richard Davey
11512e1db2 Keyboard.JustDown and Keyboard.JustUp were being reset too early, causing them to fail when called in update loops. Fix #3490 2018-04-03 16:33:13 +01:00
Richard Davey
316da3f2d9 jsdocs update. Fix #3477 2018-04-03 14:08:22 +01:00
Richard Davey
2a35a20fcb Swapped for enum 2018-03-30 14:16:42 +01:00
Richard Davey
a86fc19d3c jsdoc fix 2018-03-30 14:12:09 +01:00
Richard Davey
71045265ae The Gamepad Axis getValue method now correctly applies the threshold and zeroes out the returned value. 2018-03-30 12:33:45 +01:00
Richard Davey
88a228e226 jsdoc fix 2018-03-30 12:33:31 +01:00
Richard Davey
f6167f6fcf The GamepadManager now extends EventEmitter directly, just like the KeyboardManager does. 2018-03-30 12:03:06 +01:00
Richard Davey
19f7e2589a jsdoc fix 2018-03-30 12:02:08 +01:00
Richard Davey
91008232ad jsdoc fixes 2018-03-29 13:12:07 +01:00
Richard Davey
747f09af86 jsdoc fixes 2018-03-28 15:04:09 +01:00
Richard Davey
2b533d9870 Renamed file 2018-03-28 15:03:54 +01:00
orblazer
d0e1320cbe Add generic types and fix types on Input and Structs 2018-03-27 15:59:49 +02:00
Richard Davey
0ef92e1172 Merge branch 'pr/3439' 2018-03-21 16:06:56 +00:00
orblazer
439df07fd5 Fix "object" type on GameObjects and Input 2018-03-21 12:19:31 +01:00
Richard Davey
db613c793a Merge branch 'master' of https://github.com/photonstorm/phaser 2018-03-21 03:17:00 +00:00
Richard Davey
8a3f06c898 Todo note 2018-03-21 03:16:55 +00:00
orblazer
7fba122321 Fix "any" types 2018-03-20 17:15:49 +01:00
orblazer
dca7996179 Fix multiple types on Physics, Texture and Input 2018-03-20 16:10:19 +01:00
orblazer
b4a30b8e43 Add callbacks on GameObjects 2018-03-19 22:27:16 +01:00
orblazer
41d7c4b715 Add callbacks on Input and Geom 2018-03-19 22:12:11 +01:00
Richard Davey
d0d05fa76e Added descriptions and fixed some types 2018-03-19 13:22:30 +00:00
orblazer
0b1078fdb8 Update JSDoc on Input 2018-03-19 13:43:19 +01:00
Richard Davey
cc0998660e Updated jsdocs 2018-03-18 13:43:37 +00:00
Richard Davey
b6b03b85bd The InputPlugin.processOverOutEvents method wasn't correctly working out the total of the number of objects interacted with, which caused input events to be disabled in Scenes further down the scene list if something was being dragged in an upper scene. Fix #3399 2018-03-16 14:57:19 +00:00
Richard Davey
ee1e4f1e90 InputManager.hitTest will now factor the game resolution into account, stopping the tests from being offset if resolution didn't equal 1. #3376 2018-03-16 12:49:02 +00:00
Richard Davey
77357dbde0 jsdoc fix #3377 2018-03-16 12:39:39 +00:00
José Maria
128691b50d
set default gamepad button threshold to 1
this.threshold = 0  was making all gamepad buttons to be always pressed down (this.pressed = true). 
this.threshold = 1 will correct the issue and in the case of analogue buttons it will only emit the event when the 'pressure' is at max.
2018-03-12 14:04:04 -03:00
Richard Davey
f94ad4bbc6 InputPlugin.update now takes the totals from the drag and pointerup events into consideration when deciding to fall through to the Scene below. Fix #3333 2018-03-05 21:49:00 +00:00
Richard Davey
af212a1837
Merge pull request #3279 from squaresun/master
Fix KeyboardManager keydown events keeps firing
2018-03-05 12:21:39 +00:00
Richard Davey
4d16b0c00a eslint fixes 2018-03-05 01:45:28 +00:00
Richard Davey
1f8d0c80f9 Fixed array access 2018-03-01 04:13:30 +00:00
Richard Davey
acc4922027 Fixes to the InputPlugin re: drop zones and addition of setInteractive argument. 2018-03-01 02:46:17 +00:00
Richard Davey
550e53b81b Fixed InputManager.updateBounds so it factors in the document element position.
Also added `InputManager.resize` method, as the scale wouldn't ever be updated in the update loop if no interactive objects exist.
2018-02-28 14:27:28 +00:00
dominic
af7d619dc3 Simplify global key down emit check 2018-02-25 21:16:05 +08:00
squaresun
9af8cdcea6 Fix key.repeats not increased when key holding down 2018-02-25 21:03:58 +08:00
squaresun
c5514bcab7 Fix KeyboardManager keydown events keeps firing #3239 2018-02-24 18:20:36 +08:00
Richard Davey
b57ab091c1 The KeyCode FORWAD_SLASH had a typo and has been changed to FORWAD_SLASH. Fix #3271 (thanks @josedarioxyz) 2018-02-22 01:59:32 +00:00
Richard Davey
50dac412be eslint fixes and console removal 2018-02-16 19:08:50 +00:00