reveal.js-trianglify
A Reveal.js plugin to algorithmically generate triangle art slide backgrounds. Check out the live demo
Installation
Bower
Download and install the package in your project:
bower install reveal.js-trianglify
Add the plugin to the dependencies in your presentation, as below.
Reveal;
npm
Download and install the package in your project:
npm install --save reveal.js-trianglify
Add the plugin to the dependencies in your presentation, as below.
Reveal;
Manual
Copy this repository into the plugins folder of your reveal.js presentation, eg plugins/trianglify
.
Add the plugin to the dependencies in your presentation, as below.
Reveal;
Configuration
You can configure various aspects of however the trianglify backgrounds are generated for your presentation by providing a trianglify
option in the reveal.js initialization options. The defaults for these options are provided by the Trianglify library (see the Trianglify docs for more details) and are repeated below.
Reveal;
Trianglify as theme background
The default configuration generates a background for the entire presentation. There will be a single background visible for every slide that does not provide a slide specific backgrounds. This theme level background can be disabled by providing the following in the reveal.js initialization options...
Reveal;
Background for individual slides
Backgrounds for individual slides can be generated by adding a data-trianglify
attribute to your <section>
elements. The following attributes can be used to configure each specific background. Any attribute not provided will default to the overall configuration provided by the reveal.js initialization options (see above).
- data-trianglify-cellSize
- data-trianglify-xColors
- data-trianglify-yColors
- data-trianglify-variance
Background transitions
When using individual slide backgrounds the reveal background transitions will be applied (configured via backgroundTransition
in the reveal.js initialization options, or provided via the slide's data-transition
attribute).
Note that the theme level background will ignore background transitions. If you need a common background that also applies background transitions you will need to add a data-trianglify
attribute to each slide.
License
reveal.js-trianglify is GPLv3 licensed.
Copyright (C) 2018 Greg Denehy
The Trianglify library is copyright (C) Quinn Rohlf