SlideShare a Scribd company logo
1 of 21
WebGL, HTML5…
and how the mobile web
was won
tony parisi
Vizi, inc.
march 25, 2014
image: http://www.bitrebels.com
3/25/20
14
http://www.tonyparisi.com
image:
http://www.arvindsaba.blogspot.com/
+ =
a wild web of app development
… and one
platform to
rule them
all…
3/25/20
14
http://www.tonyparisi.com
the web browser as platform
fast JavaScript virtual machines
hardware-accelerated compositing
animation support
Workers, WebSockets, local storage, local databases
new language initiatives: Dart, Typescript, asm.js
mobile-inspired features: location, touch, device orientation…
mobile platforms rapidly adopting all HTML5 features in browsers
and embedded WebView controls - near-ubiquity
3/25/20
14
http://www.tonyparisi.com
breakthrough applications
3/25/20
14
http://www.tonyparisi.comhttp://www.tonyparisi.com
ported in 5 days Unreal native C++ engine -> JavaScript Emscripten + asm.js60FPS
bringing the power of the GPU
to the web
WebGL hardware-accelerated 3D rendering
CSS 3D hardware-accelerated transforms, transitions, and
animations
3/25/20
14
http://www.tonyparisi.com
OpenGL ES™ in a browser
JavaScript API bindings
shipped since early 2011
supported in all modern browsers
• desktop Safari, Firefox, Chrome, Opera, Internet Explorer
• iOS mobile Safari – iAds only
• Android – mobile Chrome, mobile Firefox
• Blackberry, Tizen, Firefox OS, Amazon FireOS (Kindle Fire
HDX)
• Surface (Windows 8.1)
• NVIDIA Shield
over 1B served
http://www.tonyparisi.com
3/25/20
14
the 3D API standard for the web
100,000 Stars Google Experiment
http://workshop.chromeexperiments.com/stars/
how WebGL works
JavaScript API to OpenGL ES (version 2.0)
draw to a canvas element using a special context
low-level drawing – buffers, primitives, textures and shaders
accelerated by graphics hardware (GPU)
can draw 2D as well as 3D graphics
there is no file format; no markup language; no DOM.
http://www.tonyparisi.com
3/25/20
14
a simple WebGL program
1. create a <canvas> element
2. obtain a drawing context
3. initialize the viewport
4. create one or more buffers
5. create one or more matrices
6. create one or more shaders
7. initialize the shaders
8. draw one or more primitives
http://www.tonyparisi.com
3/25/20
14
create the canvas, context and
viewport
3/25/20
14
http://www.tonyparisi.com
function initWebGL(canvas) {
var gl = null;
var msg = "Your browser does not support WebGL, " +
"or it is not enabled by default.";
try
{
gl = canvas.getContext(“webgl");
}
catch (e)
{
msg = "Error creating WebGL Context!: " + e.toString();
}
if (!gl)
{
alert(msg);
throw new Error(msg);
}
return gl;
}
function initViewport(gl, canvas)
{
gl.viewport(0, 0, canvas.width, canvas.height);
}
detect WebGL
set WebGL drawing
region
buffers and typed arrays
var vertexBuffer;
vertexBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);
var verts = [
// Front face
-1.0, -1.0, 1.0,
1.0, -1.0, 1.0,
1.0, 1.0, 1.0,
-1.0, 1.0, 1.0,
// Back face
-1.0, -1.0, -1.0,
-1.0, 1.0, -1.0,
1.0, 1.0, -1.0,
1.0, -1.0, -1.0,
…
];
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verts), gl.STATIC_DRAW);
WebGL drawing functions
use buffers of data
new low-level data type
stores arrays of floats
and ints compactly
http://www.tonyparisi.com
3/25/20
14
shaders
var vertexShaderSource =
" attribute vec3 vertexPos;n" +
" attribute vec2 texCoord;n" +
" uniform mat4 modelViewMatrix;n" +
" uniform mat4 projectionMatrix;n" +
" varying vec2 vTexCoord;n" +
" void main(void) {n" +
" // Return the transformed and projected vertex valuen" +
" gl_Position = projectionMatrix * modelViewMatrix * n" +
" vec4(vertexPos, 1.0);n" +
" // Output the texture coordinate in vTexCoordn" +
" vTexCoord = texCoord;n" +
" }n";
var fragmentShaderSource =
" precision mediump float;n" +
" varying vec2 vTexCoord;n" +
" uniform sampler2D uSampler;n" +
" void main(void) {n" +
" // Return the pixel color: always output whiten" +
" gl_FragColor = texture2D(uSampler, vec2(vTexCoord.s, vTexCoord.t));n" +
"}n";
the vertex shader
transforms model-space
positions into screen space
the fragment shader outputs
a color value for each pixel
http://www.tonyparisi.com
3/25/20
14
drawingfunction draw(gl, obj) {
// clear the background (with black)
gl.clearColor(0.0, 0.0, 0.0, 1.0);
gl.enable(gl.DEPTH_TEST);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
// set the shader to use
gl.useProgram(shaderProgram);
// connect up the shader parameters: vertex position, texture coordinate,
// projection/model matrices and texture
// set up the buffers
gl.bindBuffer(gl.ARRAY_BUFFER, obj.buffer);
gl.vertexAttribPointer(shaderVertexPositionAttribute, obj.vertSize, gl.FLOAT, false, 0, 0);
gl.bindBuffer(gl.ARRAY_BUFFER, obj.texCoordBuffer);
gl.vertexAttribPointer(shaderTexCoordAttribute, obj.texCoordSize, gl.FLOAT, false, 0, 0);
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, obj.indices);
gl.uniformMatrix4fv(shaderProjectionMatrixUniform, false, projectionMatrix);
gl.uniformMatrix4fv(shaderModelViewMatrixUniform, false, modelViewMatrix);
gl.activeTexture(gl.TEXTURE0);
gl.bindTexture(gl.TEXTURE_2D, webGLTexture);
gl.uniform1i(shaderSamplerUniform, 0);
// draw the object
gl.drawElements(obj.primtype, obj.nIndices, gl.UNSIGNED_SHORT, 0);
}
clear the canvas
set the shader
set up buffers for
vertices and texture
coordinates
pass transform and
projection matrices
to the shader
set the texture and pass to
the shader
draw the object
http://www.tonyparisi.com
3/25/20
14
engines and frameworks
3/25/20
14
http://www.tonyparisi.com
game engines/IDEs
Goo
Enginehttp://www.gootechnologies.co
m/
Verold http://verold.com/
Turbulenz https://turbulenz.com/
PlayCanvas
http://www.playcanvas.com/
Artillery Engine
https://artillery.com/
Sketchfab https://sketchfab.com/
Unreal
https://www.unrealengine.com/
Unity http://unity3d.com/#unity-5
scene graph libraries/page frameworks
Three.js
http://threejs.org/
SceneJS
http://scenejs.org/
BabylonJS
http://www.babylonjs.com/
Vizi
https://github.com/tparisi/Vizi
Voodoo.js
http://www.voodoojs.com/
PhiloGL
http://www.senchalabs.org/philogl/
tQuery
http://jeromeetienne.github.io/tquery/
3/25/20
14
http://www.tonyparisi.com
model from 3drt.com
glTF: a “JPEG for 3D”
full-featured: scene layout, cameras, lights, animations
JSON for scene structure; binary buffers for model data
intended for WebGL and OpenGL ES mobile applications
CSS3 3D transforms
translate, rotate, scale page elements with perspective
.bk-list li {
perspective: 1800px;
}
.bk-list li .bk-front {
transform-style: preserve-3d;
transform-origin: 0% 50%;
transform: translate3d(0,0,20px);
}
.bk-list li .bk-book.bk-bookdefault:hover {
transform: rotate3d(0,1,0,35deg);
}
http://tympanus.net/codrops/2013/01/08
/3d-book-showcase/
browser will render element in 3D perspective
add origin to
translation
apply to child
elements
apply 35 degree rotation about Y axis
http://www.tonyparisi.com
3/25/20
14
even 2D graphics are
accelerated if 3D transform
functions are used e.g.
translate3d(10, 20, 0);
winning the mobile 3d web
HTML5 runs in all mobile browsers, and as embedded
WebView components in apps
WebGL is supported in most mobile environments
• iOS mobile Safari – iAds only
• Android – mobile Chrome, mobile Firefox
• Blackberry, Tizen, Firefox OS, Amazon FireOS (Kindle Fire
HDX)
• Surface (Windows 8.1)
• NVIDIA Shield
CSS 3D transforms are supported in all mobile environments
3/25/20
14
http://www.tonyparisi.com
cross-browser HTML5 and
WebGL
3/25/20
14
http://www.tonyparisi.com
hybrid app development
use CocoonJS™
http://ludei.com/
or Impact Ejecta
desktop HTML5 and
WebGL
all browsers support all
features, nearly identically
mobile WebGL
• iOS - mobile Safari – iAds only
• Android – mobile Chrome,
Firefox
• Amazon Silk, Kindle Fire OS
• Blackberry, Tizen, Firefox OS
• NVIDIA Shield
the tipping point
3/25/20
14
http://www.tonyparisi.com
Microsoft now fully supports WebGL in IE and Windows mobile.
Kindle Fire HDX: at $229, the 7” is probably the best multimedia
device deal on the planet… thanks in part to WebGL.
Sony built the whole PS4 user interface out of WebGL. 4.2M seats in
one whack… and growing.
the 2013 NORAD Tracks Santa site saw 48.8% WebGL success across
all browsers & platforms for 20M visitors, an increase of 146% over
2012.
Opera Devices SDK – WebGL coming soon to a Bang & Olufsen TV
near you!
pro game middleware (Unreal, Unity) fully on board
CSS 3D transforms are supported on all platforms
can Apple be far behind… ?
on the frontier…
WebGL 2!
based on GL ES 3
will contain popular WebGL
extensions
just getting under way – no
dates yet
image: http://www.bitrebels.com
WebCL
Heterogeneous parallel computing
JavaScript
based on OpenCL 1.1
experimental –browser extensions
and custom Chromium builds
no ship dates announced yet
stay in touch…
contact information
tparisi@gmail.com
skype: auradeluxe
http://twitter.com/auradeluxe http://w
ww.tonyparisi.com/
http://www.learningwebgl.com/
get the books!
WebGL: Up and Running
http://www.amazon.com/dp/144932357X
Programming 3D Applications with HTML and WebGL
http://www.amazon.com/Programming-Applications-HTML5-
WebGL-Visualization/dp/1449362966
http://www.tonyparisi.com
3/25/20
14
get Vizi
https://github.com/tparisi/Vizi
SF WebGL Meetup
http://www.meetup.com/WebGL-Developers-Meetup/
book source code
https://github.com/tparisi/WebGLBook
https://github.com/tparisi/Programming3DApplications

