firtoz / react-three-renderer-fiber

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

Mesh should accept elements or native types as properties #13

Closed toxicFork closed 6 years ago

toxicFork commented 7 years ago

i.e. all of these should be equivalent:

// to be deprecated?

<mesh>
  <boxGeometry width={5} height={5} depth={5} />
  <meshBasicMaterial color={0xff0000} />
</mesh>
<mesh
  geometry={<boxGeometry width={5} height={5} depth={5} />}
  material={<meshBasicMaterial color={0xff0000} />}
/>
const myGeometry = new BoxGeometry(5, 5, 5);
const myMaterial = new MeshBasicMaterial({ color: 0x00ff00 });

<mesh
  geometry={myGeometry}
  material={myMaterial}
/>
toxicFork commented 6 years ago

obsolete (also kind of done)