Download

Changelog

Version 4.0

Version 4.0 introduces optional native scroll handling (planes position are automatically updated when the users scrolls), but it also lets you define if you want to listen to the resize event or use the internal request animation frame loop. With those options you can chose to handle those things by yourself and therefore improve performance by keeping a single resize or request animation frame loop for your websites.
The Curtains object now accepts an object as init params.

  • New Curtains object initial parameters with the ability to define which events you want to listen to.
  • A few new helper methods and event to handle scroll related things.
  • Real frustum culling to draw only the planes that actually need to be render. Comes with a handy drawCheckMargins parameter in case you are displacing vertices positions in your vertex shader.
  • Performance improvements and bugs fixes.

Version 3.0

Version 3.0 introduces post processing effects and a few more helpers.
There are no breaking changes since v2.0 so you can update it safely.

  • Major code refactoring to introduce ShaderPass class by creating a BasePlane class. Usual Plane class now extends BasePlane class, as does ShaderPass class.
  • Added a bunch of new events and methods, like onAfterResize or getBoundingRect.
  • Minor bugs fixes.

Version 2.0

  • Added a Texture class object and introduced texture matrices as well.
  • Code structure refactored and cleaned.
  • Internal maths and object properties have been rewritten for a cleaner and more readable code.
  • Improved performance on both loading and rendering time.
  • Minor bugs fixes.

About

This library is released under the MIT license which means it is free to use for personnal and commercial projects.

All images used in the examples were taken by Marion Bornaz during the Mirage Festival.

All examples video footages were shot by Analogue Production.

Many thanks to webglfundamentals.org tutorials which helped me a lot.

Author of this library is Martin Laxenaire, a french creative front-end developper based in Lyon.
Found a bug ? Have questions ? Do not hesitate to email me, fill an issue on Github or send me a tweet : @webdesign_ml.