Canvas for ~Urbit
Features
- Each stroke is stored automatically on your Urbit.
- Export Canvas Images as SVG.
- Image files are stored on S3 Storage, if configured.
- Allows creation of Public/Private Canvas.
- Others can join a Public Canvas and work collaboratively in a cool art project.
Access
Search for ~dister-norsyr-torryn
in Grid to find the Canvas app, and install it from there
A public canvas is hosted at
~picsel-norsyr-torryn/public
Come and join the group to share your creations and see what others are doing:
~norsyr-torryn/canvas
Development Setup
- Clone the repo, of course
- Create a new desk in Urbit to install canvas in
$ ./urbit -F zod
- Spin up a fake zod, if you haven't already (should be running on port 8080. If not, you'll need to editui/svelte.config.js
)dojo> +code
- Get an access code and use it to sign in to your ship at http://localhost:8080dojo> |mount %base
- Mount%base
, if you haven't alreadydojo> |merge %canvas our %base
- Create a%canvas
deskdojo> |mount %canvas
- Mount the desk so it appears in your pier$ rm -r zod/canvas/*
- Clear out your new desk to make room for the actual desk- Follow the instructions here to merge the
base-dev
andgarden-dev
desks into your desk
- Copy canvas desk to Urbit
From the repo folder, run
./install.sh <PATH_TO_THE_MOUNTED_DESK>
where<PATH_TO_THE_MOUNTED_DESK>
might be something like~/urbit/zod/canvas
You can alse run./install.sh -w <PATH_TO_THE_MOUNTED_DESK>
if you want to watch for changes. - Install
%canvas
in Dojo withdojo> |commit %canvas
(do this after every change to see it reflected in Urbit)dojo> |install our %canvas
(only necessary the first time, I think)
- Serve the UI for development
In the repo folder:
cd ui
npm i
(short fornpm install
)npm run dev
(runs on port 3000. To run on a different port:npm run dev -- --port 3001
)- Visit http://localhost:3000/apps/canvas
- Eventually, build the UI to test in Urbit for real test
npm run build
(in/ui
)./install.sh <PATH_TO_THE_MOUNTED_DESK>
(in project root)|commit %canvas
(in dojo)
Templates
TODO