
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-pico-8
Advanced tools
Run PICO-8 game cartridges using a cusomtizable React component.
Note: This project is community made and not endorsed by Lexaloffle or the offical PICO-8 Fantasy Console.

Yarn
yarn add react-pico-8
npm
npm install react-pico-8
import React from 'react'
import Pico8 from 'react-pico-8'
import { Controls,
Reset,
Pause,
Sound,
Carts,
Fullscreen } from 'react-pico-8/buttons'
import 'react-pico-8/styles.css'
const App = () => (
<Pico8 src="index.js"
autoPlay={true}
legacyButtons={false}
hideCursor={false}
center={true}
blockKeys={false}
usePointer={true}
unpauseOnReset={true}
placeholder="placeholder.png"
>
<Controls/>
<Reset/>
<Pause/>
<Sound/>
<Carts/>
<Fullscreen/>
</Pico8>
)
Simply add the game widget to the React application using JSX.
Be sure to include the .js src of the game cartridge generated from PICO-8's web export.
If no buttons are nested in the component then the default PICO-8 buttons will be used.
Source of the game cartridge. Required
This can be obtained from PICO-8 by loading a game cart, then typing the command export index.html.
PICO-8 produces two files: the cartridge index.js and the player index.html.
Since react-pico-8 already has the game player embeded, only the .js file needs to be provided as the src.
autoPlay indicates if the game canvas should attempt to auto-play on page-load. Default: true
legacyButtons is used to select the type of buttons. Default: false
hideCusor indicates if the cursor is hidden over the game canvas when the game is playing. Default: false
center indicates if the game is centred outside of fullscreen mode. Default: true
If blockKeys is set keys which are used to interact with the game are blocked from scrolling when the game is running.
If un-set keys will only be blocked when the canvas is focused. Default: false
If usePointer is set the pointer hand will be used on buttons.
If un-set a normal cursor will be used on all buttons which do not lead to a new page. Default: true
If unpauseOnReset is set hitting the reset button when paused will instantly reset the game.
If un-set the game will need to be resumed before it resets. Default: true
The image to be used as a placeholder prior to starting the game. If un-set, a black background will be used. Default: ''
FAQs
Run PICO-8 game cartridges in React
The npm package react-pico-8 receives a total of 28 weekly downloads. As such, react-pico-8 popularity was classified as not popular.
We found that react-pico-8 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.