You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26-19Lines changed: 26 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,28 +4,33 @@
4
4
5
5
### Input System Changes
6
6
7
-
* Removed the `inputQueue` Game config property
8
-
* Removed the `InputManager.useQueue` property
9
-
* Removed the `_hasUpCallback`, `_hasDownCallback` and `_hasMoveCallback` properties from the Input Manager
10
-
* Removed the following Input Manager methods and properties: `processDomCallbacks`, `addDownCallback`, `addUpCallback`, `addMoveCallback`, `queue`, `domCallbacks`, `addDownCallback`, `addUpCallback` and `addMoveCallback`
11
-
*Cursors are now set and reset immediately on the canvas, leading to the removal of `_setCursor` and `_customCursor` properties
12
-
* The Input Manager bo longer listens for: `GameEvents.POST_STEP`as it's not required
7
+
The old 'input queue' legacy system, which was deprecated in 3.16, has been removed entirely in order to tidy-up the API and keep input events consistent. This means the following changes:
8
+
9
+
* Removed the `inputQueue` Game config property.
10
+
* Removed the `useQueue`, `queue` and `_updatedThisFrame` properties from the Input Manager.
11
+
*Removed the `legacyUpdate` and `update` methods from the Input Manager.
12
+
* The Input Manager no longer listens for the `GameEvents.POST_STEP`event. Processing has been moved to a `GameEvents.POST_RENDER` event handler.
13
13
14
-
Document the following:
14
+
As a result, all of the following Input Manager methods have been renamed:
15
15
16
-
remove InputManager#_updatedThisFrame ?
16
+
*`queueTouchStart` is now called `onTouchStart` and invoked by the Touch Manager.
17
+
*`queueTouchMove` is now called `onTouchMove` and invoked by the Touch Manager.
18
+
*`queueTouchEnd` is now called `onTouchEnd` and invoked by the Touch Manager.
19
+
*`queueTouchCancel` is now called `onTouchCancel` and invoked by the Touch Manager.
20
+
*`queueMouseDown` is now called `onMouseDown` and invoked by the Mouse Manager.
21
+
*`queueMouseMove` is now called `onMouseMove` and invoked by the Mouse Manager.
22
+
*`queueMouseUp` is now called `onMouseUp` and invoked by the Mouse Manager.
17
23
18
-
// These methods also no longer check 'enabled' (the handler does that)
19
-
queueTouchStart = onTouchStart
20
-
queueTouchMove = onTouchMove
21
-
queueTouchEnd = onTouchEnd
22
-
queueTouchCancel = onTouchCancel
23
-
queueMouseDown = onMouseDown
24
-
queueMouseMove = onMouseMove
25
-
queueMouseUp = onMouseUp
24
+
Each of these handlers used to check the `enabled` state of the Input Manager, but this now handled directly in the Touch and Mouse Managers instead, leading to less branching and cleaner tests.
26
25
27
-
plugin - old = update, new = pluginUpdate
28
-
manager - old = legacyUpdate, new = update (BOTH removed!)
26
+
Because the legacy queue mode is gone, there is no longer any need for the DOM Callbacks:
27
+
28
+
* Removed the `_hasUpCallback`, `_hasDownCallback` and `_hasMoveCallback` properties from the Input Manager
29
+
* Removed the `processDomCallbacks`, `addDownCallback`, `addUpCallback`, `addMoveCallback`, `domCallbacks`, `addDownCallback`, `addUpCallback` and `addMoveCallback` methods.
30
+
31
+
Also, CSS cursors can now be set directly:
32
+
33
+
* Cursors are now set and reset immediately on the canvas, leading to the removal of `_setCursor` and `_customCursor` properties.
29
34
30
35
Pointer.lastAction
31
36
Pointer calls reset itself
@@ -43,6 +48,8 @@ Pointer calls reset itself
43
48
* The default `BaseShader` vertex shader will now set the `fragCoord` varying to be the Game Object height minus the y inPosition. This will give the correct y axis in the fragment shader, causing 'inverted' shaders to display normally when using the default vertex code.
44
49
* There was some test code left in the `DOMElementCSSRenderer` file that caused `getBoundingClientRect` to be called every render. This has been removed, which increases performance significantly for DOM heavy games.
45
50
* The `TimeStep` will no longer set its `frame` property to zero in the `resetDelta` method. Instead, this property is incremented every step, no matter what, giving an accurate indication of exactly which frame something happened on internally.
51
+
* The `TimeStep.step` method no longer uses the time value passed to the raf callback, as it's not actually the current point in time, but rather the time that the main thread began at. Which doesn't help if we're comparing it to event timestamps.
52
+
*`TimeStep.now` is a new property that holds the exact `performance.now` value, as set at the start of the current game step.
46
53
47
54
### Bug Fixes
48
55
@@ -51,7 +58,7 @@ Pointer calls reset itself
51
58
* The `CameraManager` would incorrectly destroy the `default` Camera in its shutdown method, meaning that if you used a fixed mask camera and stopped then resumed a Scene, the masks would stop working. The default camera is now destroyed only in the `destroy` method. Fix #4520 (thanks @telinc1)
52
59
* Passing a Frame object to `Bob.setFrame` would fail, as it expected a string or integer. It now checks the type of object, and if a Frame it checks to make sure it's a Frame belonging to the parent Blitter's texture, and if so sets it. Fix #4516 (thanks @NokFrt)
53
60
* The ScaleManager full screen call had an arrow function in it. Despite being within a conditional block of code it still broke really old browsers like IE11, so has been removed. Fix #4530 (thanks @jorbascrumps@CNDW)
54
-
61
+
*`Game.getTime` would return `NaN` because it incorrectly accessed the time value from the TimeStep.
0 commit comments