Skip to content

Touchscreen interface support#386

Open
scottshambaugh wants to merge 11 commits intoTodePond:mainfrom
scottshambaugh:touch_interface
Open

Touchscreen interface support#386
scottshambaugh wants to merge 11 commits intoTodePond:mainfrom
scottshambaugh:touch_interface

Conversation

@scottshambaugh
Copy link

@scottshambaugh scottshambaugh commented Mar 9, 2026

Hi Lu, I watched your SPATIAL PROGRAMMING WITHOUT ESCAPE video today and was totally captivated!

I saw in the readme that there wasn't touch support. So I figured I'd add it. Everything works as expected as far as I can tell, and you can multitouch with two fingers to pinch-zoom and pan around the grid. Long pressing >500 ms works like right clicking, to either sample a color in the grid, or generate a random one outside of it, or create a new combined atom from the paddle area, or clone new atoms from existing ones. No comments since the rest of the file doesn't have them, but would be happy to document this better if you'd like. This closes #86.

The one behavior that needed to be changed/added was moving the paddles up and down by clicking and dragging them, rather than only with alt-scroll. But that's in too, and it works nicely I think. Scrolling unlocks once you have more than 2 paddles, and is clamped so you can't lose them offscreen. That helps with the scrolling bit of #101, closes #53, and I also ran into #159 which I think should be fixed now by making sure paddles are at the bottom.

I also couldn't immediately think of a way to nicely change the brush size with touch only, so touches are forced to a size 0 brush.

I tested everything on my Windows touchscreen laptop running Firefox and on my iPhone running safari, and things seem to work well both places.

Pleased to have joined the ritual!

ribbit

@netlify
Copy link

netlify bot commented Mar 9, 2026

Deploy Preview for keen-boyd-1443aa ready!

Name Link
🔨 Latest commit c270c25
🔍 Latest deploy log https://app.netlify.com/projects/keen-boyd-1443aa/deploys/69afb0ee8ef8070008f9c305
😎 Deploy Preview https://deploy-preview-386--keen-boyd-1443aa.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@scottshambaugh
Copy link
Author

scottshambaugh commented Mar 9, 2026

Quick video running on an iphone

trim.EC3B5650-F30B-4AF5-8B9E-F738403E4B40.MOV

@scottshambaugh
Copy link
Author

scottshambaugh commented Mar 9, 2026

Also this pushes the lines to over 10000, so this comment should be addressable now #351 (comment)

@scottshambaugh scottshambaugh force-pushed the touch_interface branch 2 times, most recently from 900bbcf to 8970223 Compare March 10, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesn't work on touch-screens paddles should be scrollable!

1 participant