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

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: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

Github-CI: [![Build Status][build_status]][build_link]

[build_status]: ./../../actions/workflows/build.yml/badge.svg
[build_link]: ./../../actions/workflows/build.yml

# Three.js Vite Template with TypeScript

Three.js + Vite + TypeScript starter

- [Demo](../../deployments/github-pages)
- [Jump to CLI commands](#cli-commands)

---
![screenshot](docs/preview.png)

---

## Tech Stack

- Three.js
- TypeScript
- Vite

## 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

## CLI Commands

Installation

```bash
npm i
```

Run dev mode

```bash
npm run dev
```

Build

```bash
npm run build
```

Run build

```bash
npm run preview
```