Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by orubel

Because I am putting Impact within a WAR, I need the resource to be located outside the WAR so that each time I reload the environment, resources dont get overwritten.

As such, I need the PATHS to call 'aboslute' in the sense of the server and not the url; IE. if I send the image directory to JS, it cannot merely concatenate it onto the url and expect to find it since it will reside outside the directory structure or on a different file serve.

I suspect I will need call backend services for getting this data but so much needs to be changes since Impact is coded only to expect a client side approach.

Any suggestions?

1 decade ago by orubel

It looks like my issue with loading tilesets comes down to image.js and the function

init: function( path ) {
this.path = path;
this.load();
},

In background-map.js, the tileset is being set as an image via...

setTileset: function( tileset ) {
this.tilesetName = tileset instanceof ig.Image ? tileset.path : tileset;
this.tiles = new ig.Image( this.tilesetName );
this.preRenderedChunks = null;
},

Ans so the path is being set as part of the url. Is there any reason why I should not edit the hell out of this function to read the path from a backend ajax call?

And then how do I bypass that 'load' call in the image.js class to pass any ajax data back?

1 decade ago by orubel

Solved it... partially! Since this is going through an Apache proxy/reverse proxy, I can put the media on the Apache proxy and then reference it through a different url.

This solves a large part of the problem.

1 decade ago by Arantor

Or you just supply the full URL to the image in the first place instead of a relative one, no code editing required.

1 decade ago by orubel

Arantor,

No can do. You can't supply the full path to resources that exist outside the web directory; JS can't reference them. Aside from that there are other issues like the fact that I want to do checks on the resources like associations.

You have to have resources outside of web directory to avoid overwriting upon reload of project; project allows for people to overwrite resources.

1 decade ago by orubel

ok so the resolution to this was for me to build in test/development environments an actual folder with test data but within production to using a symbolic link; I did this in Tomcat by building out those directories as 'contexts' so when I load the WAR, any reference to those directories are ignored and they are instead referenced through the context.
Page 1 of 1
« first « previous next › last »