View command-repl.js
const readline = require("readline"); | |
let input = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
let queryCommand = () => { | |
input.question("Command: ", (command) => { | |
if (command === "exit") { |
View permut.js
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); | |
} | |
} | |
}; |
View pixi-spritebatch-mask.js
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); |
View simple-canvas-rotation.html
<!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"); |
View canvas-path-fill-test.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Canvas Path Fill test</title> | |
</head> | |
<body> | |
<canvas id="stage" width="256" height="256"></canvas> | |
<script> |
View QBasic.tmTheme
<?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> |
View animation.js.diff
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]; | |
}, |
View jquery_events.html
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>jQuery Event Test</title> | |
<style> | |
.red { | |
background: #f00; | |
} | |
.blue { | |
background: #00f; |
View astar.js
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; |
View impact_suspend.js
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