@mantou/nes-sandbox
v0.0.13
Published
A secure runtime for running JavaScript games in NESBox.
Downloads
18
Readme
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);