Skip to content

Latest commit

 

History

History
57 lines (41 loc) · 1.56 KB

README.md

File metadata and controls

57 lines (41 loc) · 1.56 KB

Luna Retro Handheld

Retro emulator with controls ui.

Demo

https://luna.liriliri.io/?path=/story/retro-handheld

Install

Add the following script and style to your page.

<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-retro-emulator/luna-retro-emulator.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-menu/luna-menu.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/luna-retro-handheld/luna-retro-handheld.css" />
<script src="//cdn.jsdelivr.net/npm/luna-retro-emulator/luna-retro-emulator.js"></script>
<script src="//cdn.jsdelivr.net/npm/luna-menu/luna-menu.js"></script>
<script src="//cdn.jsdelivr.net/npm/luna-retro-handheld/luna-retro-handheld.js"></script>

You can also get it on npm.

npm install luna-retro-handheld luna-menu luna-retro-emulator --save
import 'luna-retro-emulator/luna-retro-emulator.css'
import 'luna-menu/luna-menu.css'
import 'luna-retro-handheld/luna-retro-handheld.css'
import LunaRetroHandheld from 'luna-retro-handheld'

Usage

const retroHandheld = new RetroHandheld(container, {
  core: 'https://res.liriliri.io/luna/fceumm_libretro.js',
  browserFS: 'https://res.liriliri.io/luna/browserfs.min.js',
})
retroEmulator.load('https://res.liriliri.io/luna/Contra.nes')

Configuration

  • browserFS(string): BrowserFS url.
  • config(string): RetroArch config.
  • controller(PlainObj): Controller mapping.
  • core(string): Libretro core url.
  • coreConfig(string): RetroArch core options.

Api

load(url: string): void

Load rom from url.