{"id":19430984,"url":"https://github.com/rubenafo/chalks","last_synced_at":"2025-04-24T18:34:14.297Z","repository":{"id":40909540,"uuid":"145371651","full_name":"rubenafo/chalks","owner":"rubenafo","description":"A set of methods to manipulate data in p5js","archived":false,"fork":false,"pushed_at":"2024-04-23T09:33:12.000Z","size":1794,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-08T13:39:57.788Z","etag":null,"topics":["art","design","generative-art","graphics","javascript","nodejs","p5js","processing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubenafo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-08-20T05:48:00.000Z","updated_at":"2024-04-23T09:33:09.000Z","dependencies_parsed_at":"2024-04-23T10:59:40.298Z","dependency_job_id":"3dd52e7c-0242-4285-b74b-eed448c4e8a6","html_url":"https://github.com/rubenafo/chalks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenafo%2Fchalks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenafo%2Fchalks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenafo%2Fchalks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenafo%2Fchalks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubenafo","download_url":"https://codeload.github.com/rubenafo/chalks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223964246,"owners_count":17232826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["art","design","generative-art","graphics","javascript","nodejs","p5js","processing"],"created_at":"2024-11-10T14:27:47.189Z","updated_at":"2024-11-10T14:27:47.866Z","avatar_url":"https://github.com/rubenafo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chalks\nA thin, independent library on top of p5js containing methods to manipulate points and draw figures.   \nChalks is fully compatible with p5js and just provides some handy tools to simplify the creation process by accessing the p5js _canvas2d_ object.\n\nSome of the components:\n* Simplified path object to define styles and curves in a functional, declarative way.\n* Generative:\n    * Butterfly curve\n    * Hypocycloid\n    * Rose\n    * Rossler\n    * Lorentz\n    * Dejon\n    * Voronoi points (thanks to [voronoi](https://npmjs.com/package/voronoi))\n* Points manipulation (subdivide, subchunks)\n* Layout functions: column, rows, masonry\n* Grammars\n* Color handling using [Chromajs](https://www.npmjs.com/package/chroma-js)\n* Particle System: integrates [node-particles](https://github.com/rubenafo/node-particles)\n \n## Installation\n```\nnpm i chalks\n```\nKeep in mind that _chalks_ requires [p5js](https://www.npmjs.com/package/p5) to be present.   \nYou can reference the _chalks.min.js_ library contained in the node_modules folder in your index.html:\n```html\n\u003cscript language=\"javascript\" type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.1/p5.js\"\u003e\u003c/script\u003e\n\u003cscript language=\"javascript\" src=\"./node_modules/chalks/dist/chalks.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript language=\"javascript\" src=\"_your_sketch_.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\nAlternatively you can simply clone this repo and add _chalks.min.js_, e.g.   \nCopy the file _chalks.min.js_ from /lib and add it to your _index.html_ after your p5js import.\n\nExample:   \n```html\n\u003cscript language=\"javascript\" type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.1/p5.js\"\u003e\u003c/script\u003e\n\u003cscript language=\"javascript\" src=\"./chalks/dist/chalks.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript language=\"javascript\" src=\"_your_sketch_.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\n## Example\n```javascript\nfunction setup() {\n    ch = new Chalks({width: 1000, height: 1000, seed:4}, {fill:\"c8c8c8\"})\n    points = ch.Parametrics.dejon({x:500, y:900}, -2.24, 0.43, -3.266, -8.23, 250, 6200)\n    console.log(points)\n}\n\nfunction draw() {\n    points.forEach(p =\u003e ch.path({fill:\"red\", alpha:random(), stroke:\"black\", strokeWidth:12}, 10).m(p).l(p, p.cadd(150, 50)).draw())\n    noLoop()\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenafo%2Fchalks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubenafo%2Fchalks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenafo%2Fchalks/lists"}