🦍• [Work in Progress] React Renderer to build UI interfaces using canvas/WebGL

Overview

React Ape CircleCI

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, PS4, Nintendo Switch, PS Vita, PS3 and low memory devices.

Check the Docs

Demo PS Vita

Credits

Thanks Raphael Eckhardt for the logo <3

Comments
  • [Spectrum Request] - It would be a good idea to have a community

    [Spectrum Request] - It would be a good idea to have a community

    I've check your project and it seems really cool and ambitious to me, the idea of canvas as a "rendering engine" can have many advantages and use cases (personally i'll love to dig into PS4 UI dev), i'm pretty sure there's a lot of more people who would be interested in contributing.

    However it would be great if these people could find a way to communicate, that's why i'm suggesting a spectrum community

    Cheers, and never stop doing it! 🔥

    opened by YobertyAlej 5
  • It's time to start the documentation

    It's time to start the documentation

    I was thinking about using https://docusaurus.io/ in docs/ folder. Following the structure of react-native (e.g: The Basics, Guides, Components, APIs).

    I'm very open to other ideas too.

    good first issue 
    opened by raphamorim 4
  • Thoughts on where I can help

    Thoughts on where I can help

    I work on UI for the PS4 daily, so I have some investment in this type of work, and over the past year, I have implemented a lot of the ideas here. So if it is welcome, I am going to use this issue to jot down some ideas (some i'm sure you have planned), and see if I can help in any way.

    You are probably busy in the weeds for the reconciler.

    Things I have implemented that I could maybe bring over:

    • ListView
    • ScrollableView
    • FocusSystem (gamepad for example)
    • Positioning based on parent.
    • Improvements to the Image component, for example pre-loaded state, post-loaded, error, and caching.
    • Accessibility
    • Animation

    Another huge win would be to implement flexbox https://github.com/facebook/yoga

    Above all of this, I have a ps4 devkit that I can help test on.

    Let me know if you need/want help, and if it is too early, I can check back later.

    opened by rtorr 4
  • border-radius as prop for View #117

    border-radius as prop for View #117

    • Add BorderRadius as prop to the View.
    • Updated the way the View is created
      • Instead of using ctx.rect to draw a rectangle, moveTo(), lineTo(), quadraticCurveTo() are used to allow a dynamic BorderRadius.
      • I couldn't' find a way around rect to generate a borderRadius based on a dynamic value, please let me know if this is aright way for this issue.
    opened by hayanisaid 2
  • react ape roadmap and future

    react ape roadmap and future

    Hi, @raphamorim

    This project looks really cool and I want to help it also to develop and learn.

    • are you thinking about in a roadmap? like review the already done things and update?
    • is the react functional components features inside of the roadmap?
    • bonus: fix the roadmap hyperlink on docs image
    opened by daniloab 2
  • Fix some style heritage issue

    Fix some style heritage issue

    Currently, if isn't setting parent styles into the children it just uses the default styles, for example:

    <View style={{ color: 'orange' }}><Text/></View>
    

    ˆ Text should use color orange instead of black (which is the default).

    bug 
    opened by raphamorim 2
  • components: <SectionList/>

    components:

    https://facebook.github.io/react-native/docs/sectionlist

    const DATA = [
      {
        title: 'Main dishes',
        data: ['Pizza', 'Burger', 'Risotto'],
      },
      {
        title: 'Sides',
        data: ['French Fries', 'Onion Rings', 'Fried Shrimps'],
      },
      {
        title: 'Drinks',
        data: ['Water', 'Coke', 'Beer'],
      },
      {
        title: 'Desserts',
        data: ['Cheese Cake', 'Ice Cream'],
      },
    ];
    
    function Item({ title }) {
      return (
        <View style={styles.item}>
          <Text style={styles.title}>{title}</Text>
        </View>
      );
    }
    
    export default function App() {
      return (
          <SectionList
            sections={DATA}
            keyExtractor={(item, index) => item + index}
            renderItem={({ item }) => <Item title={item} />}
            renderSectionHeader={({ section: { title } }) => (
              <Text>{title}</Text>
            )}
          />
      );
    }
    
    
    opened by raphamorim 2
  • Adding CodeSandbox embedded to all already existing components.

    Adding CodeSandbox embedded to all already existing components.

    It's just a start code but works for now. I've added the examples on the docs using CodeSandbox; Please pay attention to texts, it could contain some typo.

    #20

    opened by jeffersonmourak 2
  • React Ape 0.1.0  🔥🐒

    React Ape 0.1.0 🔥🐒

    Related #16 #19

    Docs

    • [ ] Start sections on documentation (ref #18)
      • [ ] react-ape-boilerplate
      • [ ] "APIs" Section (ref #18)
        • [ ] List of View props (https://facebook.github.io/react-native/docs/view-style-props)
        • [ ] List of Image props (https://facebook.github.io/react-native/docs/image-style-props)
      • [x] "Components" Section (ref #18)
      • [x] "Contributing" Section (ref #22)
      • [x] Work on a way to render react-ape in Docusaurus
    • [x] Add React Ape logo 95d5b1d832087f1e1a3d4966fa0237d157140687
    • [x] Publish site (WIP)

    Components

    • [ ] <SectionList/> https://facebook.github.io/react-native/docs/sectionlist (#33)
    • [ ] <Button/> https://facebook.github.io/react-native/docs/button
    • [ ] <TextInput/> https://facebook.github.io/react-native/docs/textinput
    • [ ] <Picker/> https://facebook.github.io/react-native/docs/picker
    • [ ] <Slider/> https://facebook.github.io/react-native/docs/slider
    • [ ] <Modal/> https://facebook.github.io/react-native/docs/modal

    APIs

    • [x] dimensions #28

    Core

    • [x] Virtual Canvas algorithm #21 ⚡️⚡️⚡️
    • [ ] Allows to inspect using React DevTools 💯(dependent of #21)
    help wanted 
    opened by raphamorim 2
  • ListView

    ListView

    • [x] Create ListView Component
    • [ ] ListView Scroll Horizontal
    • [ ] ListView Scroll Vertical
    • [ ] Automatically distribute items coordinates based on width/height of each child
    opened by raphamorim 2
  • Bump terser from 5.12.1 to 5.14.2

    Bump terser from 5.12.1 to 5.14.2

    Bumps terser from 5.12.1 to 5.14.2.

    Changelog

    Sourced from terser's changelog.

    v5.14.2

    • Security fix for RegExps that should not be evaluated (regexp DDOS)
    • Source maps improvements (#1211)
    • Performance improvements in long property access evaluation (#1213)

    v5.14.1

    • keep_numbers option added to TypeScript defs (#1208)
    • Fixed parsing of nested template strings (#1204)

    v5.14.0

    • Switched to @​jridgewell/source-map for sourcemap generation (#1190, #1181)
    • Fixed source maps with non-terminated segments (#1106)
    • Enabled typescript types to be imported from the package (#1194)
    • Extra DOM props have been added (#1191)
    • Delete the AST while generating code, as a means to save RAM

    v5.13.1

    • Removed self-assignments (varname=varname) (closes #1081)
    • Separated inlining code (for inlining things into references, or removing IIFEs)
    • Allow multiple identifiers with the same name in var destructuring (eg var { a, a } = x) (#1176)

    v5.13.0

    • All calls to eval() were removed (#1171, #1184)
    • source-map was updated to 0.8.0-beta.0 (#1164)
    • NavigatorUAData was added to domprops to avoid property mangling (#1166)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump parse-url from 6.0.0 to 6.0.5

    Bump parse-url from 6.0.0 to 6.0.5

    Bumps parse-url from 6.0.0 to 6.0.5.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Introducing WebAssembly, Specs, ReactApeTree and Platform module

    Introducing WebAssembly, Specs, ReactApeTree and Platform module

    Summary

    This PR introduces:

    • Specs
    • WebAssembly rendering
    • ReactApeTree
    • Platform

    Below the explanation/overview for each of the features

    Specs

    This pull request introduces specs. Specs are formal agreement and documentation regarding React Ape Elements behavior, example below:

    Screen Shot 2022-07-13 at 21 14 48

    Render with WASM/Canvas (fallback to JS/Canvas)

    More information soon.

    ReactApeTree Overview

    Since React Ape render using canvas, it can't properly read parent styles correctly. The idea behind this PR is to reduce issues regarding hierarchy, those problems makes the App looks super weird unless you rule/specify intentionally in every View which style it should carry (it's how Ape works nowaday ~unfortanelly~).

    This PR introduces a tree that contains the layout and style property for each node, so can easily propagate it between children

    Related #67

    Known issues:

    • Text style hierarchy doesn't work (it should render in orange)
    • View positions aren't correctly geometrically
    • View backgroundColor isn't correct, 2nd View should have same bgc as 1st and also 4th should have same as 3rd

    Demo

    return (
      <View style={{width: 80, height: 80, backgroundColor: 'grey', color: 'orange'}}>
        <View>
          <View style={{width: 80, height: 80, backgroundColor: 'powderblue'}}>
            <View
              style={{
                width: 30,
                height: 30
              }}>
              <Text>should be in orange</Text>
            </View>
          </View>
        </View>
      </View>
    );
    

    Before

    Skärmavbild 2022-06-22 kl  06 46 07

    After

    Usage of _reactApeTree when process.env.NODE_ENV !== 'production'

    Screen Shot 2022-07-11 at 19 52 03

    Platform

    When building a cross-platform app, you'll want to re-use as much code as possible. You'll probably have different scenarios where different code might be necessary. For instance, you may want to implement separated visual components for LG-webOS and Samsung-Tizen.

    This PR also introduces the Platform module to easily organize your code and separate it by platform:

    import { Platform } from 'react-ape';
    
    console.log(Platform('webos')) // true
    console.log(Platform('tizen')) // false
    console.log(Platform('orsay')) // false
    
    opened by raphamorim 0
  • Docs: Getting started and Learning the Basics

    Docs: Getting started and Learning the Basics

    "Getting started" and "Learning the Basics" are outdated and contain wrong information. We don't have any boilerplate yet. Would be good to update those sections with valid information. Open to ideas :)

    Skärmavbild 2022-06-30 kl  15 59 30

    Skärmavbild 2022-06-30 kl  15 59 51

    good first issue 
    opened by raphamorim 0
  • fix publish GH workflow: publish and tests should not run tests twice

    fix publish GH workflow: publish and tests should not run tests twice

    Currently the Publish workflow runs together with test, executing the same yarn ci (running tests again) it shouldn't be happening. Should wait for the test workflow check and the follow up with publish.

    There's few approaches that could fix it:

    • check if the tests have passed
    • move the publish workflow to tests as a step but only runs if commit message have [publish]
    good first issue 
    opened by raphamorim 0
Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser

Fabric.js Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. I

Fabric.js 23.6k Jan 3, 2023
JavaScript SVG parser and renderer on Canvas

canvg JavaScript SVG parser and renderer on Canvas. It takes the URL to the SVG file or the text of the SVG file, parses it in JavaScript and renders

null 3.3k Jan 4, 2023
React + Canvas = Love. JavaScript library for drawing complex canvas graphics using React.

React Konva React Konva is a JavaScript library for drawing complex canvas graphics using React. It provides declarative and reactive bindings to the

konva 4.9k Jan 9, 2023
HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.

HTML Canvas Gauges v2.1 Installation Documentation Add-Ons Special Thanks License This is tiny implementation of highly configurable gauge using pure

Mykhailo Stadnyk 1.5k Dec 30, 2022
Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.

Konva Konva is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching,

konva 8.7k Jan 8, 2023
Canvas rendering library, Sprite manipulation of canvas

el-canvas Canvas rendering library, Sprite manipulation of canvas hello world <div id="app"><div></div></div> yarn add elem-canvas or npm i

null 15 Apr 13, 2022
A renderer agnostic two-dimensional drawing api for the web.

Two.js A two-dimensional drawing api meant for modern browsers. It is renderer agnostic enabling the same api to render in multiple contexts: webgl, c

Jono Brandel 7.9k Dec 31, 2022
3D graph viewer powered by WebGL (three.js)

Graphosaurus A three-dimensional static graph viewer. (click the image to try it out) Demos EVE Online map Add nodes incrementally Documentation JSDoc

Corey Farwell 362 Dec 4, 2022
A centralized location for my WebGL and other demos.

?? Experiments A centralized location for my WebGL and other demos. Launch Site My work is for and funded by the community. If you used this or found

Faraz Shaikh 34 Dec 26, 2022
Simple HTML5 Charts using the tag

Simple yet flexible JavaScript charting for designers & developers Documentation Currently, there are two versions of the library (2.9.4 and 3.x.x). V

Chart.js 59.4k Jan 7, 2023
The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey

Paper.js - The Swiss Army Knife of Vector Graphics Scripting If you want to work with Paper.js, simply download the latest "stable" version from http:

Paper.js 13.5k Dec 30, 2022
Interactive visualizations of time series using JavaScript and the HTML canvas tag

dygraphs JavaScript charting library The dygraphs JavaScript library produces interactive, zoomable charts of time series: Learn more about it at dygr

Dan Vanderkam 3k Jan 3, 2023
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.

Full featured image editor using HTML5 Canvas. It's easy to use and provides powerful filters. Packages toast-ui.image-editor - Plain JavaScript compo

NHN 5.7k Jan 6, 2023
Lightweight, interactive planning tool that visualizes a series of tasks using an HTML canvas

Planner Lightweight, interactive planning tool that visualizes a series of tasks using an HTML canvas. Try it yourself at plannerjs.dev Plans created

Brian Vaughn 512 Jan 2, 2023
An implementation of Bézier curve rendering and manipulation, using the HTML5 Canvas API.

Bézier Curves An implementation of Bézier curve rendering and manipulation, using the HTML5 Canvas API. How does it work? Bézier curves can be simply

nethe550 1 Apr 13, 2022
📸 Generate image using HTML5 canvas and SVG

egami → image README | 中文文档 Generate image using HTML5 canvas and SVG Fork from html-to-image Installation pnpm pnpm add egami npm npm i egami Usage i

weng 12 Jan 3, 2023
Demonstration of liquid effect on HTML Canvas using Matter.js and SVG Filters (Blur + Contrast)

Canvas Liquid Effect Demonstration of liquid (or gooey) effect on HTML Canvas using Matter.js and SVG Filters (feGaussianBlur and feColorMatrix). DEMO

Utkarsh Verma 78 Dec 24, 2022
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:

D3: Data-Driven Documents D3 (or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, C

D3 103.8k Jan 3, 2023