mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2025-08-06 10:44:00 +00:00
first pass, maybe doesn't work
This commit is contained in:
@@ -469,14 +469,14 @@
|
||||
this.Parts = []
|
||||
this.studsFields2D = []
|
||||
let lod = {{ lod }}
|
||||
let GeometryLocation = `lod${lod}/${designID}.g`
|
||||
let PrimitiveLocation = `${designID}.xml`
|
||||
let GeometryLocation = `brickprimitives/lod${lod}/${designID}.g`
|
||||
let PrimitiveLocation = `Primitives/${designID}.xml`
|
||||
|
||||
let GeometryCount = 0
|
||||
while (GeometryLocation in database.filelist) {
|
||||
this.Parts[GeometryCount] = new GeometryReader(database.filelist[GeometryLocation].read())
|
||||
GeometryCount = GeometryCount + 1
|
||||
GeometryLocation = `lod${lod}/${designID}.g${GeometryCount}`
|
||||
GeometryLocation = `brickprimitives/lod${lod}/${designID}.g${GeometryCount}`
|
||||
}
|
||||
let primitive = new Primitive(database.filelist[PrimitiveLocation].read())
|
||||
this.Partname = primitive.Designname
|
||||
@@ -549,7 +549,7 @@
|
||||
|
||||
LoadDBURL(dbURLlocation){
|
||||
this.database = new DBURLReader(dbURLlocation)
|
||||
if(this.database.initok && this.database.fileexist('Materials.xml') && this.database.fileexist('localizedStrings.loc')){
|
||||
if(this.database.initok && this.database.fileexist('Materials.xml')){
|
||||
this.allMaterials = new Materials(this.database.filelist['Materials.xml'].read())
|
||||
}
|
||||
}
|
||||
@@ -881,7 +881,6 @@
|
||||
|
||||
|
||||
class Materials {
|
||||
//done
|
||||
constructor(data) {
|
||||
this.Materials = {}
|
||||
let parser = new DOMParser();
|
||||
@@ -928,13 +927,11 @@
|
||||
|
||||
|
||||
function FindDBURL(){
|
||||
let dburl = 'https://json.aronwk.com/LDD-DB/'
|
||||
let dburl = '/luclient/ldddb/'
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', dburl, false); // `false` makes the request synchronous
|
||||
|
||||
// request state change event
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
// request completed?
|
||||
if (xhr.readyState !== 4) {//return;
|
||||
dburl = false;
|
||||
@@ -950,7 +947,6 @@
|
||||
console.log('HTTP error in FindDBURL:', xhr.status, xhr.statusText);
|
||||
}
|
||||
};
|
||||
|
||||
// start request
|
||||
xhr.send();
|
||||
return dburl
|
||||
@@ -1041,13 +1037,7 @@
|
||||
self.parse(dburl + obj.name + '/', obj.name)
|
||||
}
|
||||
else if (obj.type == 'file'){
|
||||
|
||||
if (folder.includes("lod")){
|
||||
|
||||
self.filelist[`${folder}/${obj.name}`] = new DBURLFile(dburl + obj.name, obj.name)
|
||||
} else {
|
||||
self.filelist[obj.name] = new DBURLFile(dburl + obj.name, obj.name)
|
||||
}
|
||||
self.filelist[obj.name] = new DBURLFile(dburl + obj.name, obj.name)
|
||||
}
|
||||
else {
|
||||
console.log('Strange object parsed: ' + obj.type)
|
||||
|
Reference in New Issue
Block a user