cesiumlab / cesiumlab/XbsjEarthUI

请问下,请问earthsdk的path怎么去掉自动做的圆滑轨迹啊?

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
documentation question
Dominant language
JavaScript
Stars
734
Forks
193
PR merge metrics
No merged PRs in 30d

Description

请问下,请问earthsdk的path怎么去掉自动做的圆滑轨迹啊?

比如里我就定了4个点,希望可以按连接四点的直线轨迹运行,试过了改slice,但改完转折点的位置不对,还请哪位帮忙看下。多谢了

改slice只会改显示出来的path轨迹,但实际的运行轨迹不变。希望运行轨迹是几点间没有圆滑过的直线,不知哪位可以帮忙看下,多谢了。

另外,如果加载的gltf模型本身带动画,请问怎样能开启动画效果呢?原生cesium我看是在生成viewer时传入shouldAnimate : true的参数,但在earthsdk没有效果。

---

earthsdk中的path的生成有一个技巧:

![image](https://user-images.githubusercontent.com/13550568/68816282-ebeabc80-06b8-11ea-869b-5bcc763845c1.png)

earthsdk中的path不受cesium的shouldAnimate影响,不受cesium中的time影响;
这是有意为之。目的是为了开发时可以任意时间进行任意路径操作。

对啊,每个path可以自驱动,通过playing=true,并需要适当修改一个currentSpeed。
也可以手动控制,通过currentD属性来确定运行到哪一个位置,currentD表示从起点到目标点的长度,可以通过p.length来查看路径总长。

![image](https://user-images.githubusercontent.com/13550568/68816695-2a34ab80-06ba-11ea-82eb-8fcadeb24946.png)

路径相关的示例代码:

![image](https://user-images.githubusercontent.com/13550568/68816757-551eff80-06ba-11ea-96ed-770328f8553f.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the EarthSDK path behavior described in the issue and inspect the path-generation examples. Check how slice, playing, currentSpeed, currentD, and p.length affect movement, then investigate the noted glTF animation and shouldAnimate behavior. Done means the requested path and model-animation behavior is clearly supported or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.