pixijs / pixijs

The HTML5 Creation Engine: Create beautiful digital content with the fastest, most flexible 2D WebGL renderer.
http://pixijs.com
MIT License
43.5k stars 4.75k forks source link

Automated visual Testing #8338

Open GoodBoyDigital opened 2 years ago

GoodBoyDigital commented 2 years ago

problem Often its best to test pixi out by visually looking at what it renderers. This can be time consuming and error prone to do manually. As many things in PixiJS can be stacked up adn have some kind of render effect, its likely that changing visually how something is rendered may have an unintended knock on effect in other specific situations. For example, a mask could accidentally break a filter or a render texture.

solution When ever a PR is made, we runa set of tests that render a Pixi scene and then do a pixel comparison to ensure that the visuals line up. WE have this set up written in Jest at Goodboy. It works really well!

stretch Make sure rendering images are deploy to S3 with other artefacts to verify changes Report images diff errors back to GitHub PRs

choephix commented 2 years ago

This would be amazing! A good example of the kind of bug this can catch is, since I updated pixi to version 6.4.2 on the project I'm working on, most of the display objects with "GlowFilter" applied seem to disappear without console errors. Not all for some reason...