Make Globe drag more responsive (damping 3000→800)
This commit is contained in:
@@ -91,14 +91,14 @@ export default function Globe({ data, className }: GlobeProps) {
|
|||||||
onMouseMove={(e) => {
|
onMouseMove={(e) => {
|
||||||
if (pointerRef.current !== null) {
|
if (pointerRef.current !== null) {
|
||||||
const delta = e.clientX - pointerRef.current
|
const delta = e.clientX - pointerRef.current
|
||||||
dragRef.current += delta / 3000
|
dragRef.current += delta / 800
|
||||||
pointerRef.current = e.clientX
|
pointerRef.current = e.clientX
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onTouchMove={(e) => {
|
onTouchMove={(e) => {
|
||||||
if (pointerRef.current !== null && e.touches[0]) {
|
if (pointerRef.current !== null && e.touches[0]) {
|
||||||
const delta = e.touches[0].clientX - pointerRef.current
|
const delta = e.touches[0].clientX - pointerRef.current
|
||||||
dragRef.current += delta / 3000
|
dragRef.current += delta / 800
|
||||||
pointerRef.current = e.touches[0].clientX
|
pointerRef.current = e.touches[0].clientX
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user