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:
Richard Davey 2019-05-17 13:43:55 +01:00
parent e23a86d45a
commit 0ac5d7b8d9
2 changed files with 1 additions and 5 deletions

View file

@ -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

View file

@ -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;