Closed DeathAngelDaemon closed 8 years ago
The globalAlpha attribute is part of the 2D canvas spec, not the WebGL canvas spec, so that won't work. It's confusing because they both use the <canvas>
element but the 2D canvas API is entirely separate from the WebGL canvas API. One easy way of transitioning between any two DOM elements is to make two of them, position them on top of each other, and animate the opacity of the one in front to do the fade. It's definitely possible to implement a fade with WebGL inside a single <canvas>
but this library doesn't include support for that unfortunately.
Sorry, for my late response. Thx for your hint, that's exactly what I will do now. I just had the hope their is another possibility. So, thx for the plugin und your explanation.
Hello,
I use glfx to switch between different images on the created canvas. That's working so far. But I also want to have a smooth fading effect when the images are switching.
For canvas there is a method called globalAlpha which can be assigned to a 2d context of a canvas. Sadly glfx creates a canvas with a webgl context and I cannot assign a second context to that canvas. So how can I use globalAlpha on my glfx canvas? Or is there another simple method (for switching with fade) which can be used in combination with glfx?
Any suggestions are appreciated. Thx :)