@eturnity/eturnity_3d 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -324,20 +324,19 @@ export default {
|
|
|
324
324
|
//roofs
|
|
325
325
|
let mesh=this.meshes.roofMeshes[roof.id]
|
|
326
326
|
mesh.material=this.material.roof
|
|
327
|
-
|
|
328
|
-
if(this.material.roof.project){
|
|
327
|
+
if(this.material.roof && this.material.roof.project){
|
|
329
328
|
this.material.roof.project(mesh)
|
|
330
329
|
}
|
|
331
330
|
//obstacle on roof
|
|
332
331
|
roof.holes.filter(p=>p.layer=="obstacle").forEach(obstacle=>{
|
|
333
332
|
let meshObstacle=this.meshes.obstacleMeshes[obstacle.id + '-' + roof.id + '_top']
|
|
334
333
|
meshObstacle.material=this.material.roof
|
|
335
|
-
if(this.material.roof.project) this.material.roof.project(meshObstacle)
|
|
334
|
+
if(this.material.roof && this.material.roof.project) this.material.roof.project(meshObstacle)
|
|
336
335
|
})
|
|
337
336
|
})
|
|
338
337
|
//background tile
|
|
339
338
|
this.meshes.backgroundMesh.material=this.material.roof
|
|
340
|
-
if(this.material.roof.project) this.material.roof.project(this.meshes.backgroundMesh)
|
|
339
|
+
if(this.material.roof && this.material.roof.project) this.material.roof.project(this.meshes.backgroundMesh)
|
|
341
340
|
},
|
|
342
341
|
renderBase() {
|
|
343
342
|
//rendering of walls
|
|
@@ -451,7 +450,7 @@ export default {
|
|
|
451
450
|
mesh.geometry = geometry
|
|
452
451
|
if(this.material.roof){
|
|
453
452
|
mesh.material=this.material.roof
|
|
454
|
-
if(this.material.roof.project) this.material.roof.project(mesh)
|
|
453
|
+
if(this.material.roof && this.material.roof.project) this.material.roof.project(mesh)
|
|
455
454
|
}
|
|
456
455
|
mesh.frustumCulled = false
|
|
457
456
|
mesh.updateMatrix()
|