More Related Content

What's hot

Speak the Web 15.02.2010
Speak the Web 15.02.2010Speak the Web 15.02.2010
Speak the Web 15.02.2010Patrick Lauke
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-airbrucelawson
 
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan PolandBruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Polandbrucelawson
 
Javascript native OOP - 3 layers
Javascript native OOP - 3 layers Javascript native OOP - 3 layers
Javascript native OOP - 3 layers David Nguyen
 
Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020Önder Ceylan
 

What's hot (8)

Speak the Web 15.02.2010
Speak the Web 15.02.2010Speak the Web 15.02.2010
Speak the Web 15.02.2010
 
Bruce lawson-over-the-air
Bruce lawson-over-the-airBruce lawson-over-the-air
Bruce lawson-over-the-air
 
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan PolandBruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
Bruce Lawson, Web Development 2.0, SparkUp! Poznan Poland
 
Javascript native OOP - 3 layers
Javascript native OOP - 3 layers Javascript native OOP - 3 layers
Javascript native OOP - 3 layers
 
HTML5 Intro
HTML5 IntroHTML5 Intro
HTML5 Intro
 
WebUSB
WebUSBWebUSB
WebUSB
 
Real solutions, no tricks
Real solutions, no tricksReal solutions, no tricks
Real solutions, no tricks
 
Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020
 

Viewers also liked

Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Tony Parisi
 
Virtually Anyone
Virtually AnyoneVirtually Anyone
Virtually AnyoneTony Parisi
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive WebTony Parisi
 
Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Tony Parisi
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGLTony Parisi
 
An Introduction to Web VR January 2015
An Introduction to Web VR January 2015An Introduction to Web VR January 2015
An Introduction to Web VR January 2015Tony Parisi
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive WebTony Parisi
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateTony Parisi
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebTony Parisi
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.jsJosh Staples
 
A-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersA-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersKevin Ngo
 
WebGL and three.js - Web 3D Graphics
WebGL and three.js - Web 3D Graphics WebGL and three.js - Web 3D Graphics
WebGL and three.js - Web 3D Graphics PSTechSerbia
 
Build the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameBuild the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameMozilla VR
 
Introduction to WebGL and WebVR
Introduction to WebGL and WebVRIntroduction to WebGL and WebVR
Introduction to WebGL and WebVRDaosheng Mu
 
The next frontier: WebGL and WebVR
The next frontier: WebGL and WebVRThe next frontier: WebGL and WebVR
The next frontier: WebGL and WebVRCodemotion
 
WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016Carsten Sandtner
 
An Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsAn Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsGeilDanke
 

Viewers also liked (20)

Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17
 
