fixed doors
This commit is contained in:
@@ -105,6 +105,7 @@ class DDImporter {
|
||||
if (ddWalls.loop){
|
||||
points = points.concat(points.slice(0,2))
|
||||
}
|
||||
let currentwalls = [];
|
||||
for(let i = 0; i < points.length-3; i+=2)
|
||||
{
|
||||
allwalls.push([[points[i], points[i+1]], [points[i+2], points[i+3]]])
|
||||
@@ -116,8 +117,8 @@ class DDImporter {
|
||||
let portalPoint2 = [portalCenterPoint[0] - portal.radius*portalDirection[0], portalCenterPoint[1] - portal.radius*portalDirection[1]] ;
|
||||
alldoors.push([portalPoint1, portalPoint2])
|
||||
let allwalls_new = []
|
||||
for (let lineindex = 0; lineindex < allwalls.length; lineindex+=1){
|
||||
let line = allwalls[lineindex]
|
||||
for (let lineindex = 0; lineindex < acurrentwallsllwalls.length; lineindex+=1){
|
||||
let line = acurrentwallsllwalls[lineindex]
|
||||
if (this.pointIsOnLine(portalCenterPoint,line)){
|
||||
let endpoint1 = this.getNearerPoint(line[0], [portalPoint1, portalPoint2])
|
||||
let endpoint2 = this.getNearerPoint(line[1], [portalPoint1, portalPoint2])
|
||||
@@ -132,8 +133,9 @@ class DDImporter {
|
||||
allwalls_new.push(line)
|
||||
}
|
||||
}
|
||||
allwalls = allwalls_new
|
||||
acurrentwallsllwalls = allwalls_new
|
||||
}
|
||||
allwalls = allwalls.concat(currentwalls)
|
||||
}
|
||||
|
||||
for (let w of allwalls){
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "dd-import",
|
||||
"title": "DungeonDraft Importer",
|
||||
"description": "Imports scene elements from Dungeon Draft map files",
|
||||
"version": "0.4.19",
|
||||
"version": "0.4.20",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Moo Man"
|
||||
|
||||
Reference in New Issue
Block a user