Skip to content

Commit

Permalink
Merge branch 'release/lienzo'
Browse files Browse the repository at this point in the history
  • Loading branch information
yosoyubik committed Jul 17, 2021
2 parents 414388c + 8f5702a commit b71f6b8
Show file tree
Hide file tree
Showing 156 changed files with 29,915 additions and 101,094 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
node_modules
dist/*
.urbitrc
32 changes: 1 addition & 31 deletions GALLERY.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
# Templates Gallery

- All
- Cryptonomicon
- Easel
- Guybrush Threepwood
- Bitcoin Logo
- <sub>customized</sub>Urbit Canvas Logo
- <sub>friendly</sub> Martian
- Urbit Sigil <sub>~norsyr-torryn!</sub> <sub>~larsen!</sub>
- Hacker News Logo

#### All

![All](/images/mesh.png)

#### Cryptonomicon
![Crypto](/images/crypto.png)
#### Easel
![Easel](/images/easel.png)
#### Guybrush Threepwood
![GuyBrush](/images/guy.png)
#### Bitcoin
![Bitcoin](/images/bitcoin.png)
#### Custom
![Custom](/images/custom.png)
#### Martian
![Martian](/images/martian.png)
#### Sigil
![Sigil](/images/sigil-no-side.png)
![Sigil-2](/images/larsen.png)
#### HN
![HN](/images/hn.png)
TODO
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Jose L. Bellod Cisneros
Copyright (c) 2021 Jose L. Bellod Cisneros

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
103 changes: 14 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,117 +4,42 @@

[![Header](/images/canvas.png)](https://www.youtube.com/watch?v=S6DySv730Hw)

[Video Demo](https://www.youtube.com/watch?v=S6DySv730Hw)
[Video Demo](https://yosoyubik.fra1.digitaloceanspaces.com/norsyr-torryn/2021.7.06..15.37.33-Jul-06-2021%2017-36-28.mp4)

## Features

- Each stroke is stored automatically on your Urbit.
- Export Canvas Images as SVG/PNG files.
- Allows for selective removal of the Color Palette and/or Hexagonal Mesh.
- Image files are stored on your Urbit and served through %eyre.
- Option to share a canvas file in a chat room.
- Export Canvas Images as SVG.
- Image files are stored on S3 Storage, if configured.
- Allows creation of Public/Private Canvas.
- A shared canvas becomes local once the subscription is pulled.
- Others can join a Public Canvas and work collaboratively in a cool art project.

## Access

A public canvas is hosted at `~norsyr-torryn-norsyr-torryn/canvas`. Come and join the first collaborative Urbit Canvas!

## Dependencies

[NodeJS](https://nodejs.org/en/) needs to be installed to package and copy the app to the mounted urbit folder:

Linux:
```
sudo apt install nodejs
```
Mac:
```
:: Homebrew can be installed running:
:: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
::
brew install node
```

A specific version of node can be installed with the following commands:
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
nvm install 12.0.0
nvm use 12.0.0
```

Finally, to install all the dependencies run `npm install`

## Installation

In order to run your canvas app on your ship, before `|install` is implemented natively on urbit, you will need to mount your pier to Unix with `|mount %`.
A public canvas is hosted at

Then you need to add the path to you urbit's pier in .urbitrc. The file is not provided by this repo so you need to create it manually:

```
module.exports = {
URBIT_PIERS: [
"PATH/TO/YOUR/PIER",
]
};
```hoon
~master-norsyr-torryn/canvas
```

You have two options to mount the canvas into your pier:

- ##### `npm run build`
Come and join the first public Urbit Canvas!

This builds your application and copies it into your Urbit ship's desk. In your Urbit (v.0.8.0 or higher) `|commit %home` (or `%your-desk-name`) to synchronize your changes.

- ##### `npm run serve`
## Installation

Builds the application and copies it into your Urbit ship's desk, watching for changes. In your Urbit (v.0.8.0 or higher) `|commit %home` (or `%your-desk-name`) to synchronize your changes.
Copy and commit the contents of the urbit folder to your pier.

When you make changes, the `urbit` directory will update with the compiled application and, if you're running `npm run serve`, it will automatically copy itself to your Urbit ship when you save your.
- First you need to mount the desk from where you will run canvas (e.g. by running `> |mount /=home=` from your urbit
- You copy all the frontend and backend files using the `install.sh` script: `install.sh <PATH_TO_THE_MOUNTED_DESK>`

## Running

To start the canvas agent run this commands from `%dojo`:
```
```dojo
> |start %canvas
>=
> |start %canvas-view
>=
```

If the tile doesn't load on the Home page screen run this command:

```
> :launch &launch-action [%add %canvas /canvastile '/~canvas/js/tile.js']
```
<img src="/images/tile.png" width="180">

You'll get an error (more info [here](https://github.com/yosoyubik/canvas/issues/2#issuecomment-631248364)) but the tile will show up on the home screen.

Direct link: `<YOUR_URL>/~canvas`
Then navigate to `YOUR_URBIT_URL/~canvas` (if you are running locally, this is usually: `http://localhost:8080/~canvas`)

## Templates

<img src="/images/templates.png" width="500">



- Hexagonal Mesh (See [Gallery](./GALLERY.md) for a preview of the available Mesh templates.)
- World Maps: US, Europe, Africa (more soon...)
- Freehand Canvas.

#### Mesh
![Mesh](/images/mesh.png)
#### Europe
![Europe](/images/europe.png)
#### Africa
![Africa](/images/exported-africa.svg)
#### US
![US](/images/export.png)
#### FreeHand
![Free](/images/freehand.png)
#### Share on Chat (I)
![Chat](/images/share-chat.png)
#### Share on Chat (II)
![Chat](/images/chat.png)
TODO
Loading

0 comments on commit b71f6b8

Please sign in to comment.