|
@@ -53,10 +53,14 @@ const toCameraDistance = ref(path.toCameraDistance);
|
|
|
path.bus.on("toCameraDistanceChange", (v) => (toCameraDistance.value = v));
|
|
|
const show = computed(
|
|
|
() =>
|
|
|
+ !props.path.points.length ||
|
|
|
props.path.globalVisibility ||
|
|
|
toCameraDistance.value <= Math.pow(props.path.visibilityRange, 2)
|
|
|
);
|
|
|
-watchEffect(() => path.visibility(show.value));
|
|
|
+watchEffect(() => {
|
|
|
+ console.error("globalVisibility", show.value);
|
|
|
+ path.visibility(show.value);
|
|
|
+});
|
|
|
|
|
|
let currentPoints = props.path.points;
|
|
|
let changPointsTimeout: any;
|
|
@@ -124,7 +128,7 @@ path.bus.on("linePositionChange", (position) => {
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
console.error(path, "destory");
|
|
|
- path.destory();
|
|
|
+ path.destroy();
|
|
|
});
|
|
|
defineExpose(path);
|
|
|
</script>
|