mirror of
https://github.com/overte-org/community-apps.git
synced 2025-04-05 16:46:32 +02:00
Add Display of Avatars
Add Display of Avatars
This commit is contained in:
parent
475dd08845
commit
a065ff96f1
1 changed files with 28 additions and 9 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue