Merged N+ physics in and tidied up the Docs folder and logos.

This commit is contained in:
Richard Davey
2013-08-11 12:15:53 +01:00
parent aff7d99a8a
commit c2d7fb7fab
108 changed files with 17900 additions and 2017 deletions
+13
View File
@@ -54,6 +54,19 @@ var Phaser;
return colors;
};
ColorUtils.hexToRGB = function (h) {
var hex16 = (h.charAt(0) == "#") ? h.substring(1, 7) : h;
var r = parseInt(hex16.substring(0, 2), 16);
var g = parseInt(hex16.substring(2, 4), 16);
var b = parseInt(hex16.substring(4, 6), 16);
return {
r: r,
g: g,
b: b
};
};
ColorUtils.getComplementHarmony = /**
* Returns a Complementary Color Harmony for the given color.
* <p>A complementary hue is one directly opposite the color given on the color wheel</p>
+15
View File
@@ -59,6 +59,21 @@ module Phaser {
}
public static hexToRGB(h: string) {
var hex16 = (h.charAt(0) == "#") ? h.substring(1, 7) : h;
var r = parseInt(hex16.substring(0, 2), 16);
var g = parseInt(hex16.substring(2, 4), 16);
var b = parseInt(hex16.substring(4, 6), 16);
return {
r: r,
g: g,
b: b
}
}
/**
* Returns a Complementary Color Harmony for the given color.
* <p>A complementary hue is one directly opposite the color given on the color wheel</p>
+5
View File
@@ -183,6 +183,11 @@ var Phaser;
Phaser.DebugUtils.line('bottom: ' + sprite.worldView.bottom + ' right: ' + sprite.worldView.right.toFixed(1));
};
DebugUtils.renderSpriteWorldViewBounds = function (sprite, color) {
if (typeof color === "undefined") { color = 'rgba(0,255,0,0.3)'; }
Phaser.DebugUtils.renderRectangle(sprite.worldView, color);
};
DebugUtils.renderSpriteInfo = /**
* Render debug infos. (including name, bounds info, position and some other properties)
* @param x {number} X position of the debug info to be rendered.