From ed23e8eb89ad8eda665a6136ba0c8d08303e5099 Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Sun, 22 Mar 2020 19:34:45 +0100 Subject: [PATCH] updated offset --- ddimport.js | 4 ++-- module.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ddimport.js b/ddimport.js index ff99639..8bd9f10 100644 --- a/ddimport.js +++ b/ddimport.js @@ -108,8 +108,8 @@ class DDImporter { console.log(portal); 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 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 portalPoint1 = [portalCenterPoint[0] + portal.radius*portalDirection[0] + offsetX, portalCenterPoint[1] + portal.radius*portalDirection[1] + offsetY] + let portalPoint2 = [portalCenterPoint[0] - portal.radius*portalDirection[0] + offsetX, portalCenterPoint[1] - portal.radius*portalDirection[1] + offsetY] console.log(portalCenterPoint) console.log(portalPoint1) console.log(portalPoint2) diff --git a/module.json b/module.json index c6a5540..e6df88d 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "name": "dd-import", "title": "DungeonDraft Importer", "description": "Imports scene elements from Dungeon Draft map files", - "version": "0.4.5", + "version": "0.4.6", "authors": [ { "name": "Moo Man"