{"id":13527276,"url":"https://github.com/HashLips/generative-art-node","last_synced_at":"2025-04-01T09:31:20.800Z","repository":{"id":36997845,"uuid":"390935630","full_name":"HashLips/generative-art-node","owner":"HashLips","description":"Create generative art by using the canvas api and node js","archived":false,"fork":false,"pushed_at":"2023-04-07T22:58:50.000Z","size":2343,"stargazers_count":2142,"open_issues_count":136,"forks_count":912,"subscribers_count":50,"default_branch":"main","last_synced_at":"2025-03-31T00:07:30.103Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HashLips.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}},"created_at":"2021-07-30T04:57:26.000Z","updated_at":"2025-03-25T00:49:26.000Z","dependencies_parsed_at":"2022-07-09T04:00:20.190Z","dependency_job_id":"1bd68095-bef9-40aa-8ed6-8d42bd06449e","html_url":"https://github.com/HashLips/generative-art-node","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/HashLips%2Fgenerative-art-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HashLips%2Fgenerative-art-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HashLips%2Fgenerative-art-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HashLips%2Fgenerative-art-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HashLips","download_url":"https://codeload.github.com/HashLips/generative-art-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246616074,"owners_count":20806049,"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":[],"created_at":"2024-08-01T06:01:44.783Z","updated_at":"2025-04-01T09:31:19.593Z","avatar_url":"https://github.com/HashLips.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Welcome to HashLips 👄\r\n\r\nImportant: There is a new repo for this code.\r\n[https://github.com/HashLips/hashlips_art_engine](https://github.com/HashLips/hashlips_art_engine)\r\n\r\nAll the code in these repos was created and explained by HashLips on the main YouTube channel.\r\n\r\nTo find out more please visit:\r\n\r\n[📺 YouTube](https://www.youtube.com/channel/UC1LV4_VQGBJHTJjEWUmy8nA)\r\n\r\n[👄 Discord](https://discord.com/invite/qh6MWhMJDN)\r\n\r\n[💬 Telegram](https://t.me/hashlipsnft)\r\n\r\n[🐦 Twitter](https://twitter.com/hashlipsnft)\r\n\r\n[ℹ️ Website](https://hashlips.online/HashLips)\r\n\r\n# generative-art-node\r\n\r\nCreate generative art by using the canvas api and node js\r\n\r\n![](https://github.com/HashLips/generative-art-node/blob/main/src/preview.png)\r\n\r\n## Installation\r\n\r\n```sh\r\ngit clone https://github.com/HashLips/generative-art-node\r\n\r\nyarn install\r\n```\r\n\r\n## Usage\r\n\r\nCreate your different layers as folders in the 'layers' directory, and add all the layer assets in these directories. Optionally, append '_r' and '_sr' to the layer file names to make those layer files rare or super rare respectively. \r\n\r\n*Example:* If you had an ball layer you would create a ball directory, and then a file might be called:\r\n\r\n- `red_eye_ball_sr.png`\r\n- `red_eye_ball_r.png`\r\n- `red_eye_ball.png`\r\n\r\n\u003e Rarity is customizable in `src/config.js`.\r\n\r\nOnce you have all your layers, go into `src/config.js` and update the `layersOrder` array to be your layer folders name in order of the back layer to the front layer.\r\n\r\n*Example:* If you were creating a portrait design, you might have a background, then a head, a mouth, eyes, eyewear, and then headwear, so your `layersOrder` would look something like this:\r\n\r\n```js\r\nconst layersOrder = [\r\n    { name: 'background', number: 1 },\r\n    { name: 'ball', number: 2 },\r\n    { name: 'eye color', number: 12 },\r\n    { name: 'iris', number: 3 },\r\n    { name: 'shine', number: 1 },\r\n    { name: 'bottom lid', number: 3 },\r\n    { name: 'top lid', number: 3 },\r\n];\r\n```\r\n\r\nThe `name` of each layer object represents the name of the folder (in `/layers/`) that the images reside in. The `number` of each layer object represents the total number of image files you want to select from (possibly including blanks.) For instance, if you have three images in a layer folder and want to pick one of those each time, the `number` should be `3`. If you have a single image in a layer that you want to increase the rarity of to 1 in 100, the `number` for that layer should be `100`. In this case, 99 times out of 100, you will get a completely transparent layer.\r\n\r\nThen optionally, update your `format` size, ie the outputted image size, and the defaultEdition, which is the amount of variation outputted.\r\n\r\nWhen you are all ready, run the following command and your outputted art will be in the `build` directory:\r\n\r\n```sh\r\nnpm run build\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHashLips%2Fgenerative-art-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHashLips%2Fgenerative-art-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHashLips%2Fgenerative-art-node/lists"}