firtoz / react-three-renderer-fiber

Porting R3R to use React Fiber
MIT License
94 stars 10 forks source link

Should support fully declarative behaviour #11

Closed toxicFork closed 6 years ago

toxicFork commented 7 years ago

import as React from "react"; import as THREE from "three"; import ReactThreeRenderer from "react-three-renderer";

ReactThreeRenderer.render(<webGLRenderer width={800} height={600}

clearColor={0xdddddd} clearAlpha={1}

<render camera={<perspectiveCamera fov={35} aspect={800 / 600} near={0.1} far={10000} position={new THREE.Vector3(-15, 10, 10)} lookAt={new THREE.Vector3(0, 0, 0)} />} scene={

<pointLight position={new THREE.Vector3(10, 0, 10)} color={0xFFFF00} /> }

, document.getElementById("example"));

toxicFork commented 6 years ago

this is kind of done already