doors
This commit is contained in:
+5
-3
@@ -115,13 +115,15 @@ class DDImporter {
|
|||||||
console.log(portal);
|
console.log(portal);
|
||||||
let portalCenterPoint = portal.position.substring(8, portal.position.length-2).split(", ").map(a => Number(a))
|
let portalCenterPoint = portal.position.substring(8, portal.position.length-2).split(", ").map(a => Number(a))
|
||||||
let portalDirection = portal.direction.substring(8, portal.direction.length-2).split(", ").map(a => Number(a))
|
let portalDirection = portal.direction.substring(8, portal.direction.length-2).split(", ").map(a => Number(a))
|
||||||
let portalPoint1 = [portalCenterPoint[0] + portal.radius*portalDirection[0], portalCenterPoint[1] + portal.radius*portalDirection[1]]
|
let portalPoint1 = [portalCenterPoint[0] + portal.radius*portalDirection[0], portalCenterPoint[1] + portal.radius*portalDirection[1]] ;
|
||||||
let portalPoint2 = [portalCenterPoint[0] - portal.radius*portalDirection[0], portalCenterPoint[1] - portal.radius*portalDirection[1]]
|
let portalPoint2 = [portalCenterPoint[0] - portal.radius*portalDirection[0], portalCenterPoint[1] - portal.radius*portalDirection[1]] ;
|
||||||
console.log(portalCenterPoint)
|
console.log(portalCenterPoint)
|
||||||
console.log(portalPoint1)
|
console.log(portalPoint1)
|
||||||
console.log(portalPoint2)
|
console.log(portalPoint2)
|
||||||
|
let portalPoint1FVTT = this.convertPointFromDDtoFVTT(portalPoint1);
|
||||||
|
let portalPoint2FVTT = this.convertPointFromDDtoFVTT(portalPoint2);
|
||||||
let wall = new Wall({
|
let wall = new Wall({
|
||||||
c : [portalPoint1[0], portalPoint1[1], portalPoint2[0], portalPoint2[1]],
|
c : [portalPoint1FVTT[0], portalPoint1FVTT[1], portalPoint2FVTT[0], portalPoint2FVTT[1]],
|
||||||
});
|
});
|
||||||
wall.data.door = CONST.WALL_DOOR_TYPES.DOOR
|
wall.data.door = CONST.WALL_DOOR_TYPES.DOOR
|
||||||
walls.push(wall.data)
|
walls.push(wall.data)
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "dd-import",
|
"name": "dd-import",
|
||||||
"title": "DungeonDraft Importer",
|
"title": "DungeonDraft Importer",
|
||||||
"description": "Imports scene elements from Dungeon Draft map files",
|
"description": "Imports scene elements from Dungeon Draft map files",
|
||||||
"version": "0.4.10",
|
"version": "0.4.11",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Moo Man"
|
"name": "Moo Man"
|
||||||
|
|||||||
Reference in New Issue
Block a user