Debounce and ScreenSpaceEventHandler

Hello team,
I am using ScreenSpaceEventHandler to capture the mouse events on cesium viewer.
By using Cesium.ScreenSpaceEventType.MOUSE_MOVE I am rendering trying to render the line entity, so that second point of line will be variable (position of mouse move event).
I am observing that the line is getting rendered when I stop moving mouse for say 200 millisecond.
so my question for you guys is, does ScreenSpaceEventHandler already implement the methods like Debounce and throttle already for performance reason ? if it is then is it possible to activate it and deactivate it ?

thanks !!
Learning cesium is fun.

Hi @MUKUND_THAKARE,

Thank you for the question! To the best of my knowledge, you are using the optimal ScreenSpaceEventType object. Is it possible that the behavior that you are witnessing is due to a performance issue with CesiumJS? I would love to see a sandcastle demo that showcases what you have so far. This would help me test and debug this on my end.

Best,
Sam

1 Like