3d labels - draw labels as they are

This commit is contained in:
Azgaar 2021-07-17 23:32:02 +03:00
parent 14b35cf93b
commit edf728a12e
2 changed files with 13 additions and 15 deletions

View file

@ -269,7 +269,7 @@
size: +towns.attr("data-size"),
color: towns.attr("fill"),
elevation: 5,
quality: 20,
quality: 30,
iconSize: +town_icons.attr("size"),
iconColor: "#666",
line: 5 - towns.attr("data-size") / 2
@ -326,7 +326,8 @@
if (state.removed) continue;
const [x, y, z] = get3dCoords(state.pole[0], state.pole[1]);
const stateSprite = await createTextLabel({text: state.fullName, ...stateOptions});
const text = states.select("#stateLabel" + state.i)?.text() || state.name;
const stateSprite = await createTextLabel({text, ...stateOptions});
stateSprite.position.set(x, y + stateOptions.elevation, z);
stateSprite.size = stateOptions.size;