Basic plane
A basic plane geometry. Fork on Codesandbox
Live example
Coming Soon
Code
import React from "react";
import { render } from "react-dom";
import { Canvas } from "react-three-fiber";
const Box = () => {
return (
<mesh rotation-x={Math.PI * -0.5}>
<planeBufferGeometry args={[20, 20]} />
<meshStandardMaterial color={"pink"} />
</mesh>
);
};
const App = () => {
return (
<Canvas
style=
camera=
>
<pointLight position={[5, 5, 5]} />
<Box />
</Canvas>
);
};
render(<App />, document.getElementById("root"));
Running this example
Clone this repo, and then NPM install and NPM start from the relevant directory.
$ cd examples/geometry/basic-plane
$ npm install && npm run start