Time dependent shader



I’m trying to use a shader that is time dependent. So I’m passing the time like this

shader.data.time.value = [ getTimer() ];

But It’s only update when I lose and gain the focus again. There is something that I have to configure?


Here is the code of the shader class.


If anyone comes through, looking for the answer, there’s a response posted on Stack Overflow: https://stackoverflow.com/a/47781429/1193912