Skip to content

pachoclo/vite-threejs-ts-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three.js Vite Template with TypeScript

Three.js + Vite + TypeScript starter

Copy (clone without git history)

npx degit pachoclo/vite-threejs-ts-template threejs-project

screenshot ---

Stuff included in the scene.ts

  • Geometry
  • Material
  • Mesh
  • Ambient Light
  • Point Light
  • Camera
  • Scene
  • Canvas
  • Renderer (WebGL)
  • Loading Manager
  • Orbit Controls
  • Drag Controls
  • Grid
  • Antialias enabled
  • Transparent canvas
  • Responsive renderer and camera (to canvas size)
  • Animation Loop
  • Shadows
  • Stats (FPS, ms)
  • Full screen (double-click on canvas)
  • Debug GUI

Tech Stack

  • Three.js
  • TypeScript
  • Vite

CLI Commands

Installation

npm i

Run dev mode

npm run dev

Build

npm run build

Run build

npm run preview