IgeTiledComponent exemple

All things HTML5 or text based engines, or really any web based engines.
Post Reply
Solib
Posts: 6
Joined: Wed Sep 25, 2013 7:26 pm

IgeTiledComponent exemple

Post by Solib »

Rob it would be cool to see an example of using loadJson
http://www.isogenicengine.com/engine/do ... onent.html
especially cool if the example will use the format that exports http://www.mapeditor.org/
Solib
Posts: 6
Joined: Wed Sep 25, 2013 7:26 pm

Re: IgeTiledComponent exemple

Post by Solib »

i'm sorry. can close this post
i see exemple 13.6
Solib
Posts: 6
Joined: Wed Sep 25, 2013 7:26 pm

Re: IgeTiledComponent exemple

Post by Solib »

hm
if i use

Code: Select all

.tiled.loadJson(tiledExample1 /* you can also use a url: */, function (layerArray, layersById) {
});
all good
if i use

Code: Select all

.tiled.loadJson('maps/example.js', function (layerArray, layersById) {
});
in console error

Code: Select all

Uncaught ReferenceError: tiled is not defined IgeTiledComponent.js:35
scriptElem.onload
robaldred
Posts: 64
Joined: Tue Aug 27, 2013 5:54 pm

Re: IgeTiledComponent exemple

Post by robaldred »

There's an assumption in the IgeTiledComponent that isn't clear

If you pass a url, it assumes the variable assigned to the object in example.js is "tiled"
basically change "var tiledExample1" to "var tiled" when loading via url or load it like the examples do via the ClientConfig.js
Post Reply

Return to “HTML5/Web Engines”