Skip to content

Starter template for building Three.js applications from scratch, created by me.

Notifications You must be signed in to change notification settings

kayodegeorge/three-js-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three.js Starter Template

This is a starter template for building Three.js applications from scratch, created by me. It uses Vite for fast development, npm for package management, and is designed to work seamlessly with modern browsers like Chrome.

Features

  • Vite: Super-fast build tool optimized for modern web development.
  • Three.js: 3D graphics library for creating interactive 3D content in the browser.
  • OrbitControls: Easy navigation and camera controls in 3D scenes.
  • Chrome Optimized: Works best with modern browsers like Chrome.

Getting Started

Prerequisites

Ensure you have Node.js installed. You can check this by running:

node -v
npm -v

If not installed, download from Node.js Official Website.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/your-repo-name.git
  2. Navigate to the project directory:

    cd your-repo-name
  3. Install dependencies:

    npm install

Running the Development Server

To start the development server:

npm run dev

The application will be available at: http://localhost:5173/

Building for Production

To create an optimized production build:

npm run build

Usage

  • src/index.js: The entry point for your Three.js application.
  • src/App.js: Contains the initialization logic for Three.js, the scene, and the renderer.
  • src/World.js: Handles the setup for objects (like meshes), the camera, and controls.

Browser Support

This template is optimized for Chrome, but it should work in any modern browser that supports WebGL.

Customization

You can add custom objects, lights, or other Three.js features by editing the World.js or adding new modules as needed.

Resources

Thank you, kindly share if you find it helpful.

About

Starter template for building Three.js applications from scratch, created by me.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published