Code Monkey home page Code Monkey logo

react-ape's Introduction

React Renderer to build UI interfaces using Canvas/WebGL

DISCLAIMER: In experimental stage

React Ape is a react renderer to build UI interfaces using canvas/WebGL. React Ape was built to be an optional React-TV renderer. It's mainly a renderer focused on creating things for TV, PS5, PS4, Nintendo Switch, PS Vita, PS3 and low memory devices.

React Ape lets you build Canvas apps using React. React Ape uses the same design as React, letting you compose a rich UI from declarative components.

Understanding the Problem

tl;dr: Crafting a high-performance TV user interface using React (and also good to read: 60 FPS on the mobile web)

Crafting a high-performance TV user interface based on DOM is a real challenge, because of some reasons:

  • Limited graphics acceleration
  • Single core CPUs
  • High Memory Usage for a common TV App

These restrictions make super responsive 60fps experiences especially tricky. The strategy is step in the renderer based on a hardware-accelerated canvas.

Examples

App Name Github App URL
Photo Gallery raphamorim/react-ape-photo-gallery Check it out
Movie List raphamorim/react-ape-movie-list-demo Check it out
Add yours here --------- ---------

API Usage

Install it using NPM or Yarn

# NPM
npm install react-ape

# Yarn
yarn add react-ape

React Ape's API usage example

import React, { Component } from 'react';
import { Text, View } from 'react-ape';

class ReactApeComponent extends Component {
  render() {
    return (
      <View>
        <Text>
          Render this text on Canvas
        </Text>
        <Text>
          You just use React Ape components like 'View' and 'Text',
          just like React Native.
        </Text>
      </View>
    );
  }
}

Demo on PS Vita

Demo on PS Vita

Demo on TV

Demo on TV

Testing it

React-Ape's CI uses macos-latest and since canvas renders a different output based on the operating system (node-canvas have rasterize fonts in different ways based on OS). It requires run the tests on the same OS. Please be aware that if you want to contribute using a different OS, make sure that you have Docker installed.

Roadmap

You can follow React-Ape development status here: Roadmap

Credits

A special thanks to Raphael Eckhardt for making the logo <3

react-ape's People

Contributors

raphamorim avatar dependabot[bot] avatar jeffersonmourak avatar matheusmonte avatar fabiomcosta avatar danielruf avatar backyardcoder avatar hayanisaid avatar skvale avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.