Fix galaxy flow motion and lock overlap separation
This commit is contained in:
@@ -24,17 +24,17 @@ export function layoutLockLabels(
|
||||
names: string[],
|
||||
starR: number,
|
||||
): LabelPlacement[] {
|
||||
const vaultPad = 52;
|
||||
const vaultPad = 108;
|
||||
const labels: LabelPlacement[] = starPositions.map((p, i) => {
|
||||
const ang = Math.atan2(p.y, p.x);
|
||||
const base = starR + 20;
|
||||
const base = starR + 28;
|
||||
return {
|
||||
x: p.x + Math.cos(ang) * base,
|
||||
y: p.y + Math.sin(ang) * base,
|
||||
};
|
||||
});
|
||||
|
||||
for (let iter = 0; iter < 28; iter++) {
|
||||
for (let iter = 0; iter < 48; iter++) {
|
||||
for (let i = 0; i < labels.length; i++) {
|
||||
const p = starPositions[i];
|
||||
const r = dist(labels[i], { x: 0, y: 0 });
|
||||
@@ -65,7 +65,7 @@ export function layoutLockLabels(
|
||||
labels[i].y - starPositions[i].y,
|
||||
labels[i].x - starPositions[i].x,
|
||||
);
|
||||
const minDist = starR + 16;
|
||||
const minDist = starR + 26;
|
||||
const dStar = dist(labels[i], starPositions[i]);
|
||||
if (dStar < minDist) {
|
||||
labels[i].x = starPositions[i].x + Math.cos(outward) * minDist;
|
||||
|
||||
Reference in New Issue
Block a user