Return to the Change Log index.
There are breaking changes from previous versions of Phaser.
InteractiveObject.alwaysEnabled
property has been removed. It is no longer checked within the InputPlugin
and setting it will have no effect. This property has not worked correctly since version 3.52 when the new render list was implemented. Upon further investigation we decided to remove the property entirely, rather than shoe-horn it into the render list. If you need to create a non-rendering Interactive area, use the Zone Game Object instead.InputPlugin.resetPointers
is a new method that will loop through all of the Input Manager Pointer instances and reset them all. This is useful if a 3rd party component, such as Vue, has stolen input from Phaser and you need to reset its input state again.Pointer.reset
is a new method that will reset a Pointer instance back to its 'factory' settings.KeyboardPlugin.removeKey
method has a new optional parameter removeCapture
. This will remove any keyboard capture events for the given Key. Fix #5693 (thanks @cyantree)KeyboardPlugin.removeAllKeys
method has a new optional parameter removeCapture
. This will remove any keyboard capture events for all of the Keys owned by the plugin.Scenes.Systems.canInput
is a new internal method that determines if a Scene can receive Input events, or not. This is now used by the InputPlugin
instead of the previous isActive
test. This allows a Scene to emit and handle input events even when it is running init
or preload
. Previously, it could only do this after create
had finished running. Fix #6123 (thanks @yaasinhamidi)hitArea
parameter of the GameObjects.Zone.setDropZone
method is now optional and if not given it will try to create a hit area based on the size of the Zone Game Object (thanks @rexrainbow)TouchManager.onTouchOver
and onTouchOut
have been removed, along with all of their related event calls as they're not used by any browser any more.TouchManager.isTop
is a new property, copied from the MouseManager, that retains if the window the touch is interacting with is the top one, or not.InputManager.onTouchMove
method will now check if the changed touch is over the canvas, or not, via the DOM elementFromPoint
function. This means if the touch leaves the canvas, it will now trigger the GAME_OUT
and GAME_OVER
events, where-as before this would only happen for a Mouse. If the touch isn't over the canvas, no Pointer touch move happens, just like with the mouse. Fix #5592 (thanks @rexrainbow)disableContextMenu
function, but instead now uses the MouseManager / TouchManager targets, which if not specified defaults to the game canvas (thanks @lukashass)Key.reset
method no longer resets the Key.enabled
or Key.preventDefault
booleans back to true
again, but only resets the state of the Key. Fix #6098 (thanks @descodifica)gameObject.hitAreaDebug.strokeColor
in real-time (thanks @spayton)InputPlugin.clear
it will now call removeDebug
on the Game Object, making sure it clears up any Input Debug Graphics left in the Scene. Fix #6137 (thanks @spayton)Input.Touch.TouchManager.stopListeners
forgot to remove the touchcancel
handler. This is now removed correctly (thanks @teng-z)Uncaught TypeError: Cannot read properties of undefined (reading 'renderList')
if multiple children existed in the pointer-out array. Fix #5867 #5699 (thanks @rexrainbow @lyger)InputPlugin.disable
will now also reset the drag state of the Game Object as well as remove it from all of the internal temporary arrays. This fixes issues where if you disabled a Game Object for input during an input event it would still remain in the temporary internal arrays. This method now also returns the Input Plugin, to match enable
. Fix #5828 (thank @natureofcode @thewaver)Return to the Change Log index.
📖 Read the Phaser 3 API Docs 💻 Browse 2000+ Code Examples 🤝 Join the awesome Phaser Discord
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )