Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (r3f-viam) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
r3f-viam
A collection of react-three-fiber components for the Viam robotics framework.
View the available components as a Storybook
Run the sample app
From the base directory run
npm install
npm run devKnown problems
For an as yet undiagnosed reason, OrbitControls from drei doesn't work. Instead, use a React component like this, which is made to be the child of a Canvas element:
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
import { extend, useThree } from "@react-three/fiber";
extend({ OrbitControls });
export function Experience() {
const { camera, gl } = useThree();
return (
<>
<orbitControls args={[camera, gl.domElement]} />
<color args={["ivory"]} attach="background" />
<ambientLight intensity={0.5} />
<pointLight position={[10, 10, 10]} />
<mesh>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color="hotpink" />
</mesh>
</>
);
}