Virtually Anyone
Virtually AnyoneVirtually Anyone
Virtually Anyone
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive Web
 
Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGL
 
An Introduction to Web VR January 2015
An Introduction to Web VR January 2015An Introduction to Web VR January 2015
An Introduction to Web VR January 2015
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive Web
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API Update
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive Web
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.js
 
Intro to Three.js
Intro to Three.jsIntro to Three.js
Intro to Three.js
 
A-Frame: VR for Web Developers
A-Frame: VR for Web DevelopersA-Frame: VR for Web Developers
A-Frame: VR for Web Developers
 
WebGL and three.js - Web 3D Graphics
WebGL and three.js - Web 3D Graphics WebGL and three.js - Web 3D Graphics
WebGL and three.js - Web 3D Graphics
 
Build the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-FrameBuild the Virtual Reality Web with A-Frame
Build the Virtual Reality Web with A-Frame
 
Introduction to WebGL and WebVR
Introduction to WebGL and WebVRIntroduction to WebGL and WebVR
Introduction to WebGL and WebVR
 
The next frontier: WebGL and WebVR
The next frontier: WebGL and WebVRThe next frontier: WebGL and WebVR
The next frontier: WebGL and WebVR
 
OpenGL SC 2.0 Quick Reference
OpenGL SC 2.0 Quick ReferenceOpenGL SC 2.0 Quick Reference
OpenGL SC 2.0 Quick Reference
 
WebVR
WebVRWebVR
WebVR
 
WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016
 
An Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 secondsAn Introduction to WebVR – or How to make your user sick in 60 seconds
An Introduction to WebVR – or How to make your user sick in 60 seconds
 

Similar to WebGL, HTML5 and How the Mobile Web Was Won

WT-4064, Build Rich Applications with HTML5 and WebGL, by Tony Parisi
WT-4064, Build Rich Applications with HTML5 and WebGL, by Tony ParisiWT-4064, Build Rich Applications with HTML5 and WebGL, by Tony Parisi
WT-4064, Build Rich Applications with HTML5 and WebGL, by Tony ParisiAMD Developer Central
 
