how to start webgl easily?

13
How to start WebGL easily?

Upload: seito-horiguchi

Post on 16-Apr-2017

108 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: How to start WebGL easily?

How to start WebGL easily?

Page 2: How to start WebGL easily?

ProfileSeito Horiguchi

• LIG Philippines inc.

• President / Developer

• https://github.com/seito2014

Page 3: How to start WebGL easily?

What is WebGL & Three.js?

Page 4: How to start WebGL easily?

Today's goal = Rendering a cool 3D modelhttps://github.com/seito2014/three-tutorial/tree/master

Page 5: How to start WebGL easily?

Try 1st Demohttps://github.com/seito2014/three-tutorial/tree/master/cube-study

1.Get Three.js library

2.Write basic code

3.Add Animation & TrackballControls

Page 6: How to start WebGL easily?

1.Get Three.js libraryhttps://threejs.org/

./three.js-master/build/three.js

Page 7: How to start WebGL easily?

2.Write basic code

• Write simple HTML

• Load library file

• Create scene

• Create camera

• Create spotlight

• Render

Page 8: How to start WebGL easily?

3.Add Animation & TrackballControls

three.js-master/examples/js/controls/TrackballControls.js

Page 9: How to start WebGL easily?

Try 2nd Demohttps://github.com/seito2014/three-tutorial/tree/master/city-study

1.Get 3D model

2.Call 3d model files

Page 10: How to start WebGL easily?

Three.js supports vaious formats.

• JSON

• OBJ, MTL

• Collada

• STL

• CTM

• ...etc

Page 11: How to start WebGL easily?

1.Get 3D model

http://tf3dm.com/https://www.cgtrader.com/

Page 12: How to start WebGL easily?

2. Call 3d model files

• load method

• three.js-master/examples/js/loaders/MTLLoader.js

• three.js-master/examples/js/loaders/OBJLoader.js

Page 13: How to start WebGL easily?

Thank you!