{"id":16160879,"url":"https://github.com/dgreenheck/ez-tree","last_synced_at":"2026-04-01T20:43:40.394Z","repository":{"id":235283664,"uuid":"790451669","full_name":"dgreenheck/ez-tree","owner":"dgreenheck","description":"Procedural tree generator written with JavaScript and Three.js","archived":false,"fork":false,"pushed_at":"2026-01-15T05:22:26.000Z","size":100131,"stargazers_count":1243,"open_issues_count":9,"forks_count":151,"subscribers_count":15,"default_branch":"main","last_synced_at":"2026-03-23T04:32:38.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.eztree.dev","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/dgreenheck.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-22T22:46:05.000Z","updated_at":"2026-03-22T19:10:13.000Z","dependencies_parsed_at":"2024-04-22T23:42:36.500Z","dependency_job_id":"de3fc934-cb4f-40e0-8bd4-8db1bad5aa3c","html_url":"https://github.com/dgreenheck/ez-tree","commit_stats":{"total_commits":96,"total_committers":3,"mean_commits":32.0,"dds":0.02083333333333337,"last_synced_commit":"e4191a9b1d18027151e1a3157aba94cd85923e4c"},"previous_names":["dgreenheck/treegen-js","dgreenheck/tree-js","dgreenheck/ez-tree"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/dgreenheck/ez-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgreenheck%2Fez-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgreenheck%2Fez-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgreenheck%2Fez-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgreenheck%2Fez-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgreenheck","download_url":"https://codeload.github.com/dgreenheck/ez-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgreenheck%2Fez-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-10T02:06:08.908Z","updated_at":"2026-04-01T20:43:40.371Z","avatar_url":"https://github.com/dgreenheck.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# EZ-Tree\n\n![NPM Version](https://img.shields.io/npm/v/%40dgreenheck%2Fez-tree)\n![NPM Downloads](https://img.shields.io/npm/dw/%40dgreenheck%2Fez-tree)\n![GitHub Repo stars](https://img.shields.io/github/stars/dgreenheck/ez-tree)\n![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/dangreenheck)\n![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCrdx_EU_Wx8_uBfqO0cI-9Q)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/cb5f5edd-3e1b-453d-925f-734965126b17\"\u003e\n\u003c/p\u003e\n\n# About\nEZ-Tree is a procedural tree generator with dozens of tunable parameters. The standalone tree generation code is published as a library and can be imported into your own application for dynamically generating trees on demand. Additionally, there is a standalone web app which allows you to create trees within the browser and export as .PNG or .GLB files.\n\n# App\nhttps://eztree.dev\n\n# Installation\n\n```js\nnpm i @dgreenheck/ez-tree\n```\n\n# Usage\n\n```js\n// Create new instance\nconst tree = new Tree();\n\n// Set parameters\ntree.options.seed = 12345;\ntree.options.trunk.length = 20;\ntree.options.branch.levels = 3;\n\n// Generate tree and add to your Three.js scene\ntree.generate();\nscene.add(tree);\n```\n\nAny time the tree parameters are changed, you must call `generate()` to regenerate the geometry.\n\n# Running Standalone App Locally\n\nTo run the standalone app locally, you first need to build the EZ-Tree library before running the app.\n\n```bash\nnpm install\nnpm run app\n```\n\n# Running App with Docker\n\n```bash\ndocker compose build\ndocker compose up -d\n```\n\n# Tree Parameters\n\nThe `TreeOptions` class defines an options object that controls various parameters of a procedurally generated tree. Each property of this object allows for customization of the tree's appearance, including bark, branches, and leaves. Below is a detailed explanation of each property of the `TreeOptions` object.\n\n## General Properties\n\n- **`seed`**: Sets the initial value for random generation, ensuring consistent tree generation when using the same seed.\n- **`type`**: Defines the type of the tree, which can be set to one of the options from the `TreeType` enumeration (e.g., `TreeType.Deciduous`).\n\n## Bark Parameters\n\nThe `bark` object controls the appearance and properties of the tree trunk.\n\n- **`type`**: Specifies the type of bark texture to use, selected from the `BarkType` enumeration (e.g., `BarkType.Oak`).\n- **`tint`**: Determines the color tint applied to the bark, defined as a hexadecimal color value (e.g., `0xffffff` for white).\n- **`flatShading`**: Boolean property indicating whether to use flat shading (`true`) or smooth shading (`false`) for the bark.\n- **`textured`**: Boolean value that indicates if a texture is applied to the bark (`true` or `false`).\n- **`textureScale`**: Controls the scale of the bark texture in both the `x` and `y` axes. It is an object with properties `x` and `y` to define the scaling factors.\n\n## Branch Parameters\n\nThe `branch` object defines parameters for the trunk and branch levels of the tree.\n\n- **`levels`**: Number of recursive branch levels. Setting this to `0` creates only the trunk, while higher values add more branches.\n- **`angle`**: Defines the angle, in degrees, at which child branches grow relative to their parent branch. This is specified separately for each level.\n- **`children`**: Specifies the number of child branches at each level, with the index (`0`, `1`, `2`, etc.) representing the level.\n- **`force`**: Represents an external directional force encouraging tree growth, defined by `direction` (a vector object `{ x, y, z }`) and `strength` (a numeric value).\n- **`gnarliness`**: Defines how twisted or curled each branch level should be, specified for each level.\n- **`length`**: Length of the branches at each level. This is an object with keys representing each level.\n- **`radius`**: Radius (or thickness) of the branches at each level.\n- **`sections`**: Number of segments along the length of each branch level, controlling the resolution of the branch mesh.\n- **`segments`**: Number of radial segments that make up each branch, with a higher value resulting in a smoother cylinder.\n- **`start`**: Specifies where along the parent branch (as a fraction from `0` to `1`) the child branches should start forming.\n- **`taper`**: Controls the tapering of the branches at each level. A value between `0` and `1` defines the reduction in radius from base to tip.\n- **`twist`**: Defines the amount of twisting applied to each branch level.\n\n## Leaf Parameters\n\nThe `leaves` object defines properties that control the appearance and placement of leaves.\n\n- **`type`**: Specifies the type of leaf texture, selected from the `LeafType` enumeration (e.g., `LeafType.Oak`).\n- **`billboard`**: Defines how leaves are rendered. The `Billboard` enumeration can be set to `Single` or `Double` to indicate single or perpendicular double-sided leaves.\n- **`angle`**: Defines the angle of the leaves relative to the parent branch, in degrees.\n- **`count`**: Number of leaves to generate.\n- **`start`**: Specifies where along the length of the branch (as a value between `0` and `1`) leaves should start growing.\n- **`size`**: Size of the leaves, represented as a numeric value.\n- **`sizeVariance`**: Specifies how much variance in size each leaf instance should have, making the leaves look more natural.\n- **`tint`**: Tint color applied to the leaves, defined as a hexadecimal color value (e.g., `0xffffff` for white).\n- **`alphaTest`**: Sets the alpha threshold for leaf transparency, controlling the transparency of the leaf textures.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgreenheck%2Fez-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgreenheck%2Fez-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgreenheck%2Fez-tree/lists"}