~/talk

Image Gesture Controls using Monoids

Talkat OpenJS World 2022 · 2022-06-06..06-10· [typescript]
links:none on file
slides:none on file

Uses TypeScript and NativeScript to implement image panning, pinch-zoom, and double-tap reset by modeling gestures as monoids: a pair sum monoid (concat = add, empty = 0) combines deltaX/deltaY for translate; a product monoid (concat = multiply, empty = 1) scales image from pinchScale (pinch scale starts at 1) with compare+clamp (e.g. clamp 1–5). Gesture state codes 1/2/3 determine start/move/end, deltas are accumulated and saved, console logs confirm positions and scale update as expected. Also recommends the fpts library.

AI-written summary · about

  1. 0:00Start
  2. 2:06Building Block of Monois
  3. 3:20Associative Property
  4. 4:32Identity Element
  5. 5:03Recap
  6. 6:13Closed Binary Operator
  7. 9:49Monoid Sum
  8. 11:47Animation over Time
  9. 14:16Console Log
  10. 15:36Zoom on Pinch
  11. 15:48The Pinch Scale
  12. 18:55Clamp Function
  13. 21:44Reset on Double Tap
  14. 22:01Re Set the Position
  15. 22:24Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.