release: bump version to 0.49.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import * as THREE from "three";
|
||||
|
||||
import { BGP_CONFIG, CONFIG, PATHS } from "./constants.js";
|
||||
import { createInteractableLayer } from "./interactable.js";
|
||||
import {
|
||||
createInteractableLayer,
|
||||
SURFACE_AVOIDANCE_PROFILES,
|
||||
} from "./interactable.js";
|
||||
import { getSurfaceMarkerCameraScale, latLonToVector3 } from "./utils.js";
|
||||
|
||||
const bgpGroup = new THREE.Group();
|
||||
@@ -397,6 +400,7 @@ const bgpCollectorIconLayer = createInteractableLayer({
|
||||
activity,
|
||||
};
|
||||
},
|
||||
avoidance: SURFACE_AVOIDANCE_PROFILES.city,
|
||||
});
|
||||
|
||||
function clamp(value, min, max) {
|
||||
@@ -1480,20 +1484,28 @@ export function updateBGPVisualState(lockedObjectType, lockedObject, camera, cru
|
||||
scale *= 1 + 0.05 * pulse;
|
||||
}
|
||||
|
||||
// When this collector shares a city-level avoidance bucket with another
|
||||
// interactable layer (e.g. compute centers), the icon is fanned out by
|
||||
// ~1.4u but the decorative halos extend 11–40u and would still cover the
|
||||
// neighbour. Shrink+fade them so the other layer remains visible.
|
||||
const crossLayer = Boolean(marker.userData.icon_avoidance_cross_layer);
|
||||
const haloOpacityMul = crossLayer && !isLocked && !isHovered ? 0.18 : 1;
|
||||
const haloScaleMul = crossLayer && !isLocked && !isHovered ? 0.45 : 1;
|
||||
|
||||
if (marker.userData.heatHalo) {
|
||||
marker.userData.heatHalo.position.copy(marker.position);
|
||||
marker.userData.heatHalo.material.opacity = haloOpacity;
|
||||
marker.userData.heatHalo.material.opacity = haloOpacity * haloOpacityMul;
|
||||
marker.userData.heatHalo.material.color.setHex(marker.userData.baseColor || BGP_CONFIG.collectorColor);
|
||||
marker.userData.heatHalo.scale.setScalar(
|
||||
marker.userData.activity?.haloScale * 0.58 * (1 + pulse * 0.01),
|
||||
marker.userData.activity?.haloScale * 0.58 * (1 + pulse * 0.01) * haloScaleMul,
|
||||
);
|
||||
}
|
||||
if (marker.userData.pulseHalo) {
|
||||
marker.userData.pulseHalo.position.copy(marker.position);
|
||||
marker.userData.pulseHalo.material.opacity = pulseOpacity;
|
||||
marker.userData.pulseHalo.material.opacity = pulseOpacity * haloOpacityMul;
|
||||
marker.userData.pulseHalo.material.color.setHex(marker.userData.baseColor || BGP_CONFIG.collectorColor);
|
||||
marker.userData.pulseHalo.scale.setScalar(
|
||||
marker.userData.activity?.pulseHaloScale * 0.48 * (1 + pulse * 0.02),
|
||||
marker.userData.activity?.pulseHaloScale * 0.48 * (1 + pulse * 0.02) * haloScaleMul,
|
||||
);
|
||||
}
|
||||
if (marker.userData.statusCore) {
|
||||
@@ -1511,10 +1523,10 @@ export function updateBGPVisualState(lockedObjectType, lockedObject, camera, cru
|
||||
}
|
||||
if (marker.userData.coverageHalo) {
|
||||
marker.userData.coverageHalo.position.copy(marker.position);
|
||||
marker.userData.coverageHalo.material.opacity = coverageOpacity;
|
||||
marker.userData.coverageHalo.material.opacity = coverageOpacity * haloOpacityMul;
|
||||
marker.userData.coverageHalo.scale.set(
|
||||
marker.userData.activity?.coverageHaloScale * 0.82 * (1 + pulse * 0.012),
|
||||
marker.userData.activity?.coverageHaloScale * 0.56 * (1 + pulse * 0.012),
|
||||
marker.userData.activity?.coverageHaloScale * 0.82 * (1 + pulse * 0.012) * haloScaleMul,
|
||||
marker.userData.activity?.coverageHaloScale * 0.56 * (1 + pulse * 0.012) * haloScaleMul,
|
||||
1,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user