Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-three-renderer

> 前端框架
Open source

Render into a three.js canvas using React.

1.5K stars0 likes1 views
WebsiteGitHub

About

Render into a three.js canvas using React.

react-three-renderer

PSA:

This project is pretty much frozen and the react-three-renderer-fiber project has been moving at a glacial rate. If you'd like to contribute to the React + Three bridge ecosystems, please take a look at how you can help with the more active https://github.com/drcmda/react-three-fiber project instead.

Back to regular readme

Render into a three.js canvas using React.

Would you like to know more? See the wiki or go straight to the API documentation.

Live examples. Current State

This is still an experimental and work in progress project, use at your own risk!

Currently supported react version: 15.5.3 ( things break fast when you fly this close to the sun )

This project is being maintained and developed relatively slowly.

Currently we're working on restoring compatibility with React 16 - Fiber edition!

See work in progress within https://github.com/toxicFork/react-three-renderer-fiber.

Expected ETA: Unknown.

Installation

bash
npm install --save [email protected] [email protected] [email protected]
npm install --save react-three-renderer

Usage

The default export of the module is a react component. When mounted, any children of it will be placed into the three.js environment.

Here's a simple example that implements the getting started scene for three.js.

…

To go further, follow the white rabbit.

Building

Fork and clone this repository, then do a npm install.

npm run compile produces es5 compatible code in the 'lib' directory.

You can use npm link or local npm install if you would like to play with your fork.

Testing

bash
# make sure that you have run compile first
npm run compile
npm test

Currently it runs tests on Chrome, but other browser support can be added if necessary. More information on testing will be added here.

Influences

I have been heavily inspired by react-three by Izzimach.

After finding out about React 0.14, I have decided to see how someone would approach writing their own custom renderer.

This is the outcome of that curiosity.

Implementation Details

I have looked very deeply into how react-dom works. It is internally referred as ReactMount.

Starting from ReactMount#render, I duplicated the functionality, function by function, line by line.

Wherever the DOM was mentioned, I replaced them with generic equivalents.

I tried to point to existing functions as long as they were not corrupted by the DOM.

Then I wrote my own internal components, these are things like <span/>, <div/>, <table/>. Except, now they are <scene/>, <object3D/>, <mesh/>.

This way, you don't need to import a gazillion different modules.

Another benefit is that it allows me to make things super fast and not depend on composite components at all!

In effect, a <scene/> has the same effort, and similar effects as creating a <div/>.

TODO

  • More Documentation
  • More Testing
  • More examples
  • More Performance optimizations
  • Implement rest of three.js library ( See #2 )
  • Make it generic and allow the world to create their own custom react renderers!
    • It's not that hard, trust me ;)

Issues· 99 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptreactreact-three-renderer

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架