cesiumlab / cesiumlab/XbsjEarthUI

CustomPrimitive移动后偶尔会消失不见的问题

Open
#36 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
734
Forks
193
PR merge metrics
No merged PRs in 30d

Description

http://earthsdk.com/v/last/Apps/Examples/?menu=false&url=./earth-customPrimitive-circle.html
在148行后插入 下面代码也能复现问题。

```
let viewer = earth._viewer;
let handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
handler.setInputAction(event => {
var cartographic = earth.pickPosition(event.endPosition);
p.position = cartographic;
console.log(p.show);
console.log(p.position);
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);

let startTime;
handler.setInputAction(event => {
console.log('left_down')
console.log(event)
startTime = new Date();
}, Cesium.ScreenSpaceEventType.LEFT_DOWN);

let endTime;
handler.setInputAction(event => {
console.log('left_up')
console.log(event)
endTime = new Date();
console.log(startTime);
console.log(endTime);
console.log(endTime - startTime);
if(endTime - startTime < 200){
handler.removeInputAction( Cesium.ScreenSpaceEventType.MOUSE_MOVE)
handler.removeInputAction( Cesium.ScreenSpaceEventType.LEFT_DOWN)
handler.removeInputAction( Cesium.ScreenSpaceEventType.LEFT_UP)
}
}, Cesium.ScreenSpaceEventType.LEFT_UP);
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Open the linked earth-customPrimitive-circle.html example and inspect the code around line 148, then reproduce the issue using the supplied Cesium screen-space event handlers. Trace the CustomPrimitive position update during mouse movement and verify when the primitive disappears. Done means moving the CustomPrimitive no longer intermittently makes it invisible.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.