input: Bug fix: wheel direction is opposite on browsers

This commit is contained in:
Hajime Hoshi 2018-09-30 17:14:52 +09:00
parent 0224858b7b
commit 8df596396c

View File

@ -249,8 +249,8 @@ func OnMouseMove(e js.Value) {
func OnWheel(e js.Value) {
// TODO: What if e.deltaMode is not DOM_DELTA_PIXEL?
theInput.wheelX = e.Get("deltaX").Float()
theInput.wheelY = e.Get("deltaY").Float()
theInput.wheelX = -e.Get("deltaX").Float()
theInput.wheelY = -e.Get("deltaY").Float()
}
func OnTouchStart(e js.Value) {