diff --git a/README.md b/README.md
index 39ac8265b..b9f6195c8 100644
--- a/README.md
+++ b/README.md
@@ -362,6 +362,7 @@ Beyond version 2.2
* Look at HiDPI Canvas settings.
* Multiple Camera support.
* DragonBones support.
+* Cache to localStorage using If-Modified-Since. [See github request](https://github.com/photonstorm/phaser/issues/495)
Nadion
diff --git a/examples/wip/bmd.js b/examples/wip/bmd.js
index c9cd8a802..2e55f0b39 100644
--- a/examples/wip/bmd.js
+++ b/examples/wip/bmd.js
@@ -1,9 +1,9 @@
-var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render });
+var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });
function preload() {
- game.load.image('pic', 'assets/pics/backscroll.png');
+ game.load.image('pic', '../assets/pics/questar.png');
}
@@ -12,33 +12,26 @@ var bmd;
function create() {
- bmd = game.add.bitmapData(800, 600);
- bmd.fillStyle('rgba(255,0,0,0.2)');
- // bmd.fillRect(0, 0, 300, 100);
- // bmd.fillRect(0, 200, 300, 100);
+ game.add.image(0, 0, 'pic');
- image = game.add.image(0, 0, bmd);
- // image.anchor.set(0.5);
+ console.log('pic?');
- game.input.onDown.add(tint, this);
+ // bmd = game.add.bitmapData(800, 600);
+ // bmd.context.fillStyle = 'rgba(255,0,0,0.2)';
+ // bmd.context.fillRect(0, 0, 300, 100);
-}
-
-function tint() {
-
- image.tint = Math.random() * 0xFFFFFF;
+ // image = game.add.image(0, 0, bmd);
}
function update() {
- bmd.fillStyle('rgba(255,0,0,0.2)');
- bmd.fillRect(game.input.x, game.input.y, 6, 6);
+ // bmd.context.fillRect(game.input.x, game.input.y, 8, 8);
}
function render() {
- game.debug.renderText(game.input.x, 32, 32);
+ // game.debug.renderText(game.input.x, 32, 32);
}
diff --git a/examples/wip/cocoon.html b/examples/wip/cocoon.html
new file mode 100644
index 000000000..185050e18
--- /dev/null
+++ b/examples/wip/cocoon.html
@@ -0,0 +1,12 @@
+
+
+
+
+ phaser
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/wip/cocoon.php b/examples/wip/cocoon.php
new file mode 100644
index 000000000..65083f081
--- /dev/null
+++ b/examples/wip/cocoon.php
@@ -0,0 +1,95 @@
+ $value)
+ {
+ if (is_array($value) && count($value) > 0)
+ {
+ $total += count($value);
+ }
+ }
+
+ function getFile() {
+
+ global $files, $dir, $filename, $title, $code;
+
+ if (isset($_GET['d']) && isset($_GET['f']))
+ {
+ $dir = urldecode($_GET['d']);
+ $filename = urldecode($_GET['d']) . '/' . urldecode($_GET['f']);
+ $title = urldecode($_GET['t']);
+
+ if (file_exists($filename))
+ {
+ $code = file_get_contents($filename);
+ $files = dirToArray($dir);
+ }
+ }
+
+ }
+
+ function dirToArray($dir) {
+
+ $ignore = array('.', '..', '_site', 'assets', 'gfx', 'states', 'book', 'filters', 'misc');
+ $result = array();
+ $root = scandir($dir);
+ $dirs = array_diff($root, $ignore);
+
+ foreach ($dirs as $key => $value)
+ {
+ if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
+ {
+ $result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value);
+ }
+ else
+ {
+ if (substr($value, -3) == '.js')
+ {
+ $result[] = $value;
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ function printJSLinks($dir, $files) {
+
+ $output = "";
+
+ foreach ($files as $key => $value)
+ {
+ $value2 = substr($value, 0, -3);
+ $file = urlencode($value);
+
+ $output .= "$value2
";
+ }
+
+ return $output;
+
+ }
+?>
+
+
+
+
+ phaser
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/wip/index-fs.php b/examples/wip/index-fs.php
new file mode 100644
index 000000000..9788e2106
--- /dev/null
+++ b/examples/wip/index-fs.php
@@ -0,0 +1,31 @@
+
+
+
+
+
+ phaser
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/wip/index.php b/examples/wip/index.php
index 76d4bea7c..a6a39448c 100644
--- a/examples/wip/index.php
+++ b/examples/wip/index.php
@@ -64,7 +64,7 @@
$value2 = substr($value, 0, -3);
$file = urlencode($value);
- $output .= "$value2
";
+ $output .= "$value2 | (full screen) | (cocoon) |
";
}
return $output;
@@ -110,9 +110,11 @@
work in progress examples
+
diff --git a/examples/wip/index2.php b/examples/wip/index2.php
index a7a73672d..c4c272778 100644
--- a/examples/wip/index2.php
+++ b/examples/wip/index2.php
@@ -1,76 +1,3 @@
- $value)
- {
- if (is_array($value) && count($value) > 0)
- {
- $total += count($value);
- }
- }
-
- function getFile() {
-
- global $files, $dir, $filename, $title, $code;
-
- if (isset($_GET['d']) && isset($_GET['f']))
- {
- $dir = urldecode($_GET['d']);
- $filename = urldecode($_GET['d']) . '/' . urldecode($_GET['f']);
- $title = urldecode($_GET['t']);
-
- if (file_exists($filename))
- {
- $code = file_get_contents($filename);
- $files = dirToArray($dir);
- }
- }
-
- }
-
- function dirToArray($dir) {
-
- $ignore = array('.', '..', '_site', 'assets', 'gfx', 'states', 'book', 'filters', 'misc');
- $result = array();
- $root = scandir($dir);
- $dirs = array_diff($root, $ignore);
-
- foreach ($dirs as $key => $value)
- {
- if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
- {
- $result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value);
- }
- else
- {
- if (substr($value, -3) == '.js')
- {
- $result[] = $value;
- }
- }
- }
-
- return $result;
- }
-
- function printJSLinks($dir, $files) {
-
- $output = "";
-
- foreach ($files as $key => $value)
- {
- $value2 = substr($value, 0, -3);
- $file = urlencode($value);
-
- $output .= "$value2
";
- }
-
- return $output;
-
- }
-?>
@@ -93,8 +20,6 @@
body {
margin: 0;
padding: 0;
- font-family: Arial;
- font-size: 14px;
}
@@ -102,18 +27,5 @@
-
-
-
-
-
-
work in progress examples
-
-
-
-
-