Cesium assets

Recently the single-tile imagery and similar files moved into a new directory, Source/Assets/Imagery. Also, some widget icons moved into Source/Widgets/Images. In master, the built version of Cesium.js does not include any widgets, so these widget images are never needed by Cesium.js. It makes sense for the widget images to be near the widget source, for relative paths etc.

I’m working on a branch (called simple-widget) that bundles the non-Dojo widgets (native JS widgets) into Cesium.js. It currently has a UI-less Viewer widget that can load and display CZML and perform all of the non-Dojo functions of CesiumViewerWidget. On this branch, it doesn’t make sense to have Source/Assets/Imagery be far apart from Source/Widgets/Images. I’d rather have a Source/Assets/UI or something to hold widget icons and possibly widget CSS. The reasoning is simple, if you’re including just one JS file (Cesium.js) and the native widgets are bundled with that, those widgets will want a single base path to the assets folder to gain access to imagery, icons, CSS, etc. I could supply a path to the top of the source tree, but the whole point is to not have a source tree, just the built version and its assets.

It might be inconvenient to move the widget images away from the widget source for apps that do use Dojo and AMD. What to do? Should the build script copy the needed images into a Build/Assets/* folder? Would we be OK making a duplicate of all the Assets/Imagery under Build/Assets/Imagery?

In somewhat related news, I have purely a Windows problem: anytime I re-build, the items in my build folder no longer inherit the security permissions of the parent folder, and become inaccessible from IIS. I have to go in and click the button to reset all security on all subfolders. This doesn’t happen in Visual Studio projects, only Eclipse or Ant seems to be doing it. It drives me nuts, I just want to build and immediately test it, without having to muck with security settings each time. It cripples the number of iterations I can do in a short span. That’s a major reason why I’m not excited to move the assets folder there.

So partly because of the above, and also to avoid duplicating image/imagery files for users, my vote is to keep Source/Assets/Imagery in place and just rename Source/Widgets/Images to something under Assets, like Source/Assets/UI or similar. This would mean more complex pathing for Dojo/AMD widgets, but that’s what require.js is great at figuring out anyway.