Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] vue-cesium-v2同时启用arcgis地形+<vc-navigation>导航控件非常卡顿 #117

Open
liuqun opened this issue Jul 5, 2021 · 1 comment
Assignees
Labels
bug Something isn't working 🔨 Cesium bug Bug caused by Cesium. Can't do anything

Comments

@liuqun
Copy link

liuqun commented Jul 5, 2021

VueCesium version

2.2.5

OS/Browsers version

Windows10/Chrome最新版

Vue version

3.1.4

Reproduction Link

详见 测试代码

Steps to reproduce

  • vue版本:2.6.12
  • vue-cesium-v2最新版本:2.2.5

测试发现同时启用arcgis-tiled-elevation地形 vc-navigation导航控件时会导致cesium非常卡顿。
测试代码 如下:

<template>
  <div class="viewer">
    <vc-viewer @ready="ready">
      <vc-layer-imagery>
        <vc-provider-imagery-bingmaps
          url="https://dev.virtualearth.net"
          bmKey="AgcbDCAOb9zMfquaT4Z-MdHX4AsHUNvs7xgdHefEA5myMHxZk87NTNgdLbG90IE-"
          mapStyle="Aerial"
        ></vc-provider-imagery-bingmaps>
      </vc-layer-imagery>
      <vc-provider-terrain-arcgis-tiled-elevation
        :url="'https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer'"
      ></vc-provider-terrain-arcgis-tiled-elevation>
      <vc-navigation></vc-navigation>
    </vc-viewer>
  </div>
</template>

<script>
export default {
  data() {
    return {
      terrainUrl:
        "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",
    }
  },
  methods: {
    ready(cesiumInstance) {
      const { Cesium, viewer } = cesiumInstance
      var target = new Cesium.Cartesian3(
        300770.50872389384,
        5634912.131394585,
        2978152.2865545116
      )
      var offset = new Cesium.Cartesian3(
        6344.974098678562,
        -793.3419798081741,
        2499.9508860763162
      )
      viewer.camera.lookAt(target, offset);
      viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY)

      //调试信息:FPS帧数
      viewer.scene.debugShowFramesPerSecond = true
    },
  },
}
</script>

What is Expected?

平均帧率50fps左右,界面流畅顺滑

What is actually happening?

测试发现同时启用arcgis-tiled-elevation地形 vc-navigation导航控件时会导致cesium非常卡顿,
帧率下降到10fps以下

@liuqun liuqun changed the title [Bug Report] vue-cesium-v2同时启用arcgis-tiled-elevation地形 vc-navigation导航控件非常卡顿 [Bug Report] vue-cesium-v2同时启用arcgis地形+<vc-navigation>导航控件非常卡顿 Jul 5, 2021
@zouyaoji zouyaoji added the bug Something isn't working label Jul 6, 2021
@zouyaoji zouyaoji self-assigned this Jul 6, 2021
@zouyaoji
Copy link
Owner

zouyaoji commented Jul 6, 2021

我测了一下,这应该是在arcgis地形下,坐标拾取性能很低。

CesiumGS/cesium#8481
官方已经有人提了,还没解决,我们保持跟进。
如果要用arcgis地形,建议组件先屏蔽鼠标信息。

<vc-navigation :otherOpts="false"></vc-navigation>

或者将
otherOpts.statusBarOpts.showMouseInfo赋值为false

@zouyaoji zouyaoji added the 🔨 Cesium bug Bug caused by Cesium. Can't do anything label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🔨 Cesium bug Bug caused by Cesium. Can't do anything
Projects
None yet
Development

No branches or pull requests

2 participants