π Getting Started β
π Overview β
Three App
is a set of utility functions that makes using three.js more declarative and functional. It enhances the developer experience by providing an easy and solid starting point for any 3D project, reducing boilerplate code and helping you better organize your codebase.
π
Using Three App
you don't have to worry about manually setting up the renderer
, camera
, commons events, or the most complex part, the render loop
.
π Trying it online β
You can try Three App
online on StackBlitz or CodeSandbox. It runs directly in the browser, and it is almost identical to the local setup but doesn't require installing anything on your machine.
Stackblitz template uses the official Vite + ts template
CodeSandBox template uses a basic Parcel setup
π Scaffolding your project β
You can setup your project following the Parcel instructions or scaffold it using Create Vite tool with a vanilla template.
$ npm create vite@latest my-three-app -- --template vanilla-ts
The
Create Vite
tool offers multiple templates, includingvanilla
andvanilla-ts
.
π₯ Installation β
npm i three @slzr/three-app
Three App
is compatible and tested with three.jsr169
.
π· Typescript Support β
Three App
is type-safe out of the box since it's written in TypeScript. However, three.js
doesnβt include type declarations, so youβll need to install them separately
npm i -D @types/three
π¦ Before you start β
WARNING
In order to use three app
you should have some experience or at least basic knowledge of how three.js
works.
π Useful material β
- Three.js - Official documentation
- Three.js - Fundamentals
- Discover three.js
- Bruno Simon's three.js Journey