MCPcopy
hub / github.com/g3n/engine / onScroll

Method onScroll

camera/orbit_control.go:272–278  ·  view source on GitHub ↗

onScroll is called when an OnScroll event is received.

(evname string, ev interface{})

Source from the content-addressed store, hash-verified

270
271// onScroll is called when an OnScroll event is received.
272func (oc *OrbitControl) onScroll(evname string, ev interface{}) {
273
274 if oc.enabled&OrbitZoom != 0 {
275 sev := ev.(*window.ScrollEvent)
276 oc.Zoom(-sev.Yoffset)
277 }
278}
279
280// onKey is called when an OnKeyDown/OnKeyRepeat event is received.
281func (oc *OrbitControl) onKey(evname string, ev interface{}) {

Callers

nothing calls this directly

Calls 1

ZoomMethod · 0.95

Tested by

no test coverage detected