-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load custom extension locally in the packager #550
Comments
The packager has had an unfortunate issue for the last while where it uses the legacy Worker sandbox while the main site uses an iframe, which affects extensions that try to use some APIs, such as this one. I'll see if that's something that can be fixed In fact, in the packager, we might be able to just remove the sandbox entirely ??? |
The plan is:
|
Turns out your extension still won't work because it's a ScratchX extension. You could consider switching to the gamepad extension on https://extensions.turbowarp.org/ instead, which should work in the packager and the unsandboxed extensions experiment. |
oh ok then. thanks a lot! |
The gamepad extension is known to be very lacking right now. If there's any blocks you want, just ask |
I was extremely comfortable with the ability to point the sprite in the direction of a stick |
I have added some new blocks to the extension to help with that |
I looked now, phenomenal! Thanks again. |
@GarboMuffin I don't know if this is possible, but is it possible to add a block that detects the controller layout? For example see if it uses an Xbox, PlayStation or Nintendo layout? |
Browsers don't directly tell us that information, unfortunately. Sometimes they do tell us the name of the device, but each browser does it in a different way and I imagine there are a lot of differently named devices out there. In most cases, the placement of eg. button 1 should be the same on every controller, it just might have a different symbol on it. |
Oh, okay then. I will put in the settings a button to select the layout as I had already done. Thank you very much for the information! |
I was thinking: can you add a "any button pressed on controller" block inside of the "if controller button pressed" list block? |
I've added "any" options to all the button and gamepad dropdowns. |
@GarboMuffin I was actually working on a contribution that would do that 😄👍 |
Can it support more then 4 controllers? |
Chrome/Electron only support up to 4 controllers, but if you're using another browser you can insert join blocks in the dropdown to type any number in there. |
Can it support a controller with more then 16 buttons? When I look in the dropdown menu there are 16 buttons it can detect, but if I plug a different controller with more then 16 buttons would it still be able to detect them? |
Similar to the controller number input, you can just insert a join block in there, type in whatever number you want, and if the controller has that many buttons then it will just work. |
Closing as the issue has been worked around and if the original extension is run unsandboxed (as in the packager), it does behave exactly as the code says it should which may or may not include some bugs |
Would it be possible to also add a block "when the stick is moved", both in a specific way (stick L or R) and in a general way (one of the two sticks moved)? |
I'm not sure if this is possible, but I would like to understand if there is a way to be able to locally load an extension without having to go through external links when packaging the project.
This is because in an attempt to load a Controller extension from a link uploaded by me and a collaborator of mine on GitHub we were unable to start the extension on the project exported by the packager. The extension works correctly when using the TurboWarp editor, either locally using http://localhost:8000/controller.js or from the link uploaded by us https://blurryknight.github.io/controller.js.
I don't understand what the problem is.
The text was updated successfully, but these errors were encountered: