This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* An accelerometer object for detecting device orientation | |
* and motion (if supported) | |
* | |
* Chrome 7+, Firefox 6+, IE11+, iOS Safari 4.0+, Android Browser 3.0, Blackberry 10.0 | |
* http://caniuse.com/#feat=deviceorientation | |
* | |
* The DeviceOrientationEvent.alpha value represents the motion of the device around the z axis, | |
* represented in degrees with values ranging from 0 to 360. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A Geolocation object | |
* | |
* Note: Uses GPS or similar hardware for data if available through | |
* the browser, but will fall back to using (Google) geolocation | |
* services with current IP address automatically. | |
* | |
* @property {boolean} supported If the geolocation functions are available in the current context | |
* @property {function} onsuccess The function to be called if the geolocation services are successful | |
* @property {function} onerror The function to be called if an error occurs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* (Note: Depends on window.requestAnimationFrame for polling.) | |
* | |
* An experimental Gamepad object for detecting | |
* and parsing gamepad input. | |
* | |
* Current code borrows heavily from Marcin Wichary's work: | |
* http://www.html5rocks.com/en/tutorials/doodles/gamepad/ | |
* | |
* Also uses deadzone values from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First, create a reference to the Wikifier.createInternalLink function. | |
// (Internally, this is what Twine uses to connect passages together. | |
// It is the last step in parsing double-bracked content into links.) | |
var oldCreateInternalLink = Wikifier.createInternalLink; | |
// Then, create a new function that mimics its functionality. | |
Wikifier.createInternalLink = function(place, title) { | |
// By calling the old function, it returns | |
// the DOM element (the link) it was about to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
/** | |
* ... | |
* @author Dan Cox | |
*/ | |
import org.flixel.*; | |
public class PlayState extends FlxState |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, | |
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,6,3,3,3,3,3,3,3,3,3,3,3,3,2, | |
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,6,3,3,3,3,3,3,3,3,3,3,3,3,2, | |
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,6,3,3,3,3,3,3,3,3,3,3,3,3,2, | |
2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,4,6,3,3,3,3,3,3,3,3,3,3,3,3,2, | |
2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,4,6,3,3,3,3,3,3,3,3,3,3,3,3,2, | |
2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,4,6,1,1,1,1,1,1,1,1,1,1,1,3,2, | |
2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,4,6,1,1,1,1,1,1,1,1,1,1,1,3,2, | |
2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,4,6,1,1,1,1,1,1,1,1,1,1,1,3,2, | |
2,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,1,1,1,4,6,1,1,1,1,1,1,1,1,1,1,1,3,2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The first thing we are doing here is to create a new | |
display function, oldDisplay, as a reference to the | |
the normal History.display function. | |
(Note: History.display does most of the heavy lifting | |
in Twine. When a link is clicked, it is what | |
grabs the content of the passage from HTML and | |
adds it to the screen as text.) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macros['loadJS'] = | |
{ | |
handler: function(place, object, parameters) | |
{ | |
var se = document.createElement("script"); | |
se.type = 'text/javascript'; | |
se.src = parameters[0]; | |
var hT = document.getElementsByTagName("HEAD")[0]; | |
hT.appendChild(se); | |
if(se.innerText) {eval(se.innerText);} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Notifications object | |
* | |
* http://caniuse.com/notifications | |
* Currently supported only in Firefox 22+, Chrome 22+, and Safari 6+ (on Mac OSX 10.8+). | |
* | |
* Note: requestPermission() MUST be called from a user gesture event in Chrome | |
* to be valid. It will fail silently otherwise! | |
* | |
* Note: Firefox and Safari will close notifications themselves |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Fullscreen object | |
* | |
* Current support (http://caniuse.com/#feat=fullscreen) | |
* is limited to Firefox 22+ (moz), Chrome 28+, Safari 6.0+, Opera 16.0+ (webkit), | |
* and IE11+ (ms) | |
* | |
* @property {boolean} supported If fullscreen support exists in the current context | |
* @property {boolean} isFullscreen If an element is currently fullscreen or not | |
*/ |
NewerOlder