processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.11k stars 3.22k forks source link

It is possible to integrate a P5.js canvas/sketch in SwiftUI window (using a webview?) #6999

Closed jtvargas closed 1 month ago

jtvargas commented 2 months ago

Topic

Like the title says, I want to know if is possible to integrate a canvas interaction in a Mobile project using Swift/SwiftUI with a Webview or something similar

welcome[bot] commented 2 months ago

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!

limzykenneth commented 1 month ago

Hi @jtvargas, I've never tried it before but I would say it should be possible since it is just a Webkit view as long as your sketch either runs on a server somewhere or you have a server running in your app that can serve the web page to the webview.

asukaminato0721 commented 1 month ago

yes, for example https://github.com/getflourish/SwiftUIWebP5js