diff options
author | Jose Antonio Marquez | 2012-03-26 15:37:41 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-26 15:37:41 -0700 |
commit | 9d88d2827c6c1cc10f64575bd3c2f5f21dd0d89d (patch) | |
tree | af3b114d6a83ae62dfcead8bd61bc62efe0c9516 | |
parent | b1ba63e509f77b14c05b89ea193f4d706a28ac9b (diff) | |
parent | 309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff) | |
download | ninja-9d88d2827c6c1cc10f64575bd3c2f5f21dd0d89d.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
126 files changed, 5652 insertions, 923 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js index fd823f35..dd909e26 100644 --- a/assets/canvas-runtime.js +++ b/assets/canvas-runtime.js | |||
@@ -37,17 +37,24 @@ function CanvasDataManager() | |||
37 | for (var i=0; i<nWorlds; i++) | 37 | for (var i=0; i<nWorlds; i++) |
38 | { | 38 | { |
39 | var importStr = value[i]; | 39 | var importStr = value[i]; |
40 | var startIndex = importStr.indexOf( "id: " ); | 40 | |
41 | if (startIndex >= 0) | 41 | // there should be some version information in |
42 | // the form of 'v0.0;' Pull that off. (the trailing ';' should | ||
43 | // be in the first 24 characters). | ||
44 | var index = importStr.indexOf( ';' ); | ||
45 | if ((importStr[0] === 'v') && (index < 24)) | ||
42 | { | 46 | { |
43 | var endIndex = importStr.indexOf( "\n", startIndex ); | 47 | // JSON format. pull off the version info |
44 | if (endIndex > 0) | 48 | importStr = importStr.substr( index+1 ); |
49 | |||
50 | var jObj = JSON.parse( importStr ); | ||