Hey Nicola,
indeed, the LDraw site should have the complete library online (can somebody confirm that?).
I think the biggest challange is, that your renderer needs the complete library in a special
folder structure (one folder or your suggested subfolder structure).
I have almost no skills in JavaScript, but I had a closer look into your code, tried some
changes and used copy and past to generate the following code snippet (the paths are
hardcoded):
Due to my missing knowledge of JavaSkript, I have no idea if my code causes deadlocks or
dead threads or ... whatever. But it seems to work with the standart folder structure: http://www.digital-bricks.de/en/index.ph...&part=3005
I would really like to see your Brigl renderer used at the parts tracker and / or in this forum.
Rolf
indeed, the LDraw site should have the complete library online (can somebody confirm that?).
I think the biggest challange is, that your renderer needs the complete library in a special
folder structure (one folder or your suggested subfolder structure).
I have almost no skills in JavaScript, but I had a closer look into your code, tried some
changes and used copy and past to generate the following code snippet (the paths are
hardcoded):
Code:
asyncReq: function(partName, callback)
{
var purl = "../parts/"+partName;
purl = purl.replace(/\\/gi,"/");
this.asyncnum++;
new Ajax.Request(purl, {
method:'get',
onSuccess: (function(transport) {
var res = transport.responseText;
this.asyncnum--;
callback(res);
}).bind(this),
onFailure: (function() {
purl = "../p/"+partName;
new Ajax.Request(purl, {
method:'get',
onSuccess: (function(transport) {
var res = transport.responseText;
this.asyncnum--;
callback(res);
}).bind(this),
onFailure: (function() {
this.asyncnum--;
alert( 'Something went wrong loading: '+purl);
}).bind(this)
});
}).bind(this)
});
},
Due to my missing knowledge of JavaSkript, I have no idea if my code causes deadlocks or
dead threads or ... whatever. But it seems to work with the standart folder structure: http://www.digital-bricks.de/en/index.ph...&part=3005
I would really like to see your Brigl renderer used at the parts tracker and / or in this forum.
Rolf