Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Dec 31, 2024
1 parent 6aa329f commit 842c30d
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
# Charming Terminal
# Cell

The terminal renderer for Charming.
The creative language for ASCII art based on Basic.

> [!NOTE]
> The current next branch is implementing the new proposal API for production use. Please refer to the [python branch](https://github.com/charming-art/charming-cell/tree/python) for the released Python version.
## Get Started

## Get started

```js
import * as cm from "@charming-art/terminal";

const context = await new cm.Context().init({mode: "double", width: 520, height: 520});
const I = Array.from({length: 240}, (_, i) => i);
const A = I.map((i) => (i / 240) * 2 * Math.PI);
const X = A.map((t) => context.cols() / 2 + 12 * Math.cos(t) * Math.cos(t * 3));
const Y = A.map((t) => context.rows() / 2 + 12 * Math.sin(t) * Math.cos(t * 3));
const S = I.map(() => cm.wide("🌟"));
context.point(I, {x: X, y: Y, stroke: S});
```bash
> cell rect.bas
```

document.body.append(context.render());
```basic
rect 0, 0, 10, 10
```

## License 📄
Expand Down

0 comments on commit 842c30d

Please sign in to comment.