Closed techtonik closed 8 years ago
I'm sorry, but I'm unable to replicate. The tree draws correctly for me, and I don't get an error message.
In addition, the underlying data this version of the tech-tree is generated from is several years out-of-date. If you've got 0ad installed, you'd be better off using the in-game Structure Tree.
This is on Chrome - Firefox works fine.
Here is more:
(civ select) Calculating starting points of tree
techtree.js:420 (draw) Drawing tech tree.
svg.min.js:1 Uncaught TypeError: Cannot read property 'numberOfItems' of undefined
SVG.extend.parse @ svg.min.js:1
SVG.Array @ svg.min.js:1
SVG.PathArray @ svg.min.js:1
SVG.Path.SVG.invent.extend.plot @ svg.min.js:2
SVG.Path.SVG.invent.construct.path @ svg.min.js:2
drawDepLine @ techtree.js:602
draw3 @ techtree.js:577
selectCiv @ techtree.js:112
onchange @ (index):22
undefined:1 GET http://s06eye.co.uk/0ad/techtree/mods/0ad/art/textures/ui/session/portraits/technologies/undefined 404 (Not Found)
Looks awesome on FF, BTW. I am looking at it as for a tool for general data representation.
Ah, I don't use Chrome and don't have it installed on any of my machines.
I've updated the version of svg.js being used (which was "fun" as they'd changed parts of their api). Could you try again?
And as a tool it's not brilliant - I never back-ported the data caching code I wrote for v2, so it causes needless file reads on the server every time the page is visited. Not to mention the colour scheme...
Yes. It works now. =)
I can't say that color scheme is so awful - it is not distracting and readable. Much better than most open source project web designs and 99% of bootstrap copies out there. )
Are there any pluggable cache solutions? So that you can grab files by name from directory, from DB or local cache or whatever?
If it works, then I'll close the ticket. Thanks for reporting it.
As to the cache - this version of the techtree does grab files from a directory. Problem is, there's about a hundred of them, and they're all loaded, the data contained within them is processed, and then the result is passed to the client browser. And this happens every time the page is accessed.
However, with the techtree-v2, the first time the 'tree is ever accessed, the server loads the necessary data files (3-4 times that of v1), parses the data contained within, then saves a copy of the parse-result to an auto-created file before sending said result to the client browser. The next time the page is accessed (by anyone), the server just returns the contents of the saved parse-result. Faster for (subsequent) users, and less stress on the server.
Anyhow, off-topic. Problem fixed, issue closed. Thanks again. (Will now update the svg.js library of the techtree-v2, as that most likely suffers from the same problem)
http://s06eye.co.uk/0ad/techtree/ says
And error console logs this error: