diff options
author | Jose Antonio Marquez | 2012-03-11 11:29:56 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-11 11:29:56 -0700 |
commit | 49e4c8695941f6bdd15893534ffb3ccce92c5396 (patch) | |
tree | 9e8327be823441717ad44684d0e3714c56116f39 /js/helper-classes/RDGE/src/core/script/engine.js | |
parent | 9ab4b4306343ec2a20094c7626abb524b7720ce8 (diff) | |
parent | 242bddd5b64c4a5226daa2f4caa10bf63c56403a (diff) | |
download | ninja-49e4c8695941f6bdd15893534ffb3ccce92c5396.tar.gz |
Merge branch 'refs/heads/FileIO-Integration' into FileIO
Diffstat (limited to 'js/helper-classes/RDGE/src/core/script/engine.js')
-rwxr-xr-x | js/helper-classes/RDGE/src/core/script/engine.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/helper-classes/RDGE/src/core/script/engine.js b/js/helper-classes/RDGE/src/core/script/engine.js index 5bc9305c..f5724665 100755 --- a/js/helper-classes/RDGE/src/core/script/engine.js +++ b/js/helper-classes/RDGE/src/core/script/engine.js | |||
@@ -89,6 +89,8 @@ stateManager = function() | |||
89 | g_enableBenchmarks = true; | 89 | g_enableBenchmarks = true; |
90 | function Engine() | 90 | function Engine() |
91 | { | 91 | { |
92 | this._assetPath = "assets/"; | ||
93 | |||
92 | // map of scene graphs to names | 94 | // map of scene graphs to names |
93 | this.sceneMap = []; | 95 | this.sceneMap = []; |
94 | 96 | ||
@@ -228,6 +230,19 @@ function Engine() | |||
228 | contextManager.currentCtx = savedCtx; | 230 | contextManager.currentCtx = savedCtx; |
229 | 231 | ||
230 | } | 232 | } |
233 | |||
234 | this.remapAssetFolder = function( url ) | ||
235 | { | ||
236 | var searchStr = "assets/"; | ||
237 | var index = url.indexOf( searchStr ); | ||
238 | var rtnPath = url; | ||
239 | if (index >= 0) | ||
240 | { | ||
241 | rtnPath = url.substr( index + searchStr.length ); | ||
242 | rtnPath = this._assetPath + rtnPath; | ||
243 | } | ||
244 | return rtnPath; | ||
245 | } | ||
231 | 246 | ||
232 | } | 247 | } |
233 | 248 | ||