提交 496446f4 编写于 作者: A Aswin S 提交者: Mr.doob

Querying clientHeight forcing synchronous layout (#9760)

Reading clientHeight of canvas during every rAF causes layout thrashing and results in frame drops. Instead re-use the _height local variable available in current scope.
上级 af43c879
......@@ -2091,7 +2091,7 @@ function WebGLRenderer( parameters ) {
uniforms.diffuse.value = material.color;
uniforms.opacity.value = material.opacity;
uniforms.size.value = material.size * _pixelRatio;
uniforms.scale.value = _canvas.clientHeight * 0.5;
uniforms.scale.value = _height * 0.5;
uniforms.map.value = material.map;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册