Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pachoclo/vite-threejs-ts-template

A Vite-based starter project for Three.js with some of the essentials
https://github.com/pachoclo/vite-threejs-ts-template

starter starter-kit template three three-js threejs typescript vite vitejs

Last synced: about 1 month ago
JSON representation

A Vite-based starter project for Three.js with some of the essentials

Awesome Lists containing this project

README

        

# Three.js Vite Template with TypeScript

Three.js + Vite + TypeScript starter

- [Demo](https://vite-threejs-ts-template.vercel.app/)
- [Jump to CLI commands](#cli-commands)

## Copy (clone without git history)

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

---
screenshot
---

## Stuff included in the `scene.ts`

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

## Tech Stack

- Three.js
- TypeScript
- Vite

## CLI Commands

Installation

```bash
npm i
```

Run dev mode

```bash
npm run dev
```

Build

```bash
npm run build
```

Run build

```bash
npm run preview
```