1/*global Gamepad, shower */ 2 3(function () { 4 'use strict'; 5 6 if (!Gamepad) { 7 throw new ReferenceError('gamepad.js is required'); 8 } 9 10 if (!shower) { 11 throw new ReferenceError('shower.js is required'); 12 } 13 14 // Joysticks 15 16 Gamepad.on('joystick:left', function (direction) { 17 if (direction.left) { 18 shower.prev(); 19 } else if (direction.right) { 20 shower.next(); 21 } 22 }); 23 24 Gamepad.on('joystick:right', function (direction) { 25 if (direction.left) { 26 shower.prev(); 27 } else if (direction.right) { 28 shower.next(); 29 } 30 }); 31 32 // Arrows 33 34 Gamepad.on('arrow:right', function () { 35 shower.next(); 36 }); 37 38 Gamepad.on('arrow:left', function () { 39 shower.prev(); 40 }); 41 42 // Shapes 43 44 Gamepad.on('shape:circle', function () { 45 shower.next(); 46 }); 47 48 Gamepad.on('shape:square', function () { 49 shower.prev(); 50 }); 51}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.