Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #142

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
# Charming Cell

```js
import * as Cell from "@charming-art/cell";
The P5 like JavaScript API for ASCII art.

function Star(ctx) {
return {
mode: "double",
width: 520,
height: 520,
setup() {
for (let t = 0; t <= Math.PI * 2; t += Math.PI / 120) {
const x = ctx.cols() / 2 + 12 * Math.cos(t) * Math.cos(t * 3);
const y = ctx.rows() / 2 + 12 * Math.sin(t) * Math.cos(t * 3);
ctx.stroke(cm.wide("🌟"));
ctx.point(x, y);
}
},
};
}
> [!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.

document.body.append(await cm.cell(Star));
```

## Resources 📚

- Documentation - https://charmingjs.org/cell/
- Examples - https://observablehq.com/d/18b3d6f3affff5bb

## License 📄

ISC@Bairui SU
Loading