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
const readline = require("readline"); | |
let input = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
let queryCommand = () => { | |
input.question("Command: ", (command) => { | |
if (command === "exit") { |
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
var permut = function (array, count, initial, output) { | |
if (initial.length >= count) { | |
output.push(initial); | |
} else { | |
for (var i = 0; i < array.length; ++i) { | |
permut(array, count, initial.concat(array[i]), output); | |
} | |
} | |
}; |
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
var renderer = new PIXI.autoDetectRenderer(400, 400); | |
document.body.appendChild(renderer.view); | |
var stage = new PIXI.Stage(0x0000FF); | |
var container = new PIXI.DisplayObjectContainer(); | |
stage.addChild(container); | |
var spriteBatch = new PIXI.SpriteBatch(); | |
stage.addChild(spriteBatch); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML5 Canvas Transformation</title> | |
</head> | |
<body> | |
<script> | |
// Create our canvas and append it to the document body | |
var stage = document.createElement("canvas"); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Canvas Path Fill test</title> | |
</head> | |
<body> | |
<canvas id="stage" width="256" height="256"></canvas> | |
<script> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>QBasic</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
diff --git a/lib/impact/animation.js b/lib/impact/animation.js | |
index 20839f9..f367083 100644 | |
--- a/lib/impact/animation.js | |
+++ b/lib/impact/animation.js | |
@@ -45,6 +45,7 @@ ig.Animation = ig.Class.extend({ | |
this.frameTime = frameTime; | |
this.sequence = sequence; | |
this.stop = !!stop; | |
+ this.tile = this.sequence[0]; | |
}, |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>jQuery Event Test</title> | |
<style> | |
.red { | |
background: #f00; | |
} | |
.blue { | |
background: #00f; |
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
var AStar; | |
(function () { | |
var Node = function (index, x, y, parent) { | |
this.index = index; | |
this.x = x; | |
this.y = y; | |
this.parent = parent || null; | |
this.f = 0; |
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
window.addEventListener("blur", function () { | |
if (ig.system) { | |
ig.music.stop(); | |
ig.system.stopRunLoop(); | |
} | |
}, false); | |
window.addEventListener("focus", function () { | |
if (ig.system) { | |
ig.music.play(); |
NewerOlder