Re:Red Blob Games: Interactive visual explanations of math a...
by ly on Friday September 29, 2023 @08:26PM
(#37711730)
The cursor is often rendered with special GPU acceleration like when using Hardware Cursor, making it as responsive as possible, but that does mean there’s always going to be a slight delay for the draggable object
Re:Red Blob Games: Interactive visual explanations of math a...
by marwis on Saturday September 30, 2023 @01:35AM
(#37713024)
But this doesn't happen in native UIs. I think this is because JS event handlers are asynchronous and not running within native event loop.
Re:Red Blob Games: Interactive visual explanations of math a...
by zyxin on Saturday September 30, 2023 @08:03PM
(#37721176)
The way Windows handles it seems to be that hardware rendering of the pointer is turned off when you drag around windows. It was very obvious when I was using f.lux, the bright white pointer would turn yellow like the rest of the screen when dragging.
Maybe you could try turning the actual cursor invisible when dragging and instead render a custom drag cursor parented to the object being dragged.
I once tried throttling updates via requestAnimationFrame but it didn't help much. Perhaps movement prediction?