home.social

#randomforms — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #randomforms, aggregated by home.social.

  1. Implemented my shared world canvas and multitouch-handler library, so now we have canvas pan, individual piece rotation, and (after a lot of effort) cutting of rotated pieces!

    The world canvas and multitouch handler were ripped out of #LetterSet into their own libraries, but I had only used their canonical version in #RandomForms, so this was a nice further use. Bonus: all testing for this has been done via my insane iOS-simulator-multitouch-mcp setup!

    #swiftui #BuildInPublic

  2. @stroughtonsmith I have been working on a “WorldCanvas” library for just this, but it’s taken so much work:
    - a multi-gesture handler (for optionally simultaneous pan, zoom, rotate)
    - a reusable world, that can translate gestures and position from non-world objects to world objects
    - a testing framework for reliably testing both of the above, together

    These are all done separately and in use in #RandomForms, but I won’t be confident in their reusability until I upgrade #LetterSet to use them.

  3. My solution uses a combination of macOS accessibility APIs and CGEvents directly (not keyDown), the former of which understands the whereabouts of the simulator, the latter for how to find the center of the viewport, set up a two-finger gesture by spawning at the center, option-dragging to a specified input distance, option-shift-dragging to a specified coordinate, then performing one or more gestures therein.

    There has to be a better way!?

    #RandomForms #swiftui #SwiftTesting #macos

  4. RE: mastodon.social/@everyplace/11

    For real: how do people test very complex gestures? In my #RandomForms sandbox, there’re libraries to:
    - control the “world” canvas, panning & zooming the camera
    - implement the sheet protocol
    - use a custom multitouch recognizer
    - use nested instances of a metal distortion renderer, for the sheet and the shapes

    Any change to any of these can cause huge issues, so I need real integration tests. Afaik default tooling can’t chain gesture modifiers like a two-finger pan into a rotation.

    #swiftui

  5. Test harnesses beget test harnesses.

    This recording shows a new playground I’ve made to test a new “World Canvas” library. The demo encapsulates all of the common UX patterns from #LetterSet and #wishyouwerehere:
    - multitouch-handler for simultaneous pan, rotate, zoom
    - shape-elasticity for metal effects
    - world-canvas for document-based pan / zoom / state
    - protocol-based sheets with optional metal rendering.

    #RandomForms #BuildInPublic #swiftui

  6. Test harnesses beget test harnesses.

    This recording shows a new playground I’ve made to test a new “World Canvas” library. The demo encapsulates all of the common UX patterns from #LetterSet and #wishyouwerehere:
    - multitouch-handler for simultaneous pan, rotate, zoom
    - shape-elasticity for metal effects
    - world-canvas for document-based pan / zoom / state
    - protocol-based sheets with optional metal rendering.

    #RandomForms #BuildInPublic #swiftui

  7. Test harnesses beget test harnesses.

    This recording shows a new playground I’ve made to test a new “World Canvas” library. The demo encapsulates all of the common UX patterns from #LetterSet and #wishyouwerehere:
    - multitouch-handler for simultaneous pan, rotate, zoom
    - shape-elasticity for metal effects
    - world-canvas for document-based pan / zoom / state
    - protocol-based sheets with optional metal rendering.

    #RandomForms #BuildInPublic #swiftui

  8. Test harnesses beget test harnesses.

    This recording shows a new playground I’ve made to test a new “World Canvas” library. The demo encapsulates all of the common UX patterns from #LetterSet and #wishyouwerehere:
    - multitouch-handler for simultaneous pan, rotate, zoom
    - shape-elasticity for metal effects
    - world-canvas for document-based pan / zoom / state
    - protocol-based sheets with optional metal rendering.

    #RandomForms #BuildInPublic #swiftui

  9. Test harnesses beget test harnesses.

    This recording shows a new playground I’ve made to test a new “World Canvas” library. The demo encapsulates all of the common UX patterns from #LetterSet and #wishyouwerehere:
    - multitouch-handler for simultaneous pan, rotate, zoom
    - shape-elasticity for metal effects
    - world-canvas for document-based pan / zoom / state
    - protocol-based sheets with optional metal rendering.

    #RandomForms #BuildInPublic #swiftui

  10. Added a hilarious touch debug layer to work through the final rotation issues.

    #RandomForms #BuildInPublic #swiftui

  11. This is getting really good. The editor is now fully functional, and spits out code for the main app to consume. The swapping of shapes still has a few edge cases, but is good enough to proceed.

    #RandomForms #BuildInPublic #swiftui

  12. Multiple sheets are now supported in the app, and their use-state is remembered as part of the document. Additionally, each sheet can have a mixed set of shape colors! And shape snapping back to the sheet is handled by type and size, or color or effect.

    This video shows a blue shiny sheet commingling with a red standard sheet. Shapes swap sheets, and persist in both space and use across document launches.

    #RandomForms #swiftui #BuildInPublic

  13. Okay the shape sheet is awesome. It now:
    - Supports snapping
    - Supports snapping of a like shape to a non-origin hole
    - Implements the full elastic drag metal shader from the main app, both on peeled shapes and the sheet as a whole
    - Authors a valid ShapeSheetConfiguration for consumption in the main app.

    #RandomForms #swiftui #BuildInPublic

  14. I was able to reuse a lot of the boilerplate of the last app to quickly scaffold the DocumentGroup version of #RandomForms, so that documents of shapes now exist. It’s rapidly becoming a real app now.

    #swiftui #BuildInPublic

  15. @helge @simonbs @BrendanThompson @nighthawk @dimitribouniol

    I pointed Claude Code at the Pushover docs a few weeks ago and and said “First, write an OpenAPI.yaml representation of their api docs, then use swift-OpenAPI-generator to write a CLI to interact with messages. Ensure you can send plain text and multipart payloads.” Then I had it write a skill so future executions would discover it, and ✅.

    (Btw the message make sense if you look at accompanying screenshots for #RandomForms)

  16. Image export in #RandomForms
    now let’s me use it as a starting point in #LetterSet. I also added a really fun haptic feedback effect to coincide with the first and second threshold changes in the animation. This is starting to get fun!

    #swiftui #BuildInPublic

  17. Ok this is now officially testable! Anyone want a TestFlight link to my new skeuomorphic #graphicdesign throwback tool, Random Forms? This video shows the whole featureset at the moment, (but the fancy gold shimmery shape will be there just to have a single in-app purchase).

    #RandomForms #swiftui #BuildInPublic

  18. With the exception of the rotation gesture near the end , this is all one touch interaction. The dots show the beginning and end, so you can see how the wiggle responds to the movement. It’s so rubbery and fun! #RandomForms #swiftui #BuildInPublic

  19. Playing with shape elasticity via #swiftui and #metalshaders for #RandomForms. It doesn’t quite behave like vinyl, but it’s pretty good.