SlideShare a Scribd company logo
1 of 51
Download to read offline
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

Similar to A WebGL scene in 30 mins

Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xPatrickHillert
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xinovex GmbH
 
Digital Fabrication Studio 0.3 3D Scanning
Digital Fabrication Studio 0.3 3D ScanningDigital Fabrication Studio 0.3 3D Scanning
Digital Fabrication Studio 0.3 3D ScanningMassimo Menichinelli
 
Digital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystem
Digital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystemDigital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystem
Digital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystemMassimo Menichinelli
 
WebGL Crash Course
WebGL Crash CourseWebGL Crash Course
WebGL Crash CourseTony Parisi
 
Workshop: Introduction to Web Components & Polymer
Workshop: Introduction to Web Components & Polymer Workshop: Introduction to Web Components & Polymer
Workshop: Introduction to Web Components & Polymer John Riviello
 
Threat Modeling: Report from the Trenches
Threat Modeling: Report from the TrenchesThreat Modeling: Report from the Trenches
Threat Modeling: Report from the TrenchesOWASP
 
How to start WebGL easily?
How to start WebGL easily?How to start WebGL easily?
How to start WebGL easily?誠人 堀口
 
2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...
2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...
2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...Bruno Capuano
 
Digital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC MillingDigital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC MillingMassimo Menichinelli
 
Building Rackspace Cloud Monitoring
Building Rackspace Cloud MonitoringBuilding Rackspace Cloud Monitoring
Building Rackspace Cloud Monitoringgdusbabek
 
Microservices, la risposta che (forse) cercavi!
Microservices, la risposta che (forse) cercavi!Microservices, la risposta che (forse) cercavi!
Microservices, la risposta che (forse) cercavi!Commit University
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?Andy Davies
 
Digital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
Digital Fabrication Studio.01 _Fabbing @ Aalto Media FactoryDigital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
Digital Fabrication Studio.01 _Fabbing @ Aalto Media FactoryMassimo Menichinelli
 

Similar to A WebGL scene in 30 mins (20)

Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Web Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.xWeb Components mit Polymer und AngularJS 1.x
Web Components mit Polymer und AngularJS 1.x
 
Digital Fabrication Studio 0.3 3D Scanning
Digital Fabrication Studio 0.3 3D ScanningDigital Fabrication Studio 0.3 3D Scanning
Digital Fabrication Studio 0.3 3D Scanning
 
Digital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystem
Digital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystemDigital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystem
Digital Fabrication Studio v.0.2: Digital Fabrication and FabLab ecosystem
 
WebGL Crash Course
WebGL Crash CourseWebGL Crash Course
WebGL Crash Course
 
WebGL Awesomeness
WebGL AwesomenessWebGL Awesomeness
WebGL Awesomeness
 
Work With What You Have ULearn 2011
Work With What You Have ULearn 2011Work With What You Have ULearn 2011
Work With What You Have ULearn 2011
 
Workshop: Introduction to Web Components & Polymer
Workshop: Introduction to Web Components & Polymer Workshop: Introduction to Web Components & Polymer
Workshop: Introduction to Web Components & Polymer
 
Threat Modeling: Report from the Trenches
Threat Modeling: Report from the TrenchesThreat Modeling: Report from the Trenches
Threat Modeling: Report from the Trenches
 
tutorial
tutorialtutorial
tutorial
 
3d web
3d web3d web
3d web
 
How to start WebGL easily?
How to start WebGL easily?How to start WebGL easily?
How to start WebGL easily?
 
2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...
2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...
2021 02 13 CodeGen Verona - Let’s code a drone to follow faces syncing everyt...
 
FLAR Workflow
FLAR WorkflowFLAR Workflow
FLAR Workflow
 
Digital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC MillingDigital Fabrication Studio 0.3 CNC Milling
Digital Fabrication Studio 0.3 CNC Milling
 
Building Rackspace Cloud Monitoring
Building Rackspace Cloud MonitoringBuilding Rackspace Cloud Monitoring
Building Rackspace Cloud Monitoring
 
Microservices, la risposta che (forse) cercavi!
Microservices, la risposta che (forse) cercavi!Microservices, la risposta che (forse) cercavi!
Microservices, la risposta che (forse) cercavi!
 
ISTE 2016 - Custom 3D for AR
ISTE 2016 - Custom 3D for ARISTE 2016 - Custom 3D for AR
ISTE 2016 - Custom 3D for AR
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
 
Digital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
Digital Fabrication Studio.01 _Fabbing @ Aalto Media FactoryDigital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
Digital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
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
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
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
 

A WebGL scene in 30 mins