phaser icon indicating copy to clipboard operation
phaser copied to clipboard

Angle and rotation animations with tweens and scene update are smoother in 3.60 than 3.80

Open AlbertMontagutCasero opened this issue 2 months ago • 2 comments

Version

  • Phaser Version: 3.80.1
  • Operating system: MacOs Ventura 13.4.1 (22F82), Windows 11, Windows 10
  • Browser: Chrome

Description

We are using Phaser for our company, and since we updated to 3.80.1 from 3.60.0, we are experiencing some issues with rotation tweens. It seems 3.60 is smoother than 3.80.1. 3.80.1 makes the image look like it is shaking. We tried using a tween to modify the angle property, the rotation property with radians, and even rotating the asset in the update scene method. This issue is preventing us from using 3.80.1.

Example Test Code

To help solving the issue, we created some playgrounds using the new and awesome sanbox you provided us. 3.80.1 https://phaser.io/sandbox/XAvevLsV
3.60.0 https://phaser.io/sandbox/e2MTaqd7 These are the examples using tweens, but can also be reproduced with the scene update.

Additional Information

To help illustrate the issue, I added a video showing how 3.80.1 shakes and 3.60.0 is smoother. https://github.com/phaserjs/phaser/assets/23361386/edf5d16c-77c9-43b4-b67e-458b79a24254

AlbertMontagutCasero avatar Apr 30 '24 09:04 AlbertMontagutCasero

It's nothing to do with the tweens or rotation really, that's just how it manifests. It's purely to do with the automatic round pixels setting that was enabled in 3.80 (and will be reverted in 3.90).

photonstorm avatar Apr 30 '24 22:04 photonstorm

这与补间或旋转无关,这就是它的表现方式。这纯粹与在 3.80 中启用的自动圆形像素设置有关(并将在 3.90 中恢复)。

这将是一个好的消息,现在的3.8.01这个像素模糊问题导致了当前版本无法使用。游戏场景中所有对象都会模糊化,改变窗口大小的时候。

woshisheji avatar May 02 '24 19:05 woshisheji

Thank you for your responses, you are completely right, adding roundPixels: false it almost fix the issue.

var config = {
    type: Phaser.WEBGL,
    width: 800,
    height: 600,
    backgroundColor: '#2d2d2d',
    parent: 'phaser-example',
    scene: {
        preload: preload,
        create: create,
    },
    roundPixels: false
};

https://phaser.io/sandbox/DqyY8xNf

AlbertMontagutCasero avatar May 07 '24 09:05 AlbertMontagutCasero

可惜对mode: Phaser.Scale.RESIZE的模式带mask下还是模糊0 0

woshisheji avatar May 07 '24 12:05 woshisheji