WebGL: 3D Graphics for the Web

16
WEBGL 3D GRAPHICS FOR THE WEB : AN INTRODUCTION Shritesh Bhattarai @shritesh

description

Presentation on WebGL for Software Freedom Day, 2014.

Transcript of WebGL: 3D Graphics for the Web

Page 1: WebGL: 3D Graphics for the Web

WEBGL3D GRAPHICS FOR THE WEB : AN INTRODUCTION

Shritesh Bhattarai@shritesh

Page 2: WebGL: 3D Graphics for the Web

WEBHTML + CSS + JavaScript + ...

Page 3: WebGL: 3D Graphics for the Web

JAVASCRIPTProgramming language of the web

C-like syntaxRuns on the web-browserDynamic, scripting languageCan run on the server tooNot to be confused with Java

function factorial(n) { if (n === 0) { return 1; } return n * factorial(n - 1);}

Page 4: WebGL: 3D Graphics for the Web

COMPUTER GRAPHICSRendered Image

Page 5: WebGL: 3D Graphics for the Web

COMPUTER GRAPHICSWireframe Model

Page 6: WebGL: 3D Graphics for the Web

COMPUTER GRAPHICSMesh: Vertices and Polygons (Structure)Material: Textures (Appearance)Scene, Camera, Perspective, ...

Page 7: WebGL: 3D Graphics for the Web

OPENGLOpen Graphics LibraryAPI for rendering 2D and 3D graphicsProvides a way to interact with GPUAvailable on (almost) every platform.

Page 8: WebGL: 3D Graphics for the Web

OPENGL USERS

Games

Image Manipulation

Graphics Application

Page 9: WebGL: 3D Graphics for the Web

WEBGLWeb + OpenGL = WebGL

Page 10: WebGL: 3D Graphics for the Web

OBLIGATORY SPINNING CUBE

Page 11: WebGL: 3D Graphics for the Web

WEBGLOpenGL ES 2.0Javascript APIUses a <canvas> elementSupported by every modern browser

Page 12: WebGL: 3D Graphics for the Web

THREE.JSLibrary for WebGLMakes WebGL super easyOpen Source (MIT)http://threejs.org/

Page 13: WebGL: 3D Graphics for the Web

DEMO TIME/demos

Page 14: WebGL: 3D Graphics for the Web

WHY IS SHRITESH TALKING ABOUT WEBGL ONSOFTWARE FREEDOM DAY?

Page 15: WebGL: 3D Graphics for the Web

WEB: FREE AND OPENGaming is the only field holding OSS backWeb is the de facto platform for opennessNo restrictions / walled gardensPotential to reach billions of audiencesSupported by every other platform

Page 16: WebGL: 3D Graphics for the Web

THANK YOUFOLLOW @SHRITESH ON TWITTER AND GITHUB