phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.12k stars 7.1k forks source link

Spine Canvas plugin display issues #5714

Open paulsymphony opened 3 years ago

paulsymphony commented 3 years ago

Version

Description

Display issues appear when using the Spine Canvas plugin. WebGL plugin doesn't show any issues, but display issues and alpha weirdness with Canvas plugin.

Example Test Code

Many spine demos on Phaser site don't work when 'Force Canvas' button is pressed, like this one: http://labs.phaser.io/edit.html?src=src/spine/basic%20spineboy.js&v=3.55.0

If the Config is edited to use Phaser.CANVAS, part of the spine game object isn't displayed. I have seen multiple issues with timelines affecting spine objects' alpha values, most notably when another tween in the game is setting the alpha of its target. The Spine object's alpha values change during the running of the other tween. Again, this behavior doesn't occur when Phaser.WEBGL is used in the game config.

Additional Information

photonstorm commented 3 years ago

Hmm, this isn't 3.55 specific - it happens in 3.54 and earlier versions, too.

The alpha thing is interesting - perhaps the Spine runtime just uses the global alpha value of the context, rather than maintaining state of its own alpha.

paulsymphony commented 3 years ago

Through more investigation, it seems to impact tweens of Graphics game objects whose alphas are tweened, but NOT image/sprite game objects.

mcread29 commented 2 years ago

Is there any update on this issue? The only example that works with canvas is the Canvas Test 1 found here: https://labs.phaser.io/edit.html?src=src/spine/canvas%20test%201.js&v=3.55.2

Having spine able to run in the canvas context is needed for my current project, as the target device's webgl context runs extremely slow.