Debian Codegraph @

Nasal/canvas/map/WXR.symbol

raw
1 # See: http://wiki.flightgear.org/MapStructure
2 # Class things:
3 var name = 'WXR'; # storms/weather layer for LW/AW (use thunderstom scenario for testing)
4 var parents = [DotSym];
5 var __self__ = caller(0)[0];
6 DotSym.makeinstance( name, __self__ );
7
8 var element_type = "group"; # we want a group, becomes "me.element"
9
10 # TODO: how to integrate both styling and caching?
11 var draw = func {
12 # TODO: once this works properly, consider using caching here
13 # FIXME: scaling seems way off in comparison with the navdisplay - i.e. hard-coded assumptions about texture size/view port ?
14 me.element.createChild("image")
15 .setFile("Nasal/canvas/map/Images/storm.png")
16 .setSize(128*me.model.radiusNm,128*me.model.radiusNm)
17 .setTranslation(-64*me.model.radiusNm,-64*me.model.radiusNm)
18 .setCenter(0,0);
19 # .setScale(0.3);
20 # TODO: overlapping storms should probably set their z-index according to altitudes
21
22 };
23