Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Three.js

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Introduction to Three.js

Avatar for Brian Lu

Brian Lu

April 24, 2014
Tweet

More Decks by Brian Lu

Other Decks in Programming

Transcript

  1. THREE.JS AND WEBGL • Three.js is a JavaScript library of

    WebGL • WebGL is the JavaScript API for interactive 2D/3D graphic • WebGL renders on HTML5 canvas • WebGL utilize GPU for high performance
  2. WHAT DOES IT DO? • Creating simple and complex 3D

    geometries • Animating and moving objects through a 3D scene • Applying textures and materials to your objects • loading objects from 3D modeling software • Creating 2D sprite-based graphics Source: Learning Three.js: The Javascript 3D Library for WebGL
  3. RENDERING 3D SCENE • Camera • Lights • Object •

    Geometry: collection of points in 3D space and faces connecting all those points together • Material: defines how it looks outside of geometry
  4. USEFUL LIBRARIES • dat.GUI
 simple user interface component for changing

    variable in your code
 demo • convert_obj_three.py
 convert Wavefront OBJ file into JSON
 doc • OrbitalControls.js
 simple way to add rotate and pan around an object.
 demo • stats.js
 add Frame Per Second (FPS) reading
  5. RESOURCE • Learn Three.js: The JavaScript 3D Library for WebGL


    
 • https://github.com/mrdoob/three.js/