mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2026-09-25 14:33:45 +00:00
Compare commits
1 Commits
fix/ugc-mo
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4749f22c58 |
@@ -277,9 +277,7 @@
|
||||
this.xmldata = ''
|
||||
}
|
||||
|
||||
// placement: optional THREE.Matrix4 that places this model in the property. DLU stores player-built
|
||||
// (UGC) models normalized around their own origin, with the position and rotation in properties_contents.
|
||||
AddScene(file, placement = null){
|
||||
AddScene(file){
|
||||
let lxfmlfile = new DBURLFile(file,file)
|
||||
this.xmldata = lxfmlfile.read()
|
||||
|
||||
@@ -307,9 +305,7 @@
|
||||
for (let j = 0; j < childnodes.length ;j++) {
|
||||
let childnode = childnodes[j]
|
||||
if (childnode.nodeName == 'Brick'){
|
||||
let brick = new Brick(childnode)
|
||||
brick.placement = placement
|
||||
this.Bricks.push(brick)
|
||||
this.Bricks.push(new Brick(childnode))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -535,9 +531,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
LoadScene(filename, placement = null){
|
||||
LoadScene(filename){
|
||||
if(this.database.initok){
|
||||
this.scene.AddScene(filename, placement)
|
||||
this.scene.AddScene(filename)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,11 +608,6 @@
|
||||
n14, n24 ,n34, n44);
|
||||
}
|
||||
|
||||
// Move the brick from model space to its place on the property
|
||||
if (bri.placement){
|
||||
m.premultiply(bri.placement)
|
||||
}
|
||||
|
||||
let decoCount = 0
|
||||
|
||||
for (const [partindex, part] of geo.Parts.entries()){
|
||||
@@ -1042,14 +1033,10 @@
|
||||
|
||||
|
||||
//Start
|
||||
// Player-built models with the position and rotation stored for them in properties_contents
|
||||
let lxfml_file_list = [
|
||||
{% for model in content %}
|
||||
{% if model.lot == 14 %}
|
||||
{
|
||||
"url": "{{url_for('properties.get_model', id=model.id, file_format='lxfml', lod=lod)}}",
|
||||
"pos": {{ model.pos[0]|tojson }}
|
||||
}{{ ", " if not loop.last else "" }}
|
||||
"{{url_for('properties.get_model', id=model.id, file_format='lxfml', lod=lod)}}"{{ ", " if not loop.last else "" }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
@@ -1060,13 +1047,7 @@
|
||||
let converter = new Converter()
|
||||
converter.LoadDBURL(ldddburl)
|
||||
for (let i = 0; i < lxfml_file_list.length; i++) {
|
||||
let pos = lxfml_file_list[i].pos
|
||||
let placement = new THREE.Matrix4().compose(
|
||||
new THREE.Vector3(pos.x, pos.y, pos.z),
|
||||
new THREE.Quaternion(pos.rx, pos.ry, pos.rz, pos.rw),
|
||||
new THREE.Vector3(1, 1, 1)
|
||||
)
|
||||
converter.LoadScene(lxfml_file_list[i].url, placement)
|
||||
converter.LoadScene(lxfml_file_list[i])
|
||||
}
|
||||
converter.Export('test.webgl')
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ alembic==1.7.5
|
||||
autopep8==1.6.0
|
||||
bcrypt==4.0.1
|
||||
email-validator==1.1.3
|
||||
Flask==3.0.0
|
||||
Flask==3.1.3
|
||||
Flask-APScheduler==1.12.3
|
||||
Flask-Assets==2.1.0
|
||||
Flask-Migrate==3.1.0
|
||||
|
||||
Reference in New Issue
Block a user