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

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

A WebGL scene in 30 mins