threlte logo
Getting Started

Installation

To start using Threlte install the packages you want to use in your project.

Threlte consists of 7 packages which can be installed and used individually. @threlte/core and Three.js itself are required for all projects while the other packages are optional. @threlte/gltf does not need to be installed separately as it can be used with npx, the resulting Threlte components however require @threlte/extras to be installed.

Choose the packages you want to use

Compose Three.js scenes in a declarative and state-driven way. Three.js is required as a peer dependency.


Components, helpers, hooks and more that extend the core functionality.


A command-line tool that turns GLTF assets into declarative and re-usable Threlte components. The generated Threlte components make use of the package @threlte/extras.


Components and hooks to use the Rapier physics engine in Threlte.


Components and hooks to use the animation library Theatre.js in Threlte.


Components and hooks for VR and AR.


Components and hooks to use the flex engine Yoga in Threlte.


TypeScript types for Three.js.

Install the packages with npm, pnpm, yarn or any other package manager you prefer.

npm install three @threlte/core

See this comment for tips on how to reduce bundle size when working with bundlers like vite and three.js.