|
@@ -312,6 +312,8 @@ export function mountPipeEnhancement(host, plan, { rendererFactory = defaultRend
|
|
|
* 与「到期精确到位」,而不是只能验证终态。
|
|
* 与「到期精确到位」,而不是只能验证终态。
|
|
|
*/
|
|
*/
|
|
|
const FLIGHT_MS = 620
|
|
const FLIGHT_MS = 620
|
|
|
|
|
+ /** 定位终点距离倍率:1.3 太贴脸,1.8 留出邻域上下文(维护者 2026-10-23 反馈)。 */
|
|
|
|
|
+ const FOCUS_DISTANCE_FACTOR = 1.8
|
|
|
const nowImpl = typeof now === 'function'
|
|
const nowImpl = typeof now === 'function'
|
|
|
? now
|
|
? now
|
|
|
: () => (typeof performance !== 'undefined' && typeof performance.now === 'function' ? performance.now() : Date.now())
|
|
: () => (typeof performance !== 'undefined' && typeof performance.now === 'function' ? performance.now() : Date.now())
|
|
@@ -555,7 +557,11 @@ export function mountPipeEnhancement(host, plan, { rendererFactory = defaultRend
|
|
|
// 图标按屏幕像素恒定尺寸缩放,飞行途中会变大变小,用整体盒算中心会让镜头「飘」。
|
|
// 图标按屏幕像素恒定尺寸缩放,飞行途中会变大变小,用整体盒算中心会让镜头「飘」。
|
|
|
const anchor = device.getObjectByName('device-body') || device
|
|
const anchor = device.getObjectByName('device-body') || device
|
|
|
const bounds = new THREE.Box3().setFromObject(anchor).getBoundingSphere(new THREE.Sphere())
|
|
const bounds = new THREE.Box3().setFromObject(anchor).getBoundingSphere(new THREE.Sphere())
|
|
|
- const toDistance = Math.max(0.5, bounds.radius / Math.sin(THREE.MathUtils.degToRad(camera.fov / 2)) * 1.3)
|
|
|
|
|
|
|
+ // 终点距离:把设备包围球刚好塞满视野再往后退一截(维护者 2026-10-23:
|
|
|
|
|
+ // 「最终移动到的终点离设备有点太近了,可以稍微拉远一点点」)。
|
|
|
|
|
+ // 1.3 会把设备顶到画面边缘,改为 1.8(约 +38%)留出周围管网上下文。
|
|
|
|
|
+ const fitDistance = bounds.radius / Math.sin(THREE.MathUtils.degToRad(camera.fov / 2))
|
|
|
|
|
+ const toDistance = Math.max(0.8, fitDistance * FOCUS_DISTANCE_FACTOR)
|
|
|
// 平滑飞行定位(不再瞬移);返回 true 表示已受理,飞行在后续帧推进。
|
|
// 平滑飞行定位(不再瞬移);返回 true 表示已受理,飞行在后续帧推进。
|
|
|
startFlight(bounds.center, toDistance)
|
|
startFlight(bounds.center, toDistance)
|
|
|
return true
|
|
return true
|