Open o-tantk opened 2 years ago
I tested very simple html page(below) as local file, and it shows nothing.
<html> <head> <script type="text/javascript" src="https://rawgit.com/patriciogonzalezvivo/glslCanvas/master/dist/GlslCanvas.js"></script> </head> <body> <canvas class="glslCanvas" data-fragment=" void main() { gl_FragColor = vec4(1, 0, 0, 1); } " width="500" height="500"></canvas> </body> </html>
It seems an instant render overwritten or ignored if render timing is too fast. Adding a line that ~postpones rendering~ render once more at the next frame, It works fine.
// glslCanvas.js: 179L setTimeout(() => { this.forceRender = true; }, 1);
Thanks.
I tested very simple html page(below) as local file, and it shows nothing.
It seems an instant render overwritten or ignored if render timing is too fast. Adding a line that ~postpones rendering~ render once more at the next frame, It works fine.
Thanks.