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(); |
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
(function () { | |
// Extends the base Object with data getter/setter and event target | |
var proto = Object.prototype; | |
proto._data = {}; | |
proto._listeners = {}; | |
proto.set = function (key, value) { |
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
ctx.save(); | |
// 50% opacity | |
// Anything drawn after this call (but before call .restore) will be drawn at 50% opacity | |
ctx.globalAlpha = 0.5; | |
ctx.drawImage( | |
spriteSourceImage, | |
sourceX, sourceY, sourceWidth, sourceHeight, | |
destX, destY, destWidth, destHeight |
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
if ( | |
something && | |
!somethingElse && | |
otherThing === null) { | |
callFunction(); | |
} |
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/src/libtiled/libtiled.pro b/src/libtiled/libtiled.pro | |
index bd24e9c..5438f80 100644 | |
--- a/src/libtiled/libtiled.pro | |
+++ b/src/libtiled/libtiled.pro | |
@@ -31,3 +31,8 @@ mac { | |
ppc | |
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk | |
} | |
+ | |
+macx { |
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> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Canvas Performance Demo</title> | |
</head> | |
<body> | |
<div> | |
<h1>Canvas Performance Test</h1> |
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
-- I used to do it like this: | |
SELECT * FROM table WHERE | |
hurr | |
AND (foo = 'bar') | |
AND (bar = 'foo') | |
-- Then later I spaced it out even more: | |
SELECT |
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 myObject = function (someParam) { | |
var privateMember = "foobar"; | |
return { | |
publicMethod: function () { | |
return "Hi! " + someParam + " " + privateMember; | |
} | |
}; | |
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); |
NewerOlder