JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q29754F
  • License Apache-2.0

Beautiful chess graphics for React Native apps.

Package Exports

  • rsg-chess-rn-graphics

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rsg-chess-rn-graphics) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

RSG Chess Graphics API for React Native

React Native based Chess graphics

Installation

npm install rsg-chess-rn-graphics
// or
yarn add rsg-chess-rn-graphics

Usage

Check out the RSG Chess graphics API for ReactJS

// Usage example:

import React, { Component } from "react";
import { Platform, Text, View} from "react-native";

import { Game } from "rsg-chess";
import ChessBoard from "rsg-chess-rn-graphics";

type Props = {};
const game = Game.prototype.initializeGame();

export default class App extends Component<Props> {
  render() {
    return (
      <View>
        <ChessBoard
          board={game.board}
          boardWidth={...}
          boardHeight={...}
          pieceSize={...}
          showValidMoves={true}
          selected={game.board[1][1]}
          self={this}
          onPress={(x, y) => {
            alert(x, y);
          }}
        />
      </View>
    );
  }
}

This project is created by Radi Cho, published by RSG Group and licensed under Apache 2.0 LICENSE