├── .eslintrc ├── .gitignore ├── LICENSE.md ├── README.md ├── SUMMARY.md ├── dist └── build.min.js ├── docs ├── api.md ├── events.md ├── examples.md ├── format.md ├── intro.md ├── props.md ├── utilities.md └── vdom.md ├── index.js ├── lib ├── Channels.js ├── Diaporama.js ├── DiaporamaFormatError.js ├── DiaporamaRenderingCanvas │ ├── Post.js │ ├── SegmentGlslTransition.js │ ├── SegmentKenBurnsWebGL.js │ ├── StoreTransitions.js │ └── index.js ├── DiaporamaRenderingDOM │ ├── SegmentDomTransition.js │ ├── SegmentKenBurnsDOM.js │ └── index.js ├── MediaLoader.js ├── SegmentKenBurns.js ├── SegmentSlide2d.js ├── SegmentTimeline.js ├── TimeInterval.js ├── WebGLDetector.js ├── findTransitionByName.js ├── forEachSlide2dImage.js ├── globals │ └── localize.js ├── hashResource.js ├── index.js ├── mix.js └── noop.js ├── package.json └── test ├── 01.js ├── 02.js ├── 03.js ├── 04.js ├── 05.js ├── 06.js ├── 07.js ├── 08.js ├── 09.js ├── 10.js ├── mock.js └── test.js /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": [ 4 | 2, 5 | 2 6 | ], 7 | "quotes": [ 8 | 2, 9 | "double" 10 | ], 11 | "linebreak-style": [ 12 | 2, 13 | "unix" 14 | ], 15 | "semi": [ 16 | 2, 17 | "always" 18 | ] 19 | }, 20 | "env": { 21 | "node": true, 22 | "browser": true 23 | }, 24 | "extends": "eslint:recommended" 25 | } 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | _book 3 | 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ## ISC License 2 | 3 | Copyright (c) 2015 Gaëtan Renaudeau 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://cloud.githubusercontent.com/assets/211411/7667405/7e5c14f0-fc06-11e4-8a96-8b3297728e28.png) Diaporama 2 | ========= 3 | Diaporama is an image/video/content slideshow engine providing high quality animation effects including [Kenburns](https://github.com/gre/kenburns) effect and [GLSL Transitions](https://github.com/gre/glsl-transition). 4 | 5 | [![](https://nodei.co/npm/diaporama.png)](https://www.npmjs.com/package/diaporama) 6 | 7 | **[-> DEMO <-](http://greweb.me/diaporama/)** 8 | 9 | Related Projects 10 | --------------- 11 | 12 | - **[`diaporama-maker`](https://github.com/gre/diaporama-maker): application to create Diaporama slideshows.** 13 | - [`diaporama-react`](https://github.com/glslio/diaporama-react): Use React with Diaporama. 14 | - [`kenburns`](http://github.com/gre/kenburns): KenBurns effect for the Web. 15 | - [`glsl-transition`](https://github.com/glslio/glsl-transition): Perform a GLSL Transition. 16 | - [`slide2d`](https://github.com/gre/slide2d): Express vectorial content in JSON using canvas2d directives. 17 | 18 | 19 | Diaporama Key features 20 | ------------ 21 | 22 | - **Minimal and unopinionated library**. *Diaporama* focuses on rendering the slideshow. Up to you to hook it to any event (window resize, touch events, keyboard,...) based on your needs. 23 | - **Responsive**: *Diaporama* works with any resolution and any ratio. The original image ratios are always preserved (crop to fit). 24 | - **Simple [API](docs/api.md)**. the Diaporama API mimic the HTML5 Video API for a better learning curve. You can set some [Properties](docs/props.md) and the library will always be in sync with your changes (and update efficiently with the minimal changes). There is also [Events](docs/events.md). 25 | - [Easily interoperable with Virtual DOM library](docs/vdom.md). 26 | - **Videos** support. allowing to define multiple video formats and image fallback. 27 | - **[Kenburns](https://github.com/gre/kenburns) effect** on images with configurable animation from/to and easing function. 28 | - Customizable **transition effects** using GLSL Transitions created on [GLSL.io](http://transitions.glsl.io/) (or your own) 29 | - **Works everywhere**. *Diaporama* is implemented with WebGL (hardware accelerated) but also have DOM fallback. 30 | - The slideshow is described in a [JSON format](docs/format.md). 31 | - **Retina-ready**. By default, the library use `devicePixelRatio` as canvas resolution. N.B.: This has a cost in term of performance, so if you want you can just give `1`. You can also responsively adapt it based on the canvas area. 32 | - **Texts, Images and Shapes** support – using [slide2d](https://github.com/gre/slide2d) which exposes everything Canvas can do. 33 | 34 | Gitbooks Full Documentation 35 | ------------ 36 | 37 | [**https://gre.gitbooks.io/diaporama/content/**](https://gre.gitbooks.io/diaporama/content/) 38 | 39 | 40 | Current state of browser support 41 | ----------- 42 | 43 | Diaporama should be widely supported by browsers (desktop and mobile). If WebGL is not supported by the browser/hardware, it fallbacks properly to DOM implementation (an opacity transition is used). 44 | 45 | Here are the current browsers I've been testing on 46 | 47 | - Firefox (Mac, Linux) 48 | - Chrome (Mac, Chromium Linux, Windows) 49 | - Safari (Mac) 50 | - IE 11 51 | - iOS Safari 52 | - Android Chrome 53 | - Support for Videos is broken (will display black): `