Richard Davey
1d1c4e6543
Removed all input queue elements
2019-05-23 17:19:03 +01:00
Richard Davey
186887c920
Added lastAction property and self-invoke the reset method
2019-05-23 17:18:49 +01:00
Richard Davey
81c1ced2c1
Event Managers now have clearer handlers that check enabled directly
2019-05-23 17:18:16 +01:00
Richard Davey
c91ed91ce3
License link update
2019-05-10 16:15:04 +01:00
Richard Davey
1dca2c2c8a
Scenes Types
2019-05-09 12:37:37 +01:00
Richard Davey
53ac066d25
More Input Types
2019-05-09 12:03:36 +01:00
Richard Davey
290389c4ae
Input Types
2019-05-09 12:02:03 +01:00
Richard Davey
95eb4fc03d
Setting pixelPerfect
when input enabling a Container would cause it to crash, because Container's don't have a texture to check. It will now throw a run-time warning and skip the Container for input. You should use a custom input callback instead. Fix #4492
2019-04-26 10:56:06 +01:00
Richard Davey
64532d8d7b
InputPlugin.clear
has a new argument skipQueue
which is used to avoid clearing a Game Object twice. This, combined with the fix for 4463 means you will no longer get a Cannot read property 'dragState'
error if you destroy a Game Object enabled for drag where another draggable object exists. Fix #4228
2019-04-24 13:38:40 +01:00
Richard Davey
00dbf8b03e
Destroying a Game object during its pointerup
event handler on a touch device will no longer cause Uncaught TypeError: Cannot read property 'localX' of undefined
. All InputPlugin process handlers now check to see if the Game Object has been destroyed at any stage and abort if it has. Fix #4463
2019-04-24 12:54:56 +01:00
Richard Davey
507bb6a215
Added customHitArea boolean property
2019-04-24 11:21:52 +01:00
Richard Davey
2ef6ad3e51
Fixed jsdoc
2019-04-24 10:54:02 +01:00
Richard Davey
181be88ba9
Updated to use game clock time values.
2019-04-24 10:48:03 +01:00
Richard Davey
6b5383a007
Key now needs a reference to the plugin that created it. Also added getDuration
method.
2019-04-24 10:47:51 +01:00
Richard Davey
d7917789eb
Added destroy argument to removeKey
and cleared plugin reference.
2019-04-24 10:47:22 +01:00
Richard Davey
fd4f45673b
Pointer.getDuration
would only return zero until the pointer was released, or moved (basically any action that generated a DOM event). It now returns the duration regardless of the DOM events. Fix #4444
2019-04-24 10:08:56 +01:00
Richard Davey
31c0b4f2ff
Update now always runs but only once per frame
2019-04-24 10:04:13 +01:00
Richard Davey
95b18ae6e0
Refined poll rate handling and added pluginUpdate
2019-04-24 10:03:58 +01:00
Richard Davey
43c72e23c6
Fixed issue with input events running twice
2019-04-24 09:34:40 +01:00
Richard Davey
e0255c6f0f
Docs fix
2019-04-16 17:08:19 +01:00
Richard Davey
0cfbc7917e
The InputPlugin will now dispatch an update event regardless, allowing the Gamepad Plugin to update itself every frame, regardless of DOM events. This allows Gamepads to work correctly again. Fix #4414
2019-04-08 14:39:28 +01:00
Richard Davey
0ee2442597
Bumping to 3.17.0
2019-03-07 12:31:06 +00:00
Richard Davey
341e78ce0d
Added touch Window handlers and remove handlers
2019-02-22 02:26:52 +00:00
Richard Davey
c90ae09f9f
Added window specific handlers
...
And game config option:
```
input: {
windowEvents: false
},
```
2019-02-22 02:11:13 +00:00
Richard Davey
0db663d901
More typedefs
2019-02-13 15:38:50 +00:00
Richard Davey
3938675d9f
Input typedefs
2019-02-13 14:17:36 +00:00
Richard Davey
c8439393fb
Much better keycode jsdoc handling.
2019-02-12 12:51:43 +00:00
Richard Davey
dc73993fe2
Added jsdoc version numbers
2019-02-12 12:22:25 +00:00
Richard Davey
ccaae460a4
Added jsdoc version numbers to each event
2019-02-12 11:37:58 +00:00
Richard Davey
3104246386
Merge pull request #4347 from rgk/patch-5
...
On mobile, have pointerup and pointerout get triggered together.
2019-02-10 21:17:24 +00:00
Richard Davey
f3f65d1437
Refactored the game over and out handling to work with the non-legacy input system. Fix #4344
2019-02-10 17:10:13 +00:00
Robert Kowalski
6105c1a9b2
Emit pointerout always after pointerup on touch.
...
Now pointerout will always emit after pointerup.
2019-02-08 09:33:25 -05:00
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