{"id":20815857,"url":"https://github.com/aurbano/treegenerator","last_synced_at":"2025-06-28T21:41:21.357Z","repository":{"id":21328999,"uuid":"24645754","full_name":"aurbano/TreeGenerator","owner":"aurbano","description":":evergreen_tree: Trees with JavaScript, just because why not?","archived":false,"fork":false,"pushed_at":"2019-12-18T20:57:39.000Z","size":17,"stargazers_count":27,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-14T04:08:07.913Z","etag":null,"topics":["canvas","experiment","javascript","tree-generator"],"latest_commit_sha":null,"homepage":"https://aurbano.github.io/TreeGenerator/","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/aurbano.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}},"created_at":"2014-09-30T16:26:42.000Z","updated_at":"2023-12-28T09:10:18.000Z","dependencies_parsed_at":"2022-08-20T23:00:35.475Z","dependency_job_id":null,"html_url":"https://github.com/aurbano/TreeGenerator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/aurbano/TreeGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurbano%2FTreeGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurbano%2FTreeGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurbano%2FTreeGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurbano%2FTreeGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aurbano","download_url":"https://codeload.github.com/aurbano/TreeGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aurbano%2FTreeGenerator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259756885,"owners_count":22906680,"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":["canvas","experiment","javascript","tree-generator"],"created_at":"2024-11-17T21:26:36.032Z","updated_at":"2025-06-14T04:08:08.746Z","avatar_url":"https://github.com/aurbano.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"TreeGenerator\n=============\n\n\u003e 2D trees with JavaScript, just because. Although by tweaking the settings you can get pretty much any kind of drawing.\n\n\nWith the colorful setting on:\n![Tree generator](http://static.urbanoalvarez.es/blog/wp-content/uploads/2013/01/tree3.png)\n\n--------\n\nGenerating some trees on a canvas element:\n\n```javascript\n\n$(document).ready(function(){\n\tvar canvas = $('canvas');\n\tvar tree = new TreeGenerator(canvas);\n\ttree.start();\n});\n\n```\n\nCustom options can be passed as a second argument to the tree generator:\n\n```javascript\n\n// Customization options, along with their default values:\nloss: 0.03, // Width loss per cycle\nminSleep: 10, // Min sleep time (For the animation)\nbranchLoss: 0.8, // % width maintained for branches\nmainLoss: 0.8, // % width maintained after branching\nspeed: 0.3, // Movement speed\nnewBranch: 0.8, // Chance of not starting a new branch \ncolorful: false, // Use colors for new trees\nfastMode: true, // Fast growth mode\nfadeOut: true, // Fade slowly to black\nfadeAmount: 0.05, // How much per iteration\nautoSpawn: true, // Automatically create trees\nspawnInterval: 250, // Spawn interval in ms\ninitialWidth: 10, // Initial branch width\nindicateNewBranch: false, // Display a visual indicator when a new branch is born\nfitScreen: true // Resize canvas to fit screen\n\n```\n\nTry the dat.gui controls on the demo to find the optimal settings for you.\n\n\n### Contributing\nThis project was done mainly for fun, and as such is lacking many features that might be useful if someone actually wants to implement it seriously. If you do so, please feel free to contribute to the project.\n\n### License\nTreeGenerator is released under the MIT license\n\n[![Analytics](https://ga-beacon.appspot.com/UA-3181088-16/TreeGenerator/readme)](https://github.com/aurbano)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurbano%2Ftreegenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faurbano%2Ftreegenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurbano%2Ftreegenerator/lists"}