From 35b7d77908ba38ae2b9e37a929472adbd15a7676 Mon Sep 17 00:00:00 2001 From: pearmini Date: Mon, 30 Sep 2024 14:06:39 -0400 Subject: [PATCH] Update docs with genji --- .gitignore | 3 ++- docs/.vitepress/theme/index.js | 1 + docs/cell/getting-started.md | 6 ++++++ docs/cell/index.md | 16 +++++++++++++++- docs/cell/what-is-cell.md | 16 ++++++++++++++++ docs/flow/getting-started.md | 6 ++++++ docs/flow/index.md | 2 ++ docs/getting-started.md | 6 ++++++ docs/lodash/index.md | 2 ++ docs/what-is-charming.md | 2 ++ 10 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a8f9f08a..b57fd2bf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules yarn.lock package-lock.json dist -cache \ No newline at end of file +cache +docs/lib diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js index 9e88d61d..8df40b72 100644 --- a/docs/.vitepress/theme/index.js +++ b/docs/.vitepress/theme/index.js @@ -1,6 +1,7 @@ import DefaultTheme from "vitepress/theme"; import Layout from "genji-theme-vitepress"; import { h } from "vue"; +import "../../lib/charming-cell.umd.min.js"; // More props: https://genji-md.dev/reference/props const props = { diff --git a/docs/cell/getting-started.md b/docs/cell/getting-started.md index bad55622..8efc13ff 100644 --- a/docs/cell/getting-started.md +++ b/docs/cell/getting-started.md @@ -1 +1,7 @@ # Getting Started + +> WIP + +```bash +npm install @charming-art/cell +``` diff --git a/docs/cell/index.md b/docs/cell/index.md index 3f124ccc..e935d061 100644 --- a/docs/cell/index.md +++ b/docs/cell/index.md @@ -1 +1,15 @@ -# Charming Cell \ No newline at end of file +# Charming Cell + +The P5 like JavaScript API for ASCII art. + +> [!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. + +## Resources 📚 + +- Documentation - https://charmingjs.org/cell/ +- Examples - https://observablehq.com/d/18b3d6f3affff5bb + +## License 📄 + +ISC@Bairui SU diff --git a/docs/cell/what-is-cell.md b/docs/cell/what-is-cell.md index 177c0578..14d86f4d 100644 --- a/docs/cell/what-is-cell.md +++ b/docs/cell/what-is-cell.md @@ -1 +1,17 @@ # What is Cell? + +```js eval +cm.cell((ctx) => ({ + 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); + } + }, +})); +``` diff --git a/docs/flow/getting-started.md b/docs/flow/getting-started.md index bad55622..8efc13ff 100644 --- a/docs/flow/getting-started.md +++ b/docs/flow/getting-started.md @@ -1 +1,7 @@ # Getting Started + +> WIP + +```bash +npm install @charming-art/cell +``` diff --git a/docs/flow/index.md b/docs/flow/index.md index da44df44..795f8855 100644 --- a/docs/flow/index.md +++ b/docs/flow/index.md @@ -1 +1,3 @@ # Charming Flow + +The functional JavaScript API for graphics. diff --git a/docs/getting-started.md b/docs/getting-started.md index bad55622..074ffec0 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1 +1,7 @@ # Getting Started + +> WIP + +```bash +npm install @charming-art/charming +``` diff --git a/docs/lodash/index.md b/docs/lodash/index.md index 414937ab..3ff0338b 100644 --- a/docs/lodash/index.md +++ b/docs/lodash/index.md @@ -1 +1,3 @@ # Charming Lodash + +The helpful utils for graphics and geometries. diff --git a/docs/what-is-charming.md b/docs/what-is-charming.md index 1d1faf0f..6e18f5e8 100644 --- a/docs/what-is-charming.md +++ b/docs/what-is-charming.md @@ -1 +1,3 @@ # What is Charming? + +The JavaScript library for tailored creative coding.