aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRory Hardy <rory.cronin-hardy@cerner.com>2013-08-06 00:11:58 -0500
committerRory Hardy <rory.cronin-hardy@cerner.com>2013-08-06 00:11:58 -0500
commit1d895bad612c218f125c43b8195ab475be625bf0 (patch)
tree4f60a2356bba499820be387d42c702de37b86a43
parent36a4f56f6253db7d2624686909979f97690776f4 (diff)
downloadperl-software-in-gnu-guix-1d895bad612c218f125c43b8195ab475be625bf0.tar
perl-software-in-gnu-guix-1d895bad612c218f125c43b8195ab475be625bf0.tar.gz
Docs and updates
Updated README.md to mention the leap plugin. Removed leap settings from index.html. Better variable naming in leap.js modified: README.md modified: index.html modified: plugin/leap/leap.js
-rw-r--r--README.md42
-rw-r--r--index.html3
-rw-r--r--plugin/leap/leap.js6
3 files changed, 46 insertions, 5 deletions
diff --git a/README.md b/README.md
index 04313df..15cabcf 100644
--- a/README.md
+++ b/README.md
@@ -625,6 +625,48 @@ Reveal.initialize({
});
```
+## Leap Motion
+The Leap Motion plugin lets you utilize your [Leap Motion](https://www.leapmotion.com/) device to control basic navigation of your presentation. The gestures currently supported are:
+
+##### 1 hand + 1 finger
+* Pointer &mdash; Point to anything on screen. Move your finger past the device to expand the pointer.
+
+##### 1 hand + 2 or more fingers
+
+* Left
+* Right
+* Up
+* down
+
+Navigate through your slides. See config options to invert movements.
+
+##### 2 hands
+* Up
+
+Toggle the overview mode. Do it a second time to exit the overview.
+
+#### Config Options
+You can edit the following options:
+* naturalSwipe: Defaults to true. Swipe as though you were touching a touch screen. Set to false to invert.
+* pointerSize: Defaults to 15. The minimum height and width of the pointer.
+* pointerColor: Defaults to #00aaff. The color of the pointer.
+* pointerOpacity: Defaults to 0.75. The opacity of the pointer.
+* gestureDelay: Defaults to 500. How long to delay between gestures in milliseconds.
+
+Example configuration:
+```js
+Reveal.initialize({
+ // other options
+ leap: {
+ naturalSwipe : false, // Invert swipe gestures
+ pointerOpacity : 0.5, // Set pointer opacity to 0.5
+ pointerColor : '#d80000' // Red pointer
+ }
+
+ // Optional libraries used to extend on reveal.js
+ { src: 'plugin/leap/leap.js', async: true }
+```
+
## Installation
The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features as well as the development tasks needed to make changes to the source.
diff --git a/index.html b/index.html
index 9ee0941..fab2780 100644
--- a/index.html
+++ b/index.html
@@ -370,8 +370,7 @@ function linkify( selector ) {
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
- { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
- { src: 'plugin/leap/leap.js', async: true, }
+ { src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
// { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
// { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
]
diff --git a/plugin/leap/leap.js b/plugin/leap/leap.js
index 072f73d..a605153 100644
--- a/plugin/leap/leap.js
+++ b/plugin/leap/leap.js
@@ -30,7 +30,7 @@ var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)re
lastGesture = 0,
config = {
naturalSwipe : true, // Swipe as if it were a touch screen.
- pointerDefault : 15, // Default height/width of the pointer.
+ pointerSize : 15, // Default height/width of the pointer.
pointerColor : '#00aaff', // Default color of the pointer.
pointerOpacity : 0.75, // Default opacity of the pointer.
gestureDelay : 500 // How long to delay between gestures.
@@ -60,8 +60,8 @@ var b=right.criteria;if(a!==b){if(a>b||a===void 0)return 1;if(a<b||b===void 0)re
if ( frame.hands.length === 1 && frame.fingers.length === 1 ) {
var size = -2 * frame.hands[0].palmPosition[2];
- if ( size < config.pointerDefault ) {
- size = config.pointerDefault
+ if ( size < config.pointerSize ) {
+ size = config.pointerSize
}
pointer.style.bottom =