From a065ff96f104165aa2e26de5640938b501b72b89 Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Fri, 29 Mar 2024 23:01:21 -0400 Subject: [PATCH] Add Display of Avatars Add Display of Avatars --- applications/domainMapper/app-domainMapper.js | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/applications/domainMapper/app-domainMapper.js b/applications/domainMapper/app-domainMapper.js index b0300dd..e18fe44 100644 --- a/applications/domainMapper/app-domainMapper.js +++ b/applications/domainMapper/app-domainMapper.js @@ -95,7 +95,6 @@ if (domainName === "") { domainName = "SERVERLESS"; } - var zones = Entities.findEntitiesByType("Zone", {"x": 0, "y": 0, "z": 0}, FULL_DOMAIN_SCAN_RADIUS); if (displayPosition === null) { @@ -326,8 +325,16 @@ "shape": "Cube", "parentID": domainMapID, "grab": {"grabbable": false }, - "dimensions": {"x": DOMAIN_MAP_SIZE * (properties.dimensions.x/DOMAIN_SIZE), "y": DOMAIN_MAP_SIZE * (properties.dimensions.y/DOMAIN_SIZE), "z": DOMAIN_MAP_SIZE * (properties.dimensions.z/DOMAIN_SIZE)}, - "localPosition": {"x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), "y": (DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2)), "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) }, + "dimensions": { + "x": DOMAIN_MAP_SIZE * (properties.dimensions.x/DOMAIN_SIZE), + "y": DOMAIN_MAP_SIZE * (properties.dimensions.y/DOMAIN_SIZE), + "z": DOMAIN_MAP_SIZE * (properties.dimensions.z/DOMAIN_SIZE) + }, + "localPosition": { + "x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), + "y": (DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2)), + "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) + }, "localRotation": properties.rotation, "color": color, "alpha": 0.1, @@ -342,8 +349,16 @@ "shape": "Cube", "parentID": domainMapID, "grab": {"grabbable": false }, - "dimensions": {"x": DOMAIN_MAP_SIZE * (properties.dimensions.x/DOMAIN_SIZE), "y": DOMAIN_MAP_SIZE * (properties.dimensions.y/DOMAIN_SIZE), "z": DOMAIN_MAP_SIZE * (properties.dimensions.z/DOMAIN_SIZE)}, - "localPosition": {"x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), "y": (DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2)), "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) }, + "dimensions": { + "x": DOMAIN_MAP_SIZE * (properties.dimensions.x/DOMAIN_SIZE), + "y": DOMAIN_MAP_SIZE * (properties.dimensions.y/DOMAIN_SIZE), + "z": DOMAIN_MAP_SIZE * (properties.dimensions.z/DOMAIN_SIZE) + }, + "localPosition": { + "x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), + "y": (DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2)), + "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) + }, "localRotation": properties.rotation, "color": color, "alpha": 1, @@ -369,9 +384,9 @@ "grab": {"grabbable": false }, "dimensions": {"x": 4, "y": 0.1, "z": 0.01}, "localPosition": { - "x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), - "y": ((DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2))) + ((DOMAIN_MAP_SIZE * (properties.dimensions.y/DOMAIN_SIZE))/2) + lineHight, - "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) + "x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), + "y": ((DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2))) + ((DOMAIN_MAP_SIZE * (properties.dimensions.y/DOMAIN_SIZE))/2) + lineHight, + "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) }, "text": properties.name, "lineHeight": lineHight, @@ -408,7 +423,11 @@ "shape": "Sphere", "grab": {"grabbable": false }, "dimensions": {"x": 0.003, "y": 0.003, "z": 0.003}, - "localPosition": {"x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), "y": (DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2)), "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) }, + "localPosition": { + "x": (DOMAIN_MAP_SIZE/2) * (properties.position.x/(DOMAIN_SIZE/2)), + "y": (DOMAIN_MAP_SIZE/2) * (properties.position.y/(DOMAIN_SIZE/2)), + "z": (DOMAIN_MAP_SIZE/2) * (properties.position.z/(DOMAIN_SIZE/2)) + }, "color": avatarColor, "alpha": 0.8, "canCastShadow": false,