提交 6f91a518 作者: 翁进城

log: 增加飞行轨迹日志

上级 9f62eccf
...@@ -6,6 +6,7 @@ let positions = []; // 飞机走过的点, 会一直累计, 每n秒减半一次, ...@@ -6,6 +6,7 @@ let positions = []; // 飞机走过的点, 会一直累计, 每n秒减半一次,
setInterval(() => { setInterval(() => {
if (positions.length > 1000) { if (positions.length > 1000) {
positions = positions.filter((x, index) => index % 2 === 0); positions = positions.filter((x, index) => index % 2 === 0);
console.log('飞行轨迹', positions);
} }
}, 60000); }, 60000);
window.positions = () => { window.positions = () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论