diff options
84 files changed, 1434 insertions, 1195 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js index a35f473d..ee9f24a4 100644 --- a/assets/canvas-runtime.js +++ b/assets/canvas-runtime.js | |||
@@ -121,13 +121,12 @@ NinjaCvsRt.GLRuntime = function ( canvas, jObj, assetPath ) | |||
121 | // all "live" materials | 121 | // all "live" materials |
122 | this._materials = []; | 122 | this._materials = []; |
123 | 123 | ||
124 | // provide the mapping for the asset directory | 124 | // provide the mapping for the asset directory |
125 | if (assetPath) | 125 | if (assetPath) { |
126 | { | 126 | this._assetPath = assetPath.slice(); |
127 | this._assetPath = assetPath.slice(); | 127 | if (this._assetPath[this._assetPath.length - 1] != '/') |
128 | if (this._assetPath[this._assetPath.length-1] != '/') | 128 | this._assetPath += '/'; |
129 | this._assetPath += '/'; | 129 | } |
130 | } | ||
131 | 130 | ||
132 | if(this._assetPath !== undefined) { | 131 | if(this._assetPath !== undefined) { |
133 | RDGE.globals.engine.setAssetPath(this._assetPath); | 132 | RDGE.globals.engine.setAssetPath(this._assetPath); |
@@ -289,23 +288,23 @@ NinjaCvsRt.GLRuntime = function ( canvas, jObj, assetPath ) | |||
289 | 288 | ||
290 | this.importObject = function( jObj, parent ) | 289 | this.importObject = function( jObj, parent ) |
291 | { | 290 | { |
292 | var type = jObj.type | 291 | var type = jObj.type; |
293 | var obj; | 292 | var obj; |
294 | switch (type) | 293 | switch (type) |
295 | { | 294 | { |
296 | case 1: | 295 | case 1: |
297 | obj = new NinjaCvsRt.RuntimeRectangle(); | 296 | obj = new NinjaCvsRt.RuntimeRectangle(); |
298 | obj.importJSON( jObj, parent ); | 297 | obj.importJSON( jObj ); |
299 | break; | 298 | break; |
300 | 299 | ||
301 | case 2: // circle | 300 | case 2: // circle |
302 | obj = new NinjaCvsRt.RuntimeOval(); | 301 | obj = new NinjaCvsRt.RuntimeOval(); |
303 | obj.importJSON( jObj, parent ); | 302 | obj.importJSON( jObj ); |
304 | break; | 303 | break; |
305 | 304 | ||
306 | case 3: // line | 305 | case 3: // line |
307 | obj = new NinjaCvsRt.RuntimeLine(); | 306 | obj = new NinjaCvsRt.RuntimeLine(); |
308 | obj.importJSON( jObj, parent ); | 307 | obj.importJSON( jObj ); |
309 | break; | 308 | break; |
310 | 309 | ||
311 | default: | 310 | default: |
@@ -514,7 +513,7 @@ NinjaCvsRt.RuntimeGeomObj = function () | |||
514 | case "pulse": mat = new NinjaCvsRt.RuntimePulseMaterial(); break; | 513 | case "pulse": mat = new NinjaCvsRt.RuntimePulseMaterial(); break; |
515 | 514 | ||
516 | default: | 515 | default: |
517 | console.log( "material type: " + materialType + " is not supported" ); | 516 | console.log( "material type: " + shaderName + " is not supported" ); |
518 | break; | 517 | break; |
519 | } | 518 | } |
520 | 519 | ||
@@ -638,7 +637,7 @@ NinjaCvsRt.RuntimeGeomObj = function () | |||
638 | 637 | ||
639 | return mat; | 638 | return mat; |
640 | }; | 639 | }; |
641 | 640 | ||