Skip to content

AbstractPlay/renderer

Repository files navigation

Abstract Play Renderer

Build Status

This private NPM module graphically renders game states. This repository houses the authoritative JSON schema.

Currently the only supported output format is SVG. The library has been tested and works correctly in Chrome, Firefox, Opera, and Edge.

A playground/demo area is now available. The Abstract Play Designer is another place you can interact with the rendering engine.

Usage

In the browser, simply load APRender.js via a <script> tag. For a concrete example, see the playground.

From within Node, simply import the variables and functions you need. Both methods give you access to the same API.

The API and schema are documented on the docs site.

Contributing

If you want to create a new set of graphics, see Adding pieces and the contact sheet for existing piece names. After changing glyph sheets, run npm run contact-sheet and commit docs/contact-sheet.svg and contact.png.

Contact sheet

Contact

The main website houses the development blog and wiki. We encourage coders to join us on Discord (https://discord.abstractplay.com) in our #dev-curious channel if you have questions, and basic docs are available on our wiki.

Deploy

  • Clone the repo.
  • From the newly created folder, run the following commands:
    • npm install (installs dependencies)
    • npm run test (makes sure everything is working)
    • npm run build (compiles the TypeScript files into the ./build folder)
    • npm run dist-dev (or dist-prod if you want it minified; bundles everything for the browser into the ./dist folder)

About

Renders Abstract Play game states graphically

Resources

License

Stars

3 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Languages