Building Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGLBuilding Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGLTony Parisi
 
HTML5 and Other Modern Browser Game Tech
HTML5 and Other Modern Browser Game TechHTML5 and Other Modern Browser Game Tech
HTML5 and Other Modern Browser Game Techvincent_scheib
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Esri Nederland
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Chris Griffith
 
HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!Iker Jamardo
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webChristian Heilmann
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptFITC
 
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.agup2009
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Patrick Chanezon
 
Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015Tony Parisi
 
WebGL Crash Course
WebGL Crash CourseWebGL Crash Course
WebGL Crash CourseTony Parisi
 
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Réaliser un jeu cross plateformes avec WebGL et babylon.jsRéaliser un jeu cross plateformes avec WebGL et babylon.js
Réaliser un jeu cross plateformes avec WebGL et babylon.jsdavrous
 
Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"Alex Theedom
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and moreYan Shi
 
Web app and more
Web app and moreWeb app and more
Web app and morefaming su
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?Ankara JUG
 

Similar to WebGL, HTML5 and How the Mobile Web Was Won (20)

WT-4064, Build Rich Applications with HTML5 and WebGL, by Tony Parisi
WT-4064, Build Rich Applications with HTML5 and WebGL, by Tony ParisiWT-4064, Build Rich Applications with HTML5 and WebGL, by Tony Parisi
WT-4064, Build Rich Applications with HTML5 and WebGL, by Tony Parisi
 
Building Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGLBuilding Rich Internet Applications with HTML5 and WebGL
Building Rich Internet Applications with HTML5 and WebGL
 
HTML5 and Other Modern Browser Game Tech
HTML5 and Other Modern Browser Game TechHTML5 and Other Modern Browser Game Tech
HTML5 and Other Modern Browser Game Tech
 
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
Building mobile apps with the ArcGIS api for Javascript, Esri, Andy Gup and A...
 
Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5Developing AIR for Mobile with Flash Professional CS5.5
Developing AIR for Mobile with Flash Professional CS5.5
 
HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!HTML5DevConf 2013 (October): WebGL is a game changer!
HTML5DevConf 2013 (October): WebGL is a game changer!
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-web
 
HTML5 and CartoDB
HTML5 and CartoDBHTML5 and CartoDB
HTML5 and CartoDB
 
Building AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScriptBuilding AR and VR Experiences for Web Apps with JavaScript
Building AR and VR Experiences for Web Apps with JavaScript
 
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
 
Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?Google's HTML5 Work: what's next?
Google's HTML5 Work: what's next?
 
Location Based Services Without the Cocoa
Location Based Services Without the CocoaLocation Based Services Without the Cocoa
Location Based Services Without the Cocoa
 
Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015
 
WebGL Crash Course
WebGL Crash CourseWebGL Crash Course
WebGL Crash Course
 
Réaliser un jeu cross plateformes avec WebGL et babylon.js
Réaliser un jeu cross plateformes avec WebGL et babylon.jsRéaliser un jeu cross plateformes avec WebGL et babylon.js
Réaliser un jeu cross plateformes avec WebGL et babylon.js
 
Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"Mobile Java with GWT: Still "Write Once, Run Everywhere"
Mobile Java with GWT: Still "Write Once, Run Everywhere"
 
A More Flash Like Web?
A More Flash Like Web?A More Flash Like Web?
A More Flash Like Web?
 
Web Apps and more
Web Apps and moreWeb Apps and more
Web Apps and more
 
Web app and more
Web app and moreWeb app and more
Web app and more
 
HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?HTML5 - Daha Flash bir web?
HTML5 - Daha Flash bir web?
 

More from Tony Parisi

The New Fine Arts
The New Fine ArtsThe New Fine Arts
The New Fine ArtsTony Parisi
 
Face the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldFace the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldTony Parisi
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Tony Parisi
 
React-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentReact-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentTony Parisi
 
Vrml, or There and Back Again
Vrml, or There and Back AgainVrml, or There and Back Again
Vrml, or There and Back AgainTony Parisi
 
