{"id":"jaipack17/gizmo2d","name":"gizmo2d","scope":"jaipack17","platform":"roblox","description":"Visual Debugging library for GUIs on Roblox","version":"0.0.1","latest":"0.0.1","versions":["0.0.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{},"integrity":"209ffc03172f9f41947884ad7df8d12a0fd2f054624ba534fd9565ee5314347a","likes":0,"downloads":0,"install":"forest install jaipack17/gizmo2d","url":"https://forest.dev/p/roblox/jaipack17/gizmo2d","files":"https://api.forest.dev/ai/package/roblox/jaipack17/gizmo2d/files","readme":"<div align=\"center\">\r\n    <h1>Gizmo2D</h1>\r\n    <p>A 2 Dimensional Roblox Visual Debugging Library</p>\r\n</div>\r\n<hr/>\r\n\r\nGizmo2D is inspired by Unity's Gizmo library. This library allows you to easily and quickly create visuals for debugging 2D information like lines, shapes, arrows and more. The library utilizes GuiObjects to render visual information. \r\n\r\nhttps://user-images.githubusercontent.com/74130881/145675560-f0537293-f495-4b63-806f-3df92df1578f.mp4\r\n\r\n## Features\r\n\r\nThe library provides you with the following visual debugging features.\r\n* Circles\r\n* Squares\r\n* Rectangles\r\n* Lines\r\n* Arrows\r\n* Triangles\r\n* Points\r\n* TextLabels\r\n\r\n## Installation\r\n\r\nTo get your hands on the latest version of the library, go to the Releases page in the repository, select the latest release, download the Gizmo2D.rbxm binary. For a Rojo workflow, it is recommended to use [wally](), a package manager for roblox. If you have setup wally on your computer, put the following in your `wally.toml` file and install the dependencies.\r\n\r\n```toml\r\n[dependencies]\r\nGizmo2D = \"jaipack17/gizmo2d@0.0.1\"\r\n```\r\n\r\nAfter installing the dependencies, the library should be added to the Index of your Packages folder. You can then require the library and start using it.\r\n\r\n## Usage\r\n\r\nRequire the library by simply typing in the following and replacing `path.to.gizmo2d` with the actual path in-game.\r\n\r\n```lua\r\nlocal Gizmo2D = require(path.to.gizmo2d)\r\n```\r\n\r\nAlmost all tools for debugging have `Fill`, `Stroke` and `StrokeWeight` properties. These properties refer to the BackgroundColor and BorderColor for the object. If you wish to create transparent objects, pass in `Fill` as nil.\r\n\r\n### `Gizmo2D.Circle()`\r\n\r\nThis method is used to draw circles with arbitrary radii on the screen. \r\n\r\n```lua\r\n-- Parameters - Position: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Circle(Vector2.new(50, 50), SomeParent, {\r\n    Radius = 25, -- number\r\n    Fill = Color3.new(1, 1, 1), -- Color3|nil\r\n    Stroke = Color3.new(1, 0, 0), -- Color3|nil\r\n    StrokeWeight = 2 -- number|nil\r\n})\r\n```\r\n\r\n### `Gizmo2D.Square()`\r\n\r\nThis method is used to draw squares with arbitrary side measurments on the screen. \r\n\r\n```lua\r\n-- Parameters - Position: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Square(Vector2.new(50, 50), SomeParent, {\r\n    Side = 50, -- number\r\n    Mode = \"CENTER\", -- string|nil. Refers to the anchor point of the square. Must be either CENTER or nil\r\n    Fill = Color3.new(1, 1, 1), -- Color3|nil\r\n    Stroke = Color3.new(1, 0, 0), -- Color3|nil\r\n    StrokeWeight = 2 -- number|nil\r\n})\r\n```\r\n\r\n### `Gizmo2D.Rectangle()`\r\n\r\nThis method is used to draw rectangles with arbitrary width and height measurments on the screen. \r\n\r\n```lua\r\n-- Parameters - Position: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Rectangle(Vector2.new(50, 50), SomeParent, {\r\n    Width = 100, -- number\r\n    Height = 50, -- number\r\n    Mode = \"CENTER\", -- string|nil\r\n    Fill = Color3.new(1, 1, 1), -- Color3|nil\r\n    Stroke = Color3.new(1, 0, 0), -- Color3|nil\r\n    StrokeWeight = 2 -- number|nil\r\n})\r\n```\r\n\r\n### `Gizmo2D.Line()`\r\n\r\nThis method is used to draw a line segment given to points on the screen. \r\n\r\n```lua\r\n-- Parameters - Point1: Vector2, Point2: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Line(Vector2.new(50, 50), Vector2.new(100, 100), SomeParent, {\r\n    Thickness = 2, number|nil\r\n    Fill = Color3.new(1, 1, 1), -- Color3|nil\r\n    Stroke = Color3.new(1, 0, 0), -- Color3|nil\r\n    StrokeWeight = 2 -- number|nil\r\n})\r\n```\r\n\r\n### `Gizmo2D.Arrow()`\r\n\r\nThis method is used to draw an arrow/vector given to points on the screen. \r\n\r\n```lua\r\n-- Parameters - Point1: Vector2, Point2: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Arrow(Vector2.new(50, 50), Vector2.new(100, 100), SomeParent, {\r\n    Thickness = 2, number|nil\r\n    Fill = Color3.new(1, 1, 1), -- Color3\r\n})\r\n```\r\n\r\n### `Gizmo2D.Triangle()`\r\n\r\n\r\nThis method is used to draw triangles given 3 points on the screen. \r\n\r\n```lua\r\n-- Parameters - Point1: Vector2, Point2: Vector2, Point3: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Triangle(Vector2.new(50, 50), Vector2.new(100, 100), Vector2.new(50, 100), SomeParent, {\r\n    Fill = Color3.new(1, 1, 1), -- Color3\r\n})\r\n```\r\n\r\n### `Gizmo2D.Point()`\r\n\r\nThis method is used to draw points on the screen, with a default radius of 2.5.\r\n\r\n```lua\r\n-- Parameters - Position: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Point(Vector2.new(50, 50), SomeParent, {\r\n    Fill = Color3.new(1, 1, 1), -- Color3\r\n})\r\n```\r\n\r\n### `Gizmo2D.Label()`\r\n\r\nThis method is used to draw text on screen by utilizing TextLabels. \r\n\r\n```lua\r\n-- Parameters - Position: Vector2, Parent: Instance, Properties: table\r\nGizmo2D.Label(Vector2.new(50, 50), Vector2.new(100, 100), Vector2.new(50, 100), SomeParent, {\r\n    Text = \"Some Text\", -- string\r\n    Size = Vector2.new(30, 30), -- Vector2\r\n    TextSize = 15, -- number|nil\r\n    TextFill = Color3.new(1, 1, 1), -- Color3|nil\r\n    TextStroke = Color3.new(1, 0, 1), -- Color3|nil\r\n    TextStrokeWeight = 2, -- number|nil\r\n    TextScaled = false, -- boolean|nil\r\n    Font = Enum.Font.Gotham -- EnumItem|string|nil\r\n})\r\n```\r\n\r\n<hr/>\r\n","readmeTruncated":false}