diff options
author | Nivesh Rajbhandari | 2012-03-27 09:32:53 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-27 09:32:53 -0700 |
commit | 406bbfc63f8ed42d7da105dbd068a49ff8fb5f09 (patch) | |
tree | 3a8b45f4802f002269ff1bcf596f94cee4679a07 | |
parent | bda9f8f5829c943486f8850e68c991e83f8fb8c8 (diff) | |
parent | 309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff) | |
download | ninja-406bbfc63f8ed42d7da105dbd068a49ff8fb5f09.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
125 files changed, 5624 insertions, 927 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 ); | ||
51 | var id = jObj.id; | ||