mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
Code review in radar.js
This commit is contained in:
parent
7ee067de35
commit
e0b57a2228
1 changed files with 10 additions and 19 deletions
|
@ -1082,29 +1082,20 @@ function renderAllOthersAvatarIcons() {
|
|||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* Entities (to remark) cache structure for showing entities markers
|
||||
******************************************************************************/
|
||||
|
||||
var ICON_ENTITY_DEFAULT_DIMENSIONS = {
|
||||
x : 0.10,
|
||||
y : 0.00001,
|
||||
z : 0.10
|
||||
};
|
||||
|
||||
var entityIconModelDimensionsVal = {
|
||||
x : 0,
|
||||
y : 0.00001,
|
||||
z : 0
|
||||
};
|
||||
|
||||
function teleportIconModelDimensions(y) {
|
||||
// given the current height, give a size
|
||||
// TODO: receive entity.position.y and substract to radarHeight
|
||||
var teleportModelDimensions = ICON_ENTITY_DEFAULT_DIMENSIONS;
|
||||
var xz = -0.002831 * (radarHeight - y) + 0.1;
|
||||
entityIconModelDimensionsVal.x = xz;
|
||||
entityIconModelDimensionsVal.z = xz;
|
||||
teleportModelDimensions.x = xz;
|
||||
teleportModelDimensions.z = xz;
|
||||
// reuse object
|
||||
return entityIconModelDimensionsVal;
|
||||
return teleportModelDimensions;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Reference in a new issue