mirror of
https://github.com/Sheldan/canvas.git
synced 2026-03-26 22:29:49 +00:00
always show planet names in front of moon names
This commit is contained in:
@@ -183,13 +183,18 @@ function initScene(font) {
|
||||
});
|
||||
|
||||
let textDistance = 2;
|
||||
if (sphereConfig.isMoon) {
|
||||
let isMoon = sphereConfig.isMoon;
|
||||
if (isMoon) {
|
||||
textDistance = 5;
|
||||
}
|
||||
const textMesh = new THREE.Mesh(label, material);
|
||||
textMesh.scale.set( scale, scale, scale );
|
||||
textMesh.position.x = textDistance * objectRadius * (Math.random() * textDistance - textDistance) + Math.random() * config.AU / 10;
|
||||
textMesh.position.y = textDistance * objectRadius * (Math.random() * textDistance - textDistance) + Math.random() * config.AU / 10;
|
||||
if(!isMoon) {
|
||||
textMesh.renderOrder = 999;
|
||||
textMesh.material.depthTest = false
|
||||
}
|
||||
texts.push(textMesh)
|
||||
group.add(textMesh);
|
||||
sphereConfig.text = textMesh;
|
||||
|
||||
Reference in New Issue
Block a user