Webgl points renderer / slight improvements following review

Also fixes a lint error.
This commit is contained in:
Olivier Guyot
2019-11-04 09:41:12 +01:00
parent af15cfb815
commit 7da86ae71f
3 changed files with 43 additions and 23 deletions

View File

@@ -123,7 +123,10 @@ class WebGLRenderTarget {
*/
readPixel(x, y) {
if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {
tmpArray4[0] = tmpArray4[1] = tmpArray4[2] = tmpArray4[3] = 0;
tmpArray4[0] = 0;
tmpArray4[1] = 0;
tmpArray4[2] = 0;
tmpArray4[3] = 0;
return tmpArray4;
}