The Coming Distribution War
The Coming Distribution WarThe Coming Distribution War
The Coming Distribution WarTony Parisi
 
VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015Tony Parisi
 
glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015Tony Parisi
 
Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Tony Parisi
 
The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014Tony Parisi
 
WebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseWebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseTony Parisi
 
And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?Tony Parisi
 
WebGL Primetime!
WebGL Primetime!WebGL Primetime!
WebGL Primetime!Tony Parisi
 
Virtually Anywhere
Virtually AnywhereVirtually Anywhere
Virtually AnywhereTony Parisi
 
glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013Tony Parisi
 

More from Tony Parisi (16)

The New Fine Arts
The New Fine ArtsThe New Fine Arts
The New Fine Arts
 
Face the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldFace the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented World
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016
 
React-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentReact-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR Development
 
Vrml, or There and Back Again
Vrml, or There and Back AgainVrml, or There and Back Again
Vrml, or There and Back Again
 
The Coming Distribution War
The Coming Distribution WarThe Coming Distribution War
The Coming Distribution War
 
VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015
 
glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015
 
Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014Up And Running With Web VR Fall 2014
Up And Running With Web VR Fall 2014
 
The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014
 
WebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseWebGL, WebVR and the Metaverse
WebGL, WebVR and the Metaverse
 
And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?
 
WebGL Primetime!
WebGL Primetime!WebGL Primetime!
WebGL Primetime!
 
Virtually Anywhere
Virtually AnywhereVirtually Anywhere
Virtually Anywhere
 
glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013
 
Artists Only
Artists OnlyArtists Only
Artists Only
 

Recently uploaded

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

