{"id":16786524,"url":"https://github.com/peter-kish/primitives2d","last_synced_at":"2025-06-29T16:36:24.268Z","repository":{"id":100801770,"uuid":"555823038","full_name":"peter-kish/primitives2d","owner":"peter-kish","description":"A plugin for the Godot game engine (version 4.x) for rendering primitive 2d shapes.","archived":false,"fork":false,"pushed_at":"2024-08-03T17:59:56.000Z","size":261,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-16T23:26:01.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"GDScript","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/peter-kish.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":"2022-10-22T12:16:18.000Z","updated_at":"2025-02-21T02:15:23.000Z","dependencies_parsed_at":"2024-10-13T08:12:46.469Z","dependency_job_id":"8a677abb-07b1-4fdd-bfd5-01882e42edec","html_url":"https://github.com/peter-kish/primitives2d","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peter-kish/primitives2d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-kish%2Fprimitives2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-kish%2Fprimitives2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-kish%2Fprimitives2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-kish%2Fprimitives2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-kish","download_url":"https://codeload.github.com/peter-kish/primitives2d/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-kish%2Fprimitives2d/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262627234,"owners_count":23339536,"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-10-13T08:12:28.625Z","updated_at":"2025-06-29T16:36:24.189Z","avatar_url":"https://github.com/peter-kish.png","language":"GDScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Primitives2D\r\n\r\n\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"images/logo.svg\" width=\"128\" height=\"128\"/\u003e\r\n\u003c/p\u003e\r\n\r\nA plugin for the Godot game engine (version 4.x) for rendering primitive 2d shapes.\r\n\r\n![](images/ss_editor.png \"Primitives2D\")\r\n\r\nWhile the [`CanvasItem`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html) class supports a number of methods for rendering primitive shapes, the engine only offers the [Line2D](https://docs.godotengine.org/en/stable/classes/class_line2d.html) and [Polygon2D](https://docs.godotengine.org/en/stable/classes/class_polygon2d.html) nodes for adding primitive shapes to a scene. This plugin introduces the following node types in a similar fashion:\r\n* ![](addons/primitives2d/icon_rect.svg \"Rectangle2D icon\") [Rectangle2D](#rectangle2d)\r\n* ![](addons/primitives2d/icon_circle.svg \"Circle2D icon\") [Circle2D](#circle2d)\r\n* ![](addons/primitives2d/icon_arc.svg \"Arc2D icon\") [Arc2D](#arc2d)\r\n\r\nThe nodes simply use the builtin [`CanvasItem`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html) methods for drawing primitive shapes: [`draw_rect`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-rect), [`draw_circle`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-circle) and [`draw_arc`](https://docs.godotengine.org/en/stable/classes/class_canvasitem.html#class-canvasitem-method-draw-arc).\r\n\r\n## Installation\r\n\r\n1. Create an `addons` directory inside your project directory.\r\n2. Get the plugin from the AssetLib or from GitHub\r\n    * From the AssetLib: Open the AssetLib from the Godot editor and search for \"Primitives2D\". Click download to install the plugin.\r\n    * From GitHub: Run `git clone https://github.com/peter-kish/primitives2d.git` and copy the contents of the `addons` directory to your projects `addons` directory.\r\n4. Enable the plugin in `Project Settings \u003e Plugins`.\r\n\r\n## Usage\r\n\r\nAdd a [Rectangle2D](#rectangle2d), [Circle2D](#circle2d) or [Arc2D](#arc2d) node to your scene and set the node properties described below.\r\n\r\n### Rectangle2D\r\n\r\nDraws a 2D rectangle.\r\n\r\n#### Properties\r\n\r\n* `color: Color` - The color of the rectangle.\r\n* `size: Vector2` - The size of the rectangle.\r\n* `filled: bool` - If `false`, the rectangle will be drawn as a stroke with the `color` and `line_width` specified.\r\n* `line_width: float` - Width of the stroke (in case `filled` is `true`).\r\n* `centered: bool` - If `true`, the rectangle will be drawn centered.\r\n\r\n### Circle2D\r\n\r\nDraws a 2D circle.\r\n\r\n#### Properties\r\n\r\n* `color: Color` - The color of the circle.\r\n* `radius: float` - The radius of the circle.\r\n* `filled: bool` - If `false`, the circle will be drawn as a stroke with the `color` and `line_width` specified.\r\n* `line_width: float` - Width of the stroke (in case `filled` is `true`).\r\n* `antialiased: bool` - If `true`, the lines will attempt to perform antialiasing using OpenGL line smoothing.\r\n* `detail: int` - The number of line segments.\r\n\r\n### Arc2D\r\n\r\nDraws a unfilled 2D arc.\r\n\r\n#### Properties\r\n\r\n* `color: Color` - The color of the arc.\r\n* `radius: float` - The radius of the arc.\r\n* `filled: bool` - If `false`, the arc will be drawn as a stroke with the `color` and `line_width` specified.\r\n* `line_width: float` - Width of the stroke (in case `filled` is `true`).\r\n* `antialiased: bool` - If `true`, the lines will attempt to perform antialiasing using OpenGL line smoothing.\r\n* `detail: int` - The number of line segments.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-kish%2Fprimitives2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-kish%2Fprimitives2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-kish%2Fprimitives2d/lists"}