6,566
edits
(Switch to {{gitorious url}} to fix the broken Gitorious links.) |
|||
Line 111: | Line 111: | ||
{{FGCquote | {{FGCquote | ||
|Originally, it was a single monolithic update() method that would basically be called at frame rate using a settimer/maketimer callback.<br/> | |Originally, it was a single monolithic update() method that would basically be called at frame rate using a settimer/maketimer callback.<br/> | ||
When things were restructured, the conditional parts of this huge method were moved into predicates that reside in a huge hash: | When things were restructured, the conditional parts of this huge method were moved into predicates that reside in a huge hash: {{gitorious url|fg|fgdata|path=Nasal/canvas/map/navdisplay.styles|line=14}}<br/> | ||
Meanwhile, the update() method has been inflated again due to some logic that wasn't added to the hash, e.g. see: | Meanwhile, the update() method has been inflated again due to some logic that wasn't added to the hash, e.g. see: {{gitorious url|fg|fgdata|path=Nasal/canvas/map/navdisplay.mfd|line=476}}<br/> | ||
<br/> | <br/> | ||
The meat of it still is in update(), and those "layers" are fairly boring meanwhile because they're separately managed by Philosopher's MapStructure framework.<br/> | The meat of it still is in update(), and those "layers" are fairly boring meanwhile because they're separately managed by Philosopher's MapStructure framework.<br/> | ||
<br/> | <br/> | ||
But individual ND elements (canvas groups) are basically SVG-driven, i.e. SVG elements that are looked up and then updated/animated via timers and listeners: | But individual ND elements (canvas groups) are basically SVG-driven, i.e. SVG elements that are looked up and then updated/animated via timers and listeners: {{gitorious url|fg|fgdata|commit=f3df87622ca60eb45f359c05bd913524eeb44667|path=Nasal/canvas/map/navdisplay.styles|line=183}}<br/> | ||
<br/> | <br/> | ||
The actual code evaluating each SVG predicate is still called via the update() method, but it's just a foreach loop with a few lines:<br/> | The actual code evaluating each SVG predicate is still called via the update() method, but it's just a foreach loop with a few lines:<br/> | ||
{{gitorious url|fg|fgdata|path=Nasal/canvas/map/navdisplay.mfd|line=760}}<br/> | |||
<br/> | <br/> | ||
None of this is set in stone, and we're actually looking forward to generalizing this some more. | None of this is set in stone, and we're actually looking forward to generalizing this some more. | ||
Line 454: | Line 454: | ||
{{FGCquote | {{FGCquote | ||
|just so that I don't forget about it: | |just so that I don't forget about it: {{gitorious url|fg|fgdata|commit=7da1406cfbed8af69c5cefe215b4f327d791423d}}<br/> | ||
<br/> | <br/> | ||
<ul> | <ul> |