Add Display of Avatars

Add Display of Avatars
This commit is contained in:
Alezia Kurdis 2024-03-29 23:01:21 -04:00 committed by GitHub
parent 475dd08845
commit a065ff96f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,