omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Gestures updated

    Pythonista
    3
    4
    2723
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mikael
      mikael last edited by

      I intended to just update the documentation a bit, but ended redoing the whole demo, because it was fun.

      Also added a force (3D) touch gesture, should work for Apple stylus as well - would appreciate it if someone with Apple Pencil could test it.

      Demo image

      Get it from GitHub.

      1 Reply Last reply Reply Quote 2
      • dcl
        dcl last edited by

        Would this work with the Scene module?

        My understanding of your code, from reading through the python file, leads me to believe that a UI object has to be included. I don’t know a whole lot about the ObjC classes for gesture handling, so beyond what is written in your python file I don’t know how the code operates.

        I’m trying to get some form of gesture control in a Scene module that I am writing. I took inspiration from your original Gestures code and some touch tracking code I found online to brew my own bit of gesture handling, but it isn’t currently functional. I am trying to gauge whether to trash it and try to adapt / use what you’ve written directly with the Scene module or whether to seek help to get what I have working.

        mikael 1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          This might work an a scene view, but not a scene.

          1 Reply Last reply Reply Quote 0
          • mikael
            mikael @dcl last edited by

            @dcl, what @JonB said. Gestures can be expected to work on the level of the whole scene.view, but not on the level of individual Nodes, which to my understanding are made of GL code created by @omz, i.e. they have no connection to Apple UIKit gestures.

            As Nodes expose touches, it is reasonably easy to roll your own gestures where needed. And since all the relevant code in Gestures is Apple's and hidden behind the covers, I would not think that Gestures would be a very useful as a template for your custom gestures. Rather, I would look at the numerous scene-based games for samples.

            Supplementing view-level gestures (handled by Gestures code) with your own Node-level gestures code is an idea, but expect some trouble managing both firing at the same time. At least that's what happens in UI code.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors