Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Entry Point

Firtina Ozbalikci edited this page Oct 29, 2015 · 25 revisions

WikiEntry Point

Entry Point (React3)

import React3 from 'react-three-renderer';

React3 is a regular React Component that places a canvas on the page.

When React3 is mounted, an instance of React3Renderer is used to render a <react3> internal component into the canvas.

The react3 internal component repeatedly requests animation frames from the browser.

Every frame it re-renders the whole scene.

The attributes are passed on to the react3 internal component so that it can configure the renderer.

Additional Attributes:

canvasStyle

any The style properties to be passed onto the canvas.

Static functions

React3.findTHREEObject

Similar to ReactDOM.findDOMNode.

Finds a THREE.js object from a mounted component.

You are encouraged to use refs instead.

React3.eventDispatcher

Advanced usage. Used to dispatch events. Undocumented for now.

View Source

Clone this wiki locally