Retro emulator using libretro.
https://luna.liriliri.io/?path=/story/retro-emulator
Add the following script and style to your page.
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-retro-emulator/luna-retro-emulator.css" />
<script src="//cdn.jsdelivr.net/npm/luna-retro-emulator/luna-retro-emulator.js"></script>
You can also get it on npm.
npm install luna-retro-emulator --save
import 'luna-retro-emulator/luna-retro-emulator.css'
import LunaRetroEmulator from 'luna-retro-emulator'
const retroEmulator = new RetroEmulator(container, {
core: 'https://luna.liriliri.io/fceumm_libretro.js',
browserFS: 'https://luna.liriliri.io/browserfs.min.js',
})
retroEmulator.load('https://luna.liriliri.io/Contra.nes')
- browserFS(string): BrowserFS url.
- config(string): RetroArch config.
- controls(boolean): Show controls.
- core(string): Libretro core url.
- coreConfig(string): RetroArch core options.
Load rom from url.
Open file and load rom.
Press key.
Release key.
Reset game.
Toggle fullscreen.