Starting From Scratch

With nothing but an empty folder learn how to start building with Triplex.

This guide walks you through the minimum amount of steps to open a 3D component inside Triplex.

If you haven't already make sure to install Node.js and initialize a new project with npm init and follow the prompts.

Install Dependencies

This installs the required packages to your project and places them in its package.json file.

Terminal
npm install @types/react @types/react-dom @types/three @react-three/fiber react react-dom three

Create a Component

This can be anything you want, here we create a box.

src/scene.tsx
export default function Scene() {
  return (
    <mesh>
      <boxGeometry args={[1, 1, 1]} />
      <meshStandardMaterial color="red" />
    </mesh>
  );
}

Open It Inside Triplex

Continue building with either Triplex for VS Code or Triplex Standalone.

Was this page helpful?