{"repo":"tomhsiao1260/three-starter","free":true,"listed":false,"github":"https://github.com/tomhsiao1260/three-starter","clone":"git clone https://github.com/tomhsiao1260/three-starter.git","description":"🌈 three.js starter based on OOP","language":"JavaScript","stars":103,"topics":["webgl","threejs","three-js","3d","boilerplate"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"ThreeJS Starter A three.js starter based on object-oriented programming ( demo ). Table of Contents - Introduction - Getting Started - Event Emitter - Mouse Control - Add Material - Create Mesh - Load Model - Customized Shader - GSAP Animation - Debug Mode - Notes Introduction This is a three.js starter written in OOP based on Bruno Simon's project of this cool website. I think this would really help for web developers, who are trying to use three.js library in a more modular and manageable way in their future projects. It's also a quick guide to understand some basic structure of Bruno Simon's project. To use this starter, I would go through some main steps. However, you don't need to complete the entire document before getting started, instead, you can come back if needed while developing your own project. The main branch is written in Javascript. Feel free to check out the vite/typescript branch if you prefer the Typescript version. Features: Three.js, WebGL, GSAP, dat.gui, webpack, Babel, ESLint, OOP Getting Started Type the following steps into the terminal. Then start the dev server and navigate to http://localhost:8080 Event Emitter Event Emitter allows us to handle some custom events. For example, we can create an instance of Time class which is inherited from Event Emitter . Let's put some callbacks via Event Emitter built-in on method. Now, we can use trigger method to execute those callbacks. Note that it would only trigger events with the same name ( tick in this ","default_branch":null,"files":null,"tree":[],"storefront":"/r/tomhsiao1260","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tomhsiao1260/three-starter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}