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)

var React3 = require('react-three-renderer')

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

When React3 is mounted, it initializes a THREE.js webgl renderer.

Afterwards, it repeatedly requests animation frames from the browser.

Every frame it re-renders the whole scene.

The renderer properties are configured through a <react3> component.

All of the attributes are passed to <react3>.

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.

Clone this wiki locally