From d799c06031f9708178c5c38d77d3dd2e6878cb4c Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 7 Nov 2023 18:27:47 +0000 Subject: [PATCH] Update TransformMatrix.js * `TransformMatrix.setToContext` will now use `setTransform(this)` as 'this' is an equivalent object that this method can natively take. * `TransformMatrix.setQuad` no longer uses an anonymous function for `roundPixels`, which will help with performance. --- src/gameobjects/components/TransformMatrix.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gameobjects/components/TransformMatrix.js b/src/gameobjects/components/TransformMatrix.js index abdf7189a..2d5561a6e 100644 --- a/src/gameobjects/components/TransformMatrix.js +++ b/src/gameobjects/components/TransformMatrix.js @@ -707,9 +707,7 @@ var TransformMatrix = new Class({ */ setToContext: function (ctx) { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + ctx.setTransform(this); return ctx; },