mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
There was some test code left in the DOMElementCSSRenderer
file that caused getBoundingClientRect
to be called every render. This has been removed, which increases performance significantly for DOM heavy games.
This commit is contained in:
parent
e23a86d45a
commit
0ac5d7b8d9
2 changed files with 1 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
* `Zones` will now use the new `customHitArea` property introduced in 3.17 to avoid their hit areas from being resized if you specified your own custom hit area (thanks @rexrainbow)
|
||||
* The default `BaseShader` vertex shader has a new uniform `uResolution` which is set during the Shader init and load to be the size of the Game Object to which the shader is bound.
|
||||
* The default `BaseShader` vertex shader will now set the `fragCoord` varying to be the Game Object height minus the y inPosition. This will give the correct y axis in the fragment shader, causing 'inverted' shaders to display normally when using the default vertex code.
|
||||
* There was some test code left in the `DOMElementCSSRenderer` file that caused `getBoundingClientRect` to be called every render. This has been removed, which increases performance significantly for DOM heavy games.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -110,11 +110,6 @@ var DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, ca
|
|||
' rotate3d(' + src.rotate3d.x + ',' + src.rotate3d.y + ',' + src.rotate3d.z + ',' + src.rotate3d.w + src.rotate3dAngle + ')';
|
||||
|
||||
style.transformOrigin = tx + ' ' + ty;
|
||||
|
||||
var nodeBounds = node.getBoundingClientRect();
|
||||
|
||||
src.displayWidth = nodeBounds.width;
|
||||
src.displayHeight = nodeBounds.height;
|
||||
};
|
||||
|
||||
module.exports = DOMElementCSSRenderer;
|
||||
|
|
Loading…
Reference in a new issue