This little experiment could become an extension but is currently more a demo. It uses the work of the amazing Evan Wallace from back in 2011. It creates a WebGL Canvas and offers some neat texture base manipulations. The texture can even be updated on the fly.
Here you go… drag is fun (with less effects) in this case … but animation was more of an side effect. I was after all the high performance effects listed here that are also included. I’d love to expose the filters over dataset. Using them in JS it’s already all possible.
Your welcome… if you want to have an in depths hands on tutorial look at …
After watching it you will understand why I went the easy route and used Evan Wallace glfx.js.
Still very interesting to see how deep the rabbit hole is actually becoming with webgl.
It would be great if it support multiple images, for now, it seems only support one by assigning:
data-canvas-webgl true.
2.I find it does not work in responsive layouts, but it works well in single PC layout. It would be great if WebGLCanvas support responsive layout too.
@alexlii, I provide all my code as is. If you need custom work you need to hire a developer. I sometimes do request but on any project you encounter you ask for more. Use what you can and try to learn as much as you can as it will give you great independence down the road of your career.
Go right ahead… code is an experiment and under the MIT license.
It uses requestAnimationFrame so the browser is in charge of controlling the firing of the frames. Meaning it already pauses if the OS needs power elsewhere like when switching tabs etc. But thats up to the OS and Browser.
If I touch this again I would probably now use Hype AnimationFrame as it deregisters any running requestAnimationFrame animations when switching scenes.