This is point release primarily fixes a few important issues that surfaced in 3.16.0.
The following changes all effect the Matter JS Pointer Constraint class:
DRAG_START
which is emitted by a Pointer Constraint when it starts dragging a body. Listen for this event from the Matter World instance.DRAG
which is emitted by a Pointer Constraint as it drags a body. Listen for this event from the Matter World instance.DRAG_END
which is emitted by a Pointer Constraint when it stops dragging a body. Listen for this event from the Matter World instance.camera
property can no longer be set in the config object. Instead it is set every time the Pointer is pressed down on a Body, this resolves issues where you have a multi-camera Scene and want to drag a body in the non-main camera.body
is a new property that holds a reference to the Body being dragged, if any.part
is a new property that holds a reference to the Body part that was clicked on which started the drag.getBodyPart
method has been renamed to hitTestBody
to more accurately reflect what it does.up
event, instead of tracks the active pointer and waits for that to be released. This has reduced the complexity and size of the update
method considerably.stopDrag
is a new method that allows you to manually stop an object being dragged, even if the pointer isn't released.TileSprite.setTileScale
has been updated so that the y
argument is optional and set to match the x
argument, like setScale
elsewhere in the API.InputManager.time
is a new property that holds the most recent time it was updated from the Game step, which plugins can access.InputManager.preStep
is a new method that populates some internal properties every step.KeyboardPlugin.time
has moved from being a property to being a getter, which returns the time from the InputManager.scale
property has been added to the Scene
class (thanks @strangeweekend)Matter.World.remove
now uses the Composite.remove
method internally. Previously, it used Composite.removeBody
which only allowed it to remove bodies from the simulation. Now, it can remove any type of Matter object.POINTER_OUT
event if they leave the game (i.e. are released), where-as before they would only trigger the POINTER_UP
event. Now, both happen (thanks @rgk)Mesh.setAlpha
method has been restored, even though it's empty and does nothing, to prevent runtime errors when adding a Mesh or Quad object to a Container. Fix #4338 #4343 (thanks @pfdtravalmatic @charmingny)KeyboardPlugin.checkDown
would always fail if using the new event system, because the time value it was checking wasn't updated.Fullscreen
mode in the Scale Manager and then pressing ESC would leave the injected fullsceen div in the DOM, causing it to throw a node insertion failure the second time you wanted to enter fullscreen mode. Fix #4352 (thanks @ngdevr)GAME_OUT
event would never fire unless the input system was in legacy mode. The OUT and OVER handlers have been refactored and will now fire as soon as the DOM event happens. As a result the InputManager._emitIsOverEvent
property has been removed, as the native event is sent directly to the handler and doesn't need storing locally any more. Fix #4344 (thanks @RademCZ)Zone.setBlendMode
method as a NOOP function, fixing a bug where if you added a Zone to a Container when running under Canvas it would fail. Fix #4295 (thanks @emanuel15)My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
@maretana @CipSoft-Components @brian-lui
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )