javatari.js icon indicating copy to clipboard operation
javatari.js copied to clipboard

[Request] Image loading and manipulation through JS

Open Leorivasc opened this issue 6 years ago • 2 comments

Hi, The software is amazing, I tried to build a small website with it, but the only way I found to load and start games is through the URL in a new window or iframe. Is it possilble to add a feature such that the emulator could remain in the same page as the games list, and exchanging cartridge images without having to open a new page, maybe using click events? (sorry if the feature is already there, the doc doesn't mention or I didn't understand). Thanks

Leorivasc avatar Sep 15 '19 08:09 Leorivasc

Hi! Thanks for using Javatari!

Yes, there are some functions for that, but they are not official yet, and not documented. I will check in the code if the API is working as expected, and get back to you soon.

Regards, Paulo

On Sun, Sep 15, 2019 at 5:13 AM Leorivasc [email protected] wrote:

Hi, The software is amazing, I tried to build a small website with it, but the only way I found to load and start games is through the URL in a new window or iframe. Is it possilble to add a feature such that the emulator could remain in the same page as the games list, and exchanging cartridge images without having to open a new page, maybe using click events? (sorry if the feature is already there, the doc doesn't mention or I didn't understand). Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppeccin/javatari.js/issues/13?email_source=notifications&email_token=AAFOLIBBRHFBRG7GQE3EH43QJXVB3A5CNFSM4IWZUUD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLNM22A, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFOLIBGVWJKXUFAWO7FM23QJXVB3ANCNFSM4IWZUUDQ .

ppeccin avatar Sep 17 '19 17:09 ppeccin

Hi... Just checked the API.

You can achieve what you want (loading new ROMs dynamically) by calling the File Loader method:

Javatari.fileLoader.readFromURL(String url)

The "url" parameter is relative to your current directory, so you can use relative paths like for example:

Javatari.fileLoader.readFromURL("mygames/Game.bin")

Hope that works for you!

Paulo

On Tue, Sep 17, 2019 at 2:38 PM Paulo Peccin [email protected] wrote:

Hi! Thanks for using Javatari!

Yes, there are some functions for that, but they are not official yet, and not documented. I will check in the code if the API is working as expected, and get back to you soon.

Regards, Paulo

On Sun, Sep 15, 2019 at 5:13 AM Leorivasc [email protected] wrote:

Hi, The software is amazing, I tried to build a small website with it, but the only way I found to load and start games is through the URL in a new window or iframe. Is it possilble to add a feature such that the emulator could remain in the same page as the games list, and exchanging cartridge images without having to open a new page, maybe using click events? (sorry if the feature is already there, the doc doesn't mention or I didn't understand). Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ppeccin/javatari.js/issues/13?email_source=notifications&email_token=AAFOLIBBRHFBRG7GQE3EH43QJXVB3A5CNFSM4IWZUUD2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLNM22A, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFOLIBGVWJKXUFAWO7FM23QJXVB3ANCNFSM4IWZUUDQ .

ppeccin avatar Sep 17 '19 20:09 ppeccin

@ppeccin If the cartridge has already been loaded so it's stored in locastorage, how to load it from there (by javascript, not by the menu)?

Zibri avatar Nov 24 '22 06:11 Zibri