cesiumlab / cesiumlab/XbsjEarthUI
请问下,请问earthsdk的path怎么去掉自动做的圆滑轨迹啊?
- 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的生成有一个技巧:

earthsdk中的path不受cesium的shouldAnimate影响,不受cesium中的time影响;
这是有意为之。目的是为了开发时可以任意时间进行任意路径操作。
对啊,每个path可以自驱动,通过playing=true,并需要适当修改一个currentSpeed。
也可以手动控制,通过currentD属性来确定运行到哪一个位置,currentD表示从起点到目标点的长度,可以通过p.length来查看路径总长。

路径相关的示例代码:

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