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.21k stars 7.1k forks source link

Failed to execute 'setTransform' on 'CanvasRenderingContext2D': 6 arguments required, but only 1 present. #6965

Open rafa-fie opened 15 hours ago

rafa-fie commented 15 hours ago

Version

Description

When open that browser I have an error: Uncaught TypeError: Failed to execute 'setTransform' on 'CanvasRenderingContext2D': 6 arguments required, but only 1 present.

this problem do not invoke in newest version of Sketchup Browser (like CEF 88 and above)

image

Example Test Code

in the config file I am using Phaser.CANVAS, because that renderer is better for my case (using phaser to visualize pdf so thin lines are necessary)

when Phaser.Auto then it is working but that renderer isn't good in my case

Additional Information

I have solved that issue by changing line return t.setTransform(this),t} into return t.setTransform(this.a, this.b, this.c, this.d, this.e, this.f),t}

not sure if it is safe solution, but it's working ;P maybe in future releases you can add something like this.

ps. very very great library!!!

image image

photonstorm commented 13 hours ago

Hiya - how old is this device/set-up you're testing? Because setTransform has allowed you to pass a matrix object to it for years now! See https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform#browser_compatibility