All Projects → vaneenige → Webgl Structure

vaneenige / Webgl Structure

Licence: mit
🚀 A modern, ES6 based, javascript structure for WebGL based projects with THREE.js!

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Webgl Structure

Threejs Es6 Webpack Starter
Three.js ES6 starter project with a sane webpack configuration
Stars: ✭ 85 (+93.18%)
Mutual labels:  webpack, eslint, threejs
Three Seed
A Three.js starter project with ES6 and Webpack
Stars: ✭ 213 (+384.09%)
Mutual labels:  webpack, webgl, threejs
Threejs Webpack Es6 Boilerplate
A basic boilerplate for a Three.js project compiled with Webpack and transpiled via Babel to enable using ES6 syntax.
Stars: ✭ 267 (+506.82%)
Mutual labels:  webpack, eslint, webgl
Thinkful Workshop React Redux Node Mongodb Webpack2
Stars: ✭ 12 (-72.73%)
Mutual labels:  webpack, eslint
Whitestorm App Boilerplate
[WIP] WhitestormJS 2 App boilerplate
Stars: ✭ 42 (-4.55%)
Mutual labels:  webpack, threejs
React Planner
✏️ A React Component for plans design. Draw a 2D floorplan and navigate it in 3D mode.
Stars: ✭ 846 (+1822.73%)
Mutual labels:  webgl, threejs
Jeelizweboji
JavaScript/WebGL real-time face tracking and expression detection library. Build your own emoticons animated in real time in the browser! SVG and THREE.js integration demos are provided.
Stars: ✭ 835 (+1797.73%)
Mutual labels:  webgl, threejs
React Ssr Starter
All have been introduced React environment
Stars: ✭ 20 (-54.55%)
Mutual labels:  webpack, eslint
Encom Globe
🌎 WebGL globe based on the boardroom scene from Tron: Legacy
Stars: ✭ 872 (+1881.82%)
Mutual labels:  webgl, threejs
3d Box Shot Maker
Free tool to generate 3D box shots for your online products.
Stars: ✭ 20 (-54.55%)
Mutual labels:  webgl, threejs
Express React Boilerplate
🚀🚀🚀 This is a tool that helps programmers create Express & React projects easily base on react-cool-starter.
Stars: ✭ 32 (-27.27%)
Mutual labels:  webpack, eslint
Ballanceonline Demo
A web version of Ballance, using Three.js and Ammo.js
Stars: ✭ 26 (-40.91%)
Mutual labels:  webgl, threejs
Wagner
Effects composer for three.js
Stars: ✭ 930 (+2013.64%)
Mutual labels:  webgl, threejs
Front End Stack
Starter kit for building single-page app using React, Redux, RxJS, Reselect, Material UI, Immer, Prettier and Webpack.
Stars: ✭ 11 (-75%)
Mutual labels:  webpack, eslint
Webxr Physics
Adds physics to WebXR
Stars: ✭ 18 (-59.09%)
Mutual labels:  webpack, threejs
Three.js Pathtracing Renderer
Real-time PathTracing with global illumination and progressive rendering, all on top of the Three.js WebGL framework. Click here for Live Demo: https://erichlof.github.io/THREE.js-PathTracing-Renderer/Geometry_Showcase.html
Stars: ✭ 872 (+1881.82%)
Mutual labels:  webgl, threejs
Bimserver Nodejs
OpenSouce BIMServer NodeJs
Stars: ✭ 28 (-36.36%)
Mutual labels:  webgl, threejs
3d kibana charts vis
3D Kibana Charts: Pie Chart, Bars Chart, Bubbles Chart
Stars: ✭ 34 (-22.73%)
Mutual labels:  webgl, threejs
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (+2106.82%)
Mutual labels:  webpack, eslint
Expo Crossy Road
🐥🚙 Crossy Road game clone made in Expo (iOS, Android, web), THREE.js, Tween, React Native. 🐔
Stars: ✭ 701 (+1493.18%)
Mutual labels:  webgl, threejs

Modern WebGL Structure

During recent work related and personal projects I've been playing a lot with WebGL. Getting more and more involved with ES6 code I wanted to create a modern structure to easily configure a WebGL workflow and create a prototype without the need of doing the same setup over and over again.

In January of 2017 I've been working on expanding my WebGL knowledge and created several experiments on Codepen with THREE.js. Creating these experiments taught me a lot and they have been well-received by the community.

Installation

  1. Run npm install. This will install all dependencies needed for the application to run.

  2. Run npm run development. This will watch and compile your Javascript files.

  3. Navigate to localhost:3000. You should see a moving cube!

Usage

This workflow is based on ES6 techniques and useful tools to make development of your THREE.js application as easy as possible!

Global variables

Variables in ES6 can be made easily accessible by using imports. Importing one of the objects below gives you the opportunity to change them in one place and use them in another (these will update automatically).

  • Defaults: Used to store all THREE.js object: scene, renderer, camera and an object for structure elements like geometries and materials. These can be used in the GUI to update them in real-time.

  • Settings: Used to store overall user settings, camera variables, canvas background color, default device pixel ratio and a check for mobile devices.

  • Tools: Used to store useful tools like a GUI for changing variables in real-time, orbit controls for user movement in the THREE.js world and a stats monitor to keep track of performance in the application. These can all be turned on and off in the user settings.

THREE.js

To create amazing things with THREE.js you should only have to focus on two things: Creating the magical environment and bringing it to life with movement.

  • Create: After creating the basic requirements to run a THREE.js world the environment is created. This environment can be stored globally and adjusted by the GUI. This can be found in environment.js.

  • Render: After the environment is created, and the optional tools are enabled, the render function is called and should optimally run at least 60 times a second. Besides the necessary things like updating the stats and setting a background color there's a clean function for updating the environment. This can be found in render.js;

Overall Workflow

To enhance the overall workflow these tools are really helpful to stay consistent with your code style and applying new techniques and standards while staying backwards compatible.

  • Webpack: Used to compile Javascript (with Babel) for backwards compatibility. Running the development script watches and bundles Javascript as you develop and offers a localhost to see your application run on. Running the production script bundles the Javascript once and uglifies it to get the smallest size available. More documentation can be found here.

  • ESLint: Used to maintain Javascript code standards throughout the project. This workflow uses the Airbnb Style Guide and can be adjusted to your liking in the .eslintrc file. More documentation can be found here.

Experiments

While creating these Codepen experiments this workflow improved a lot. I'd love to hear your thoughts on how to make it even better and see your creations!

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].