Hello, Hi, I have used WebGl in a plugin for WordPress that allows you to create a Marquee of moving pixels.
I’m optimizing it as much as possible. But the Garbage Collector keeps causing crashes.
A previous code, used the offset in:
gl.vertexAttribPointer ( positionLocation, 2, gl.FLOAT, offset, 0,0 );
to move the marquee during animation (you will understand this better by looking at the purpose of the plugin and its code)
But as far as I could understand, modifying vertexAttribPointer was slower than updating a uniform float.
I think this code is the most optimal I have achieved. I also used textures with similar results.
This is a direct link to the code:
https://github.com/fen31/animated-pixel-marquee-creator/blob/master/js/marquee.js
Please take a look at the plugin:
[https://wordpress.org/plugins/animated-pixel-marquee-creator/](http://Animated Pixel Marquee Creator)
You can contribute on gitHub if you prefer:
https://github.com/fen31/animated-pixel-marquee-creator
Any contribution will be greatly appreciated and we can add the name if you wish.
Thank you very much in advance.