Skip to content

delasign/reactjs-3js-vitejs-starter-project

Repository files navigation

Typescript + React + ThreeJS Vite Starter Project.

A sample Typescript + React + 3JS ViteJS starter project that demonstrates its use via a counter.

It followed the tutorial found on: https://www.delasign.com/blog/reactjs-3js-vitejs/

Please note that this guide uses Styled Components. To learn more about Styled Components please visit:https://styled-components.com

Getting Setup

  1. Download the repository.
  2. Run yarn install to install all the dependencies.
  3. Run yarn start to initiate the development environment.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

npm run eject

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

📰 Guides

  1. How to create a React, Typescript & ThreeJS GLSL Vite Project 🔗
  2. React, ThreeJS & GLSL Resources 🔗

📚 Tutorials

ThreeJS

Setup & Basics

  1. How to create a ThreeJS responsive ReactJS project 🔗
  2. How to use alias paths in Typescript & ViteJS 🔗
  3. How to add a shader to a ThreeJS geometry in ReactJS 🔗
  4. How to add lights to a standard material in ThreeJS 🔗
  5. How to add lights to a material that uses a shader in ThreeJS 🔗
  6. How to add a shader to a box geometry in ThreeJS 🔗
  7. How to add Orbit Controls to a ThreeJS scene in ReactJS 🔗

DAT.GUI

  1. How to use dat.gui with ReactJS and ThreeJS 🔗
  2. How to alter a ThreeJS Color using dat.gui 🔗

Uniforms, Varying & Attributes

  1. How to pass data from a vertex shader to a fragment shader in ThreeJS 🔗
  2. How to create and use uniform data in shaders in ThreeJS 🔗
  3. How to create and use attributes in shaders in ThreeJS 🔗

GLSL

  1. How to color the faces of a box geometry using a shader in ThreeJS 🔗
  2. How to use GLSL shaders in ReactJS & ThreeJS 🔗
  3. How to import a GLSL file into a GLSL file in ReactJS & ThreeJS 🔗

Errors

  1. ReactJS renders multiple ThreeJS canvases on save 🔗
  2. How to fix the include invalid directive name error in React & ThreeJS 🔗
  3. Dat.Gui produces multiple GUI's on hot reload in ReactJS 🔗

About

A GLSL powered React, Typescript & 3JS ViteJS project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published