SlideShare a Scribd company logo
Create an Interactive
3D WebGL Scene
Create an Interactive
3D WebGL Scene
… in half an hour!
No Rocket Science!

http://www.flickr.com/photos/kevlar/5152987233
No Rocket Science!
No Danger!

http://www.flickr.com/photos/kevlar/5152987233
Step 0:
Getting a Model
Step 0: Getting a Model

Where from?

Model Repositories
Step 0: Getting a Model

Where from?

Model Repositories
http://www.turbosquid.com/
http://tf3dm.com/
…
Step 0: Getting a Model

Where from?

Convert Game Assets
Step 0: Getting a Model

Format

#1: Lightwave (.obj + .mtl)
Step 0: Getting a Model

Format

#2: COLLADA (.dae)
Step 0: Getting a Model

Format

#2: COLLADA (.dae)

http://sketchup.google.com/3dwarehouse/
Step 0: Getting a Model

Considerations

Size/Complexity
License
Step 0: Getting a Model

Tools

Blender
Step 0: Getting a Model

Tools

Meshlab
Step 1:
Loading into WebGL
Step 1: Loading into WebGL

WebGL Wrappers/Libraries
Step 1: Loading into WebGL

WebGL Wrappers/Libraries
three.js
Babylon.js
GLGE
Step 1: Loading into WebGL

WebGL Wrappers/Libraries
three.js
Babylon.js
GLGE
Step 1: Loading into WebGL

WebGL Wrappers/Libraries

All available on GitHub
Step 2:
User Input
Step 2: User Input

Wrappers/Libraries

three.js controls
Step 2: User Input

Wrappers/Libraries

decoupled-input
Step 2: User Input

Wrappers/Libraries

decoupled-input

https://github.com/jensarps/decoupled-input
Step 3:
Adding some Spice
Step 3: Adding some Spice

Visuals
ClearColor
Fog
Lights
Step 3: Adding some Spice

Technical
Window resize
Pausing
Step 4:
HTML5 Goodness
Step 4: HTML5 Goodness

New APIs
Step 4: HTML5 Goodness

New APIs

Fullscreen
Step 4: HTML5 Goodness

New APIs

PointerLock
Step 4: HTML5 Goodness

New APIs

GamePad
Step 4: HTML5 Goodness

And More:

WebAudio
PageVisibility
SpeechRecognition
…
Step 4: HTML5 Goodness

Tools:

https://github.com/toji/game-shim
Step 5:
Collision Detection
Step 5: Collision Detection

Many Concepts
Step 5: Collision Detection

Many Concepts

Heightmap
Step 5: Collision Detection

Many Concepts

Raycasting
Step 6:
The Aftermath
Step 6: The Aftermath

A Well-Performing Render Loop
Step 6: The Aftermath

A Well-Performing Render Loop

1)
Do everything inside of the loop.
Step 6: The Aftermath

A Well-Performing Render Loop

2)
Be kind to your memory.
Step 6: The Aftermath

A Well-Performing Render Loop

3)
Optimize hot functions.
Step 6: The Aftermath

Read about
Entity-Component Architecture
Step 7:
Further
Step 7: Further

Get Inspired!
Step 7: Further

Get Inspired!

Read WebGL around the Net
http://learningwebgl.com/blog/
Step 7: Further

Get Inspired!
Follow three.js on G+

https://plus.google.com/u/0/104300307601542851567/posts

Check out featured projects
http://threejs.org/
Step 7: Further

Play Around!
Step 7: Further

Play Around!

Check out Jerome Etienne‘s three.x
http://jeromeetienne.github.io/threex/
Step 7: Further

Play Around!

Go shoot at balls:
http://jensarps.github.io/shooting-at-balls/
thanks!
blog: jensarps.de
code: github.com/jensarps
social: google.com/+JensArps
the rest: google.com/search?q=Jens+Arps

More Related Content

PDF
The Art of Angular in 2016 - Devoxx UK 2016
PDF
The Art of Angular in 2016 - Devoxx France 2016
PPTX
How To Pass A Ruby Code Test
PDF
5 best practices for (web/ software) development (2010)
PPTX
Pain Driven Development by Alexandr Sugak
PDF
jQueryTO: State of jQuery March 2013
PDF
WebGL demos showcase
PDF
Creating Applications with WebGL and Three.js
The Art of Angular in 2016 - Devoxx UK 2016
The Art of Angular in 2016 - Devoxx France 2016
How To Pass A Ruby Code Test
5 best practices for (web/ software) development (2010)
Pain Driven Development by Alexandr Sugak
jQueryTO: State of jQuery March 2013
WebGL demos showcase
Creating Applications with WebGL and Three.js

Similar to A WebGL scene in 30 mins (20)

PDF
Power of WebGL (FSTO 2014)
PDF
Leaving Flatland: Getting Started with WebGL- SXSW 2012
PPTX
WebGL - It's GO Time
PDF
Web3D - Semantic standards, WebGL, HCI
PDF
WebGL 3D player
PDF
Introduction to WebGL - 1st WebGL meetup Amsterdam
PDF
How to start WebGL easily?
PPTX
Developing Web Graphics with WebGL
PPT
Web GL - Presentation
PDF
Augmented reality in web rtc browser
PPTX
WebGL For Game Development Spring 2013
PDF
KEY
WebGL Awesomeness
PPTX
WebGL Crash Course
PPTX
Amsterdam HTML5 Game Developement Meetup - ThreeDee Media presentation
ODP
Introduction to threejs
PPTX
HTML5DevConf 2013 (October): WebGL is a game changer!
KEY
Leaving Flatland: getting started with WebGL
PPTX
WebGL For Game Development 2012
PDF
The Power of WebGL - Hackeando sua GPU com JavaScript
Power of WebGL (FSTO 2014)
Leaving Flatland: Getting Started with WebGL- SXSW 2012
WebGL - It's GO Time
Web3D - Semantic standards, WebGL, HCI
WebGL 3D player
Introduction to WebGL - 1st WebGL meetup Amsterdam
How to start WebGL easily?
Developing Web Graphics with WebGL
Web GL - Presentation
Augmented reality in web rtc browser
WebGL For Game Development Spring 2013
WebGL Awesomeness
WebGL Crash Course
Amsterdam HTML5 Game Developement Meetup - ThreeDee Media presentation
Introduction to threejs
HTML5DevConf 2013 (October): WebGL is a game changer!
Leaving Flatland: getting started with WebGL
WebGL For Game Development 2012
The Power of WebGL - Hackeando sua GPU com JavaScript
Ad

Recently uploaded (20)

PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
1. Introduction to Computer Programming.pptx
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
August Patch Tuesday
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
TLE Review Electricity (Electricity).pptx
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PPTX
Modernising the Digital Integration Hub
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
Group 1 Presentation -Planning and Decision Making .pptx
1. Introduction to Computer Programming.pptx
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
Web App vs Mobile App What Should You Build First.pdf
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
August Patch Tuesday
WOOl fibre morphology and structure.pdf for textiles
OMC Textile Division Presentation 2021.pptx
A novel scalable deep ensemble learning framework for big data classification...
TLE Review Electricity (Electricity).pptx
Module 1.ppt Iot fundamentals and Architecture
NewMind AI Weekly Chronicles – August ’25 Week III
Modernising the Digital Integration Hub
Programs and apps: productivity, graphics, security and other tools
Enhancing emotion recognition model for a student engagement use case through...
Chapter 5: Probability Theory and Statistics
Univ-Connecticut-ChatGPT-Presentaion.pdf
Ad

A WebGL scene in 30 mins