@mantou/nes-sandbox
TypeScript icon, indicating that this package has built-in type declarations

0.0.13 • Public • Published

Sandbox

A secure runtime for running JavaScript games in NESBox.

Example

nesbox.init({
  width: 256,
  height: 240,
  getVideoFrame: () => {
    return getVideoFrame();
  },
  getAudioFrame: () => {
    return getAudioFrame();
  },
  getState: () => {
    return getState();
  },
  setState: (state) => {
    setState(state);
  },
});

Read user input:

nesbox.isTap(nesbox.players.One, nesbox.buttons.Start);
nesbox.isPressed(nesbox.players.One, nesbox.buttons.Start);
nesbox.getCursor(nesbox.players.One)

Readme

Keywords

none

Package Sidebar

Install

npm i @mantou/nes-sandbox

Weekly Downloads

3

Version

0.0.13

License

none

Unpacked Size

19.4 kB

Total Files

9

Last publish

Collaborators

  • mantou132