WebGL, HTML5 and How the Mobile Web Was Won

  • 1. WebGL, HTML5… and how the mobile web was won tony parisi Vizi, inc. march 25, 2014 image: http://www.bitrebels.com
  • 3. … and one platform to rule them all… 3/25/20 14 http://www.tonyparisi.com
  • 4. the web browser as platform fast JavaScript virtual machines hardware-accelerated compositing animation support Workers, WebSockets, local storage, local databases new language initiatives: Dart, Typescript, asm.js mobile-inspired features: location, touch, device orientation… mobile platforms rapidly adopting all HTML5 features in browsers and embedded WebView controls - near-ubiquity 3/25/20 14 http://www.tonyparisi.com
  • 5. breakthrough applications 3/25/20 14 http://www.tonyparisi.comhttp://www.tonyparisi.com ported in 5 days Unreal native C++ engine -> JavaScript Emscripten + asm.js60FPS
  • 6. bringing the power of the GPU to the web WebGL hardware-accelerated 3D rendering CSS 3D hardware-accelerated transforms, transitions, and animations 3/25/20 14 http://www.tonyparisi.com
  • 7. OpenGL ES™ in a browser JavaScript API bindings shipped since early 2011 supported in all modern browsers • desktop Safari, Firefox, Chrome, Opera, Internet Explorer • iOS mobile Safari – iAds only • Android – mobile Chrome, mobile Firefox • Blackberry, Tizen, Firefox OS, Amazon FireOS (Kindle Fire HDX) • Surface (Windows 8.1) • NVIDIA Shield over 1B served http://www.tonyparisi.com 3/25/20 14 the 3D API standard for the web 100,000 Stars Google Experiment http://workshop.chromeexperiments.com/stars/
  • 8. how WebGL works JavaScript API to OpenGL ES (version 2.0) draw to a canvas element using a special context low-level drawing – buffers, primitives, textures and shaders accelerated by graphics hardware (GPU) can draw 2D as well as 3D graphics there is no file format; no markup language; no DOM. http://www.tonyparisi.com 3/25/20 14
  • 9. a simple WebGL program 1. create a <canvas> element 2. obtain a drawing context 3. initialize the viewport 4. create one or more buffers 5. create one or more matrices 6. create one or more shaders 7. initialize the shaders 8. draw one or more primitives http://www.tonyparisi.com 3/25/20 14
  • 10. create the canvas, context and viewport 3/25/20 14 http://www.tonyparisi.com function initWebGL(canvas) { var gl = null; var msg = "Your browser does not support WebGL, " + "or it is not enabled by default."; try { gl = canvas.getContext(“webgl"); } catch (e) { msg = "Error creating WebGL Context!: " + e.toString(); } if (!gl) { alert(msg); throw new Error(msg); } return gl; } function initViewport(gl, canvas) { gl.viewport(0, 0, canvas.width, canvas.height); } detect WebGL set WebGL drawing region
  • 11. buffers and typed arrays var vertexBuffer; vertexBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); var verts = [ // Front face -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, // Back face -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, … ]; gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verts), gl.STATIC_DRAW); WebGL drawing functions use buffers of data new low-level data type stores arrays of floats and ints compactly http://www.tonyparisi.com 3/25/20 14
  • 12. shaders var vertexShaderSource = " attribute vec3 vertexPos;n" + " attribute vec2 texCoord;n" + " uniform mat4 modelViewMatrix;n" + " uniform mat4 projectionMatrix;n" + " varying vec2 vTexCoord;n" + " void main(void) {n" + " // Return the transformed and projected vertex valuen" + " gl_Position = projectionMatrix * modelViewMatrix * n" + " vec4(vertexPos, 1.0);n" + " // Output the texture coordinate in vTexCoordn" + " vTexCoord = texCoord;n" + " }n"; var fragmentShaderSource = " precision mediump float;n" + " varying vec2 vTexCoord;n" + " uniform sampler2D uSampler;n" + " void main(void) {n" + " // Return the pixel color: always output whiten" + " gl_FragColor = texture2D(uSampler, vec2(vTexCoord.s, vTexCoord.t));n" + "}n"; the vertex shader transforms model-space positions into screen space the fragment shader outputs a color value for each pixel http://www.tonyparisi.com 3/25/20 14
  • 13. drawingfunction draw(gl, obj) { // clear the background (with black) gl.clearColor(0.0, 0.0, 0.0, 1.0); gl.enable(gl.DEPTH_TEST); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); // set the shader to use gl.useProgram(shaderProgram); // connect up the shader parameters: vertex position, texture coordinate, // projection/model matrices and texture // set up the buffers gl.bindBuffer(gl.ARRAY_BUFFER, obj.buffer); gl.vertexAttribPointer(shaderVertexPositionAttribute, obj.vertSize, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, obj.texCoordBuffer); gl.vertexAttribPointer(shaderTexCoordAttribute, obj.texCoordSize, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, obj.indices); gl.uniformMatrix4fv(shaderProjectionMatrixUniform, false, projectionMatrix); gl.uniformMatrix4fv(shaderModelViewMatrixUniform, false, modelViewMatrix); gl.activeTexture(gl.TEXTURE0); gl.bindTexture(gl.TEXTURE_2D, webGLTexture); gl.uniform1i(shaderSamplerUniform, 0); // draw the object gl.drawElements(obj.primtype, obj.nIndices, gl.UNSIGNED_SHORT, 0); } clear the canvas set the shader set up buffers for vertices and texture coordinates pass transform and projection matrices to the shader set the texture and pass to the shader draw the object http://www.tonyparisi.com 3/25/20 14
  • 14. engines and frameworks 3/25/20 14 http://www.tonyparisi.com game engines/IDEs Goo Enginehttp://www.gootechnologies.co m/ Verold http://verold.com/ Turbulenz https://turbulenz.com/ PlayCanvas http://www.playcanvas.com/ Artillery Engine https://artillery.com/ Sketchfab https://sketchfab.com/ Unreal https://www.unrealengine.com/ Unity http://unity3d.com/#unity-5 scene graph libraries/page frameworks Three.js http://threejs.org/ SceneJS http://scenejs.org/ BabylonJS http://www.babylonjs.com/ Vizi https://github.com/tparisi/Vizi Voodoo.js http://www.voodoojs.com/ PhiloGL http://www.senchalabs.org/philogl/ tQuery http://jeromeetienne.github.io/tquery/
  • 15. 3/25/20 14 http://www.tonyparisi.com model from 3drt.com glTF: a “JPEG for 3D” full-featured: scene layout, cameras, lights, animations JSON for scene structure; binary buffers for model data intended for WebGL and OpenGL ES mobile applications
  • 16. CSS3 3D transforms translate, rotate, scale page elements with perspective .bk-list li { perspective: 1800px; } .bk-list li .bk-front { transform-style: preserve-3d; transform-origin: 0% 50%; transform: translate3d(0,0,20px); } .bk-list li .bk-book.bk-bookdefault:hover { transform: rotate3d(0,1,0,35deg); } http://tympanus.net/codrops/2013/01/08 /3d-book-showcase/ browser will render element in 3D perspective add origin to translation apply to child elements apply 35 degree rotation about Y axis http://www.tonyparisi.com 3/25/20 14 even 2D graphics are accelerated if 3D transform functions are used e.g. translate3d(10, 20, 0);
  • 17. winning the mobile 3d web HTML5 runs in all mobile browsers, and as embedded WebView components in apps WebGL is supported in most mobile environments • iOS mobile Safari – iAds only • Android – mobile Chrome, mobile Firefox • Blackberry, Tizen, Firefox OS, Amazon FireOS (Kindle Fire HDX) • Surface (Windows 8.1) • NVIDIA Shield CSS 3D transforms are supported in all mobile environments 3/25/20 14 http://www.tonyparisi.com
  • 18. cross-browser HTML5 and WebGL 3/25/20 14 http://www.tonyparisi.com hybrid app development use CocoonJS™ http://ludei.com/ or Impact Ejecta desktop HTML5 and WebGL all browsers support all features, nearly identically mobile WebGL • iOS - mobile Safari – iAds only • Android – mobile Chrome, Firefox • Amazon Silk, Kindle Fire OS • Blackberry, Tizen, Firefox OS • NVIDIA Shield
  • 19. the tipping point 3/25/20 14 http://www.tonyparisi.com Microsoft now fully supports WebGL in IE and Windows mobile. Kindle Fire HDX: at $229, the 7” is probably the best multimedia device deal on the planet… thanks in part to WebGL. Sony built the whole PS4 user interface out of WebGL. 4.2M seats in one whack… and growing. the 2013 NORAD Tracks Santa site saw 48.8% WebGL success across all browsers & platforms for 20M visitors, an increase of 146% over 2012. Opera Devices SDK – WebGL coming soon to a Bang & Olufsen TV near you! pro game middleware (Unreal, Unity) fully on board CSS 3D transforms are supported on all platforms can Apple be far behind… ?
  • 20. on the frontier… WebGL 2! based on GL ES 3 will contain popular WebGL extensions just getting under way – no dates yet image: http://www.bitrebels.com WebCL Heterogeneous parallel computing JavaScript based on OpenCL 1.1 experimental –browser extensions and custom Chromium builds no ship dates announced yet
  • 21. stay in touch… contact information tparisi@gmail.com skype: auradeluxe http://twitter.com/auradeluxe http://w ww.tonyparisi.com/ http://www.learningwebgl.com/ get the books! WebGL: Up and Running http://www.amazon.com/dp/144932357X Programming 3D Applications with HTML and WebGL http://www.amazon.com/Programming-Applications-HTML5- WebGL-Visualization/dp/1449362966 http://www.tonyparisi.com 3/25/20 14 get Vizi https://github.com/tparisi/Vizi SF WebGL Meetup http://www.meetup.com/WebGL-Developers-Meetup/ book source code https://github.com/tparisi/WebGLBook https://github.com/tparisi/Programming3DApplications