{"id":18809915,"url":"https://github.com/bytebit-org/roblox-touchscreenjoysticks","last_synced_at":"2025-04-13T20:30:02.260Z","repository":{"id":46280477,"uuid":"248649448","full_name":"Bytebit-Org/roblox-TouchScreenJoysticks","owner":"Bytebit-Org","description":"This project is an open-source tool for composing multiple, customized touch screen joysticks with the objective of improving the tooling available to Roblox developers for mobile games.","archived":false,"fork":false,"pushed_at":"2022-04-05T01:46:20.000Z","size":393,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T11:01:02.358Z","etag":null,"topics":["game-development","joysticks","lua","mobile-games","npm-package","roblox","roblox-developers","roblox-ts"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/Bytebit-Org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-03-20T02:21:12.000Z","updated_at":"2024-04-26T11:01:02.359Z","dependencies_parsed_at":"2022-09-22T19:52:55.529Z","dependency_job_id":null,"html_url":"https://github.com/Bytebit-Org/roblox-TouchScreenJoysticks","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Froblox-TouchScreenJoysticks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Froblox-TouchScreenJoysticks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Froblox-TouchScreenJoysticks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bytebit-Org%2Froblox-TouchScreenJoysticks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bytebit-Org","download_url":"https://codeload.github.com/Bytebit-Org/roblox-TouchScreenJoysticks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223602894,"owners_count":17171999,"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":["game-development","joysticks","lua","mobile-games","npm-package","roblox","roblox-developers","roblox-ts"],"created_at":"2024-11-07T23:18:12.989Z","updated_at":"2024-11-07T23:18:13.700Z","avatar_url":"https://github.com/Bytebit-Org.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Touch Screen Joysticks\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/Bytebit-Org/roblox-TouchScreenJoysticks/actions\"\u003e\n        \u003cimg src=\"https://github.com/Bytebit-Org/roblox-TouchScreenJoysticks/workflows/CI/badge.svg\" alt=\"CI status\" /\u003e\n    \u003c/a\u003e\n\t\u003ca href=\"http://makeapullrequest.com\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-blue.svg\" alt=\"PRs Welcome\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"License: MIT\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://discord.gg/QEz3v8y\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord\u0026longCache=true\u0026style=flat\" alt=\"Discord server\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\nThis project is an open-source tool for composing multiple, customized touch screen joysticks with the objective of improving the tooling available to Roblox developers for mobile games.\n\n## Installation\n### roblox-ts\nSimply install to your [roblox-ts](https://roblox-ts.com/) project as follows:\n```\nnpm i @rbxts/touch-screen-joysticks\n```\n\n### Wally\n[Wally](https://github.com/UpliftGames/wally/) users can install this package by adding the following line to their `Wally.toml` under `[dependencies]`:\n```\nTouchScreenJoysticks = \"bytebit/touch-screen-joysticks@1.0.8\"\n```\n\nThen just run `wally install`.\n\n### From model file\nModel files are uploaded to every release as `.rbxmx` files. You can download the file from the [Releases page](https://github.com/Bytebit-Org/roblox-TouchScreenJoysticks/releases) and load it into your project however you see fit.\n\n### From model asset\nNew versions of the asset are uploaded with every release. The asset can be added to your Roblox Inventory and then inserted into your Place via Toolbox by getting it [here.](https://www.roblox.com/library/7872552904/Serve-Package)\n\n# Links\n- [API Documentation](DOCUMENTATION.md)\n\n# Example\n![tscreenshot_20200320-164323_roblox](https://user-images.githubusercontent.com/17803348/77207941-0dc5d700-6ad1-11ea-886b-adaef10fa48c.jpg)\\\n\u003csup\u003e*[Click here to watch a video demonstration.](https://streamable.com/s8vph)*\u003c/sup\u003e\n\nIt only takes one line of code to create a joystick! Below is an example of just a handful of lines of code that can be used to quickly generate two joysticks, one on each side of the screen, and print their inputs:\n\n```TS\nimport { CompositeJoystickRenderer, JoysticksManager, RectangleGuiWindowRegion, SolidFilledCircle } from \"@rbxts/touch-screen-joysticks\";\nimport { Workspace, GuiService } from \"@rbxts/services\";\n\ndo { wait() } while (!Workspace.CurrentCamera)\n\nwait(1); // To wait for screen to flip to appropriate orientation\n\nconst [ guiInsetTopLeft, guiInsetBottomRight ] = GuiService.GetGuiInset();\nconst realTopLeft = guiInsetTopLeft;\nconst realBottomRight = Workspace.CurrentCamera.ViewportSize.sub(guiInsetBottomRight);\nconst guiWindow = realBottomRight.sub(realTopLeft);\n\nconst joysticksManager = JoysticksManager.create()\n\nconst leftJoystick = joysticksManager.createJoystick({\n    activationRegion: new RectangleGuiWindowRegion(new Vector2(0, 0), new Vector2(guiWindow.X / 2, guiWindow.Y)),\n    gutterRadiusInPixels: 50,\n    inactiveCenterPoint: new Vector2(80, guiWindow.Y - 80),\n    initializedEnabled: true,\n    initializedVisible: true,\n    priorityLevel: 1,\n    relativeThumbRadius: 0.6,\n    renderer: new CompositeJoystickRenderer(new SolidFilledCircle(Color3.fromRGB(0, 170, 255), 0.8), new SolidFilledCircle(Color3.fromRGB(0, 170, 255), 0)),\n});\n\nleftJoystick.inputChanged.Connect(newInput =\u003e {\n    print(\"left input\", newInput);\n});\n\nconst rightJoystick = joysticksManager.createJoystick({\n    activationRegion: new RectangleGuiWindowRegion(new Vector2(guiWindow.X / 2, 0), new Vector2(guiWindow.X, guiWindow.Y)),\n    gutterRadiusInPixels: 50,\n    inactiveCenterPoint: new Vector2(guiWindow.X - 80, guiWindow.Y - 80),\n    initializedEnabled: true,\n    initializedVisible: true,\n    priorityLevel: 1,\n    relativeThumbRadius: 0.6,\n    renderer: new CompositeJoystickRenderer(new SolidFilledCircle(Color3.fromRGB(255, 85, 0), 0.8), new SolidFilledCircle(Color3.fromRGB(255, 85, 0), 0)),\n});\n\nrightJoystick.inputChanged.Connect(newInput =\u003e {\n    print(\"right input\", newInput);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebit-org%2Froblox-touchscreenjoysticks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebit-org%2Froblox-touchscreenjoysticks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebit-org%2Froblox-touchscreenjoysticks/lists"}