{"id":27171011,"url":"https://github.com/scream034/cpolygon","last_synced_at":"2025-04-09T08:22:13.715Z","repository":{"id":286399194,"uuid":"961285830","full_name":"Scream034/cpolygon","owner":"Scream034","description":"Smart polygon editor for godot 4+","archived":false,"fork":false,"pushed_at":"2025-04-06T07:49:46.000Z","size":2731,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T08:28:31.769Z","etag":null,"topics":["2d","asset","gdscript","godot","godot4","plugin","polygon","tool"],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Scream034.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}},"created_at":"2025-04-06T07:13:58.000Z","updated_at":"2025-04-06T08:11:18.000Z","dependencies_parsed_at":"2025-04-06T08:38:35.634Z","dependency_job_id":null,"html_url":"https://github.com/Scream034/cpolygon","commit_stats":null,"previous_names":["scream034/cpolygon"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scream034%2Fcpolygon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scream034%2Fcpolygon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scream034%2Fcpolygon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scream034%2Fcpolygon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scream034","download_url":"https://codeload.github.com/Scream034/cpolygon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248000297,"owners_count":21031154,"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":["2d","asset","gdscript","godot","godot4","plugin","polygon","tool"],"created_at":"2025-04-09T08:22:13.101Z","updated_at":"2025-04-09T08:22:13.706Z","avatar_url":"https://github.com/Scream034.png","language":"GDScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CPolygon - Smart Polygon Tools for Godot Engine\r\n\r\nCPolygon is a Godot Engine plugin that provides tools to simplify polygon editing.\r\n\r\n1. Cut\r\n2. Knife\r\n3. Merge (Simple A+B)\r\n\r\n### Features:\r\n\r\n- **Cut (Subtraction):** The \"Cut\" operation allows you to subtract one polygon (B) from another polygon (A). This operation is visualized as **A - B**.\r\n\r\n  You can perform the \"Cut\" operation in two ways:\r\n\r\n  1.  **Using Wait Polygon (Interactive Creation):**\r\n\r\n      - Select the target Polygon2D (A) in the editor.\r\n      - Press the \"Cut\" button in the editor toolbar.\r\n      - A new Polygon2D will be created as a child of the selected polygon. You can now adjust the shape of this new polygon directly in the editor viewport. This new polygon represents polygon (B).\r\n      - Once you are satisfied with the shape of polygon (B), **deselect** the new polygon. The \"Cut\" operation (A - B) will be automatically applied to the target polygon (A), and polygon (B) will be removed.\r\n\r\n      \u003cimg src=\"preview/show_cut_a.gif\" alt=\"Cut Operation A - Wait Polygon\" width=\"400\"/\u003e\r\n\r\n  2.  **Using Two Selected Polygons:**\r\n\r\n      - Select **two** Polygon2D nodes in the editor. The **first selected** polygon will be the target polygon (A), and the **second selected** polygon will be the cutting polygon (B).\r\n      - Press the \"Cut\" button.\r\n      - The \"Cut\" operation (A - B) will be applied to the first selected polygon (A), and polygon (B) (the second selected one) will **remain** unchanged.\r\n\r\n      \u003cimg src=\"preview/show_cut_b.gif\" alt=\"Cut Operation B - Two Polygons\" width=\"400\"/\u003e\r\n\r\n- **Knife:** The \"Knife\" operation calculates the overlapping area of two polygons (A and B). This operation is visualized as **A ∩ B**.\r\n\r\n  To perform the \"Knife\" operation:\r\n\r\n  1.  Select the target Polygon2D (A) in the editor.\r\n  2.  Press the \"Knife\" button in the editor toolbar.\r\n  3.  Similar to the \"Cut\" operation, a new Polygon2D will be created as a child of the selected polygon. Adjust this new polygon (B) to define the intersection area.\r\n  4.  **Deselect** the new polygon. The \"Knife\" operation (A ∩ B) will be applied to the target polygon (A), and polygon (B) will be removed.\r\n\r\n      \u003cimg src=\"preview/show_knife_a.gif\" alt=\"Knife Operation A - Wait Polygon\" width=\"400\"/\u003e\r\n\r\n- **Merge (Simple A+B):** The \"Merge\" operation allows you to combine two polygons (A and B) into one. This operation is visualized as **A + B**.\r\n\r\n  To perform the \"Merge\" operation:\r\n\r\n  1. Select **two** Polygon2D nodes in the editor.\r\n  2. Press the \"Merge\" button in the editor toolbar.\r\n  3. The \"Merge\" operation will combine the selected polygons into a single polygon node.\r\n\r\n  \u003cimg src=\"preview/show_merge_a.gif\" alt=\"Merge Operation A + B\" width=\"400\"/\u003e\r\n\r\n- **Undo/Redo Support:** All operations are fully integrated with Godot's Undo/Redo system. You can easily undo and redo polygon modifications.\r\n\u003cimg src=\"preview/show_knife_undo_redo_a.gif\" alt=\"Knife Operation with Undo/Redo\" width=\"400\"/\u003e\r\n\r\n- **Cancel**: You can cancel an operation by remove the polygon that is being created or modified.\r\n\r\n### Planned Features:\r\n\r\n- **Improve convenience:** More intuitive and user-friendly interfaces for the \"Cut,\" \"Knife,\" and \"Merge\" operations.\r\n\r\n### Installation:\r\n\r\n1.  Copy the `cpolygon` folder into the `addons` folder in your Godot project.\r\n2.  Enable the plugin in Project Settings -\u003e Plugins.\r\n\r\n### Usage:\r\n\r\n1.  Select a Polygon2D node in the 2D editor viewport.\r\n2.  The \"Cut,\" \"Knife,\" and \"Merge\" buttons will appear in the editor toolbar (Canvas Editor menu).\r\n3.  Click the \"Cut,\" \"Knife,\" or \"Merge\" button to perform the corresponding operation, following the instructions above for each feature.\r\n\r\n### Contribution and Feedback:\r\n\r\nThis plugin is under active development. Feedback, bug reports, and suggestions for new features are welcome! Feel free to contribute through GitHub or contact the author.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscream034%2Fcpolygon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscream034%2Fcpolygon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscream034%2Fcpolygon/lists"}