JSPM

@athingperday/react-pico-player

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q40639F

A React component for playing a PICO-8 Cartridge

Package Exports

  • @athingperday/react-pico-player

Readme

React Pico Player

Installation

npm install @athingperday/react-pico-player

Usage

import { Pico8Player } from "@athingperday/react-pico-player";

export const MyComponent = () => {
    return (
        <Pico8Player
            carts={[
                {
                    name: "name of your cart",
                    src: "url to .p8.png image", // blobs and data uris should work as well
                    // alternatively, instead of `src` you could pass:
                    // rom: [0, ..., 0] (an array of bytes that make up the rom)
                },
                // you can also provide multiple carts (up to 16) if you care to
            ]}
        />
    );
};