SlideShare a Scribd company logo
A-Frame
aframe.io
Daosheng Mu
@mozilla
2016/05/28
https://goo.gl/de2YG1
Outline
• WebVR
• A-Frame
Mozilla VR team -
“Our goal is to help
bring high
performance virtual
reality to the open
web.”
Recap: WebVR
Recap: WebVR
Recap: WebVR
var leftEyeParams = vrHMD.getEyeParameters(‘left’);
var rightEyeParams = vrHMD.getEyeParameters(‘right’);
// In meters
var leftEyeTranslation = leftEyeParams.eyeTranslation;
var rightEyeTranslation = rightEyeParams.eyeTranslation;
var leftEyeFOV = leftEyeParams.recommendedFieldOfView;
var rightEyeFOV = rightEyeParams.recommendedFieldOfView;
Recap: WebVR
function onRequestAnimationFrame() {
if ( vrPosSensor ) {
var state = vrPosSensor.getState();
if ( state.hasOrientation ) {
camera.quaternion.set(
state.orientation.x, state.orientation.y,
state.orientation.z, state.orientation.w);
}
}
render( camera );
}
Recap: WebVR
function render( camera ) {
// Left eye
setViewport( leftEyeParams );
setProjMatrix( leftEyeFOV );
setViewMatrix( camera.matrixWorld, leftEyeTranslation );
drawScene();
// Right eye
setViewport( rightEyeParams );
setProjMatrix( rightEyeFOV );
setViewMatrix( camera.matrixWorld, rightEyeTranslation );
drawScene();
}
SUCCESS STORIES
A-Frame
Building blocks for the
virtual reality web
A-Frame
Demo
• VR Shopping
• 360 Video
• Panorama
A-Frame
• Building blocks for the virtual reality web
• Use markup to create VR experiences that work across desktop,
iPhones, and the Oculus Rift. Android support coming soon.
• Virtual Reality: Drop in the library and have a WebVR scene
within a few lines of markup.
• Based on the DOM: Manipulate with JavaScript, use with your
favorite libraries and frameworks.
• Entity-Component System: Use the entity-component system
for better composability and flexibility.
Items
• Components
• Entity
• Scene
• Utils
aframe
three.js webvr-polyfill
<body>
<a-scene stats="true">
<a-entity geometry="primitive: box;"
material="color: #d00">
</a-entity>
</a-scene>
</body>
Scene
<body>
<a-scene stats="true">
<a-entity geometry="primitive: box;"
material="color: #d00">
</a-entity>
</a-scene>
</body>
Scene
Entity
<body>
<a-scene stats="true">
<a-entity geometry="primitive: box;"
material="color: #d00">
</a-entity>
</a-scene>
</body>
Scene
Entity
Component
Entity system in A-Frame
Entities are HTML elements (i.e., <a-entity>).
Components are HTML attributes that are set on
the entity.
<a-entity geometry="primitive: cube; depth: 1;
height: 1; width: 1"
material="color: pink”></a-entity>
<a-entity geometry="primitive: cube; depth: 1;
height: 1; width: 1"
material="color: pink”>
</a-entity>
<a-entity geometry="primitive: cube; depth: 1;
height: 1; width: 1"
material="color: pink” light="intensity: 2">
</a-entity>
<a-entity geometry="primitive: cube; depth: 1;
height: 1; width: 1"
material="color: pink”
light="intensity: 2” position="-1 5 0”
sound="src: dangerzone.mp3; volume: 2">
</a-entity>
Entity
<a-entity>
• Entities are general purpose objects (e.g., to
create a player, monster, sky, or cube).
• They inherently have a position, rotation, and
scale in the scene.
Properties
- components
- sceneEl
Methods
- emit
- get/setAttribute
- getComputedAttribute
- removeAttribute
Events
- componentChanged
- loaded
Component
• Components are reusable and modular chunks
of data that modify an aspect of an entity,
changing its appearance, behavior, or
functionality.
Defining Component Data
<a-entity geometry="primitive: box; width: 5"></a-entity>
var entity = document.querySelector('a-entity');
entity.setAttribute('material', 'color: red');
entity.setAttribute('geometry', {primitive: 'box'});
entity.setAttribute('geometry', 'width', 5);
OR
Scene
• Set up what to render, where to render, and is where all of the entities live.
• Initialization
• Creating a canvas
• Instantiating a renderer
• Attaching event and full screen listeners
• Setting up default lighting and camera
• Injecting <meta> tags and button to Enter VR
• Registering keyboard shortcuts
• Render Loop
• requestAnimationFrame
<a-scene>
AScene
three.js
Animation
<a-animation>
<a-entity geometry="primitive: box;" material="color: pink" position="0 0 0"
rotation="0 0 0">
<a-animation attribute="rotation" to="0 360 0" dur="3000" fill="forwards"
repeat="indefinite">
</a-animation>
</a-entity>
Primitives
Primitives are concise, semantic building blocks
that wrap A-Frame’s underlying entity-component
system.
<a-entity geometry="primitive: box; width: 3" material="color: red">
</a-entity>
<a-cube width="3" color="red"></a-cube>
Mixin
<a-mixin>
• Mixins provide a way to compose and reuse
commonly-used sets of component properties.
<a-assets>
<a-mixin id="red" material="color: red"></a-mixin>
<a-mixin id="blue" material="color: blue"></a-mixin>
<a-mixin id="cube" geometry="primitive: box"></a-mixin>
</a-assets>
<a-scene>
<a-entity mixin="red cube"></a-entity>
<a-entity mixin="blue cube"></a-entity>
</a-scene>
Conclusion
• A-Frame provides developers a rapid way to
make WebVR content
• A-Frame makes “Write once, Run everywhere” to
be real
Platform Support
Oculus Firef
ox
Android Fire
fox
iOS Safari FxOS
HMD WebVR WebVR webvr-polyfill WebVR
Position WebVR X X X
Orientation WebVR WebVR
webvr-polyfill:
devicemotion
WebVR: but
quiet slow
Fullscreen WebVR
X distortion
correction
filter*
X distortion
correction
filter*
X distortion
correction
filter*
*https://github.com/aframevr/aframe/issues/1295
Thanks for your attention

More Related Content

What's hot

Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR
Saurabh Badhwar
 
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
GeilDanke
 
Web vr creative_vr
Web vr creative_vrWeb vr creative_vr
Web vr creative_vr
Oscar Marin Miro
 
WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016
Carsten Sandtner
 
WebVR - JAX 2016
WebVR -  JAX 2016WebVR -  JAX 2016
WebVR - JAX 2016
Carsten Sandtner
 
Getting Started in VR with JS
Getting Started in VR with JSGetting Started in VR with JS
Getting Started in VR with JS
Rudy Jahchan
 
AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.
Dragos Mihai Rusu
 
Introduction to Backbone.js & Marionette.js
Introduction to Backbone.js & Marionette.jsIntroduction to Backbone.js & Marionette.js
Introduction to Backbone.js & Marionette.js
Return on Intelligence
 
Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]
Andrii Lundiak
 
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
Sébastien Levert
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
Michaela Lehr
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity
Ryan Anklam
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
Amazon Web Services
 
Jozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLON
Jozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLONJozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLON
Jozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLON
Outlyer
 
Back to the [Completable] Future
Back to the [Completable] FutureBack to the [Completable] Future
Back to the [Completable] Future
Sofiia Khomyn
 
Journey to the Cloud
Journey to the CloudJourney to the Cloud
Journey to the Cloud
Nadeem Ahmad
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
Patrick Kettner
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
ColdFusionConference
 
AtlasCamp 2015: Web technologies you should be using now
AtlasCamp 2015: Web technologies you should be using nowAtlasCamp 2015: Web technologies you should be using now
AtlasCamp 2015: Web technologies you should be using now
Atlassian
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
okyawa
 

What's hot (20)

Getting Started with Web VR
Getting Started with Web VR Getting Started with Web VR
Getting Started with Web VR
 
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
 
Web vr creative_vr
Web vr creative_vrWeb vr creative_vr
Web vr creative_vr
 
WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016WebVR - MobileTechCon Berlin 2016
WebVR - MobileTechCon Berlin 2016
 
WebVR - JAX 2016
WebVR -  JAX 2016WebVR -  JAX 2016
WebVR - JAX 2016
 
Getting Started in VR with JS
Getting Started in VR with JSGetting Started in VR with JS
Getting Started in VR with JS
 
AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.AngularJS - Overcoming performance issues. Limits.
AngularJS - Overcoming performance issues. Limits.
 
Introduction to Backbone.js & Marionette.js
Introduction to Backbone.js & Marionette.jsIntroduction to Backbone.js & Marionette.js
Introduction to Backbone.js & Marionette.js
 
Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]Backbone/Marionette recap [2015]
Backbone/Marionette recap [2015]
 
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
 
Jozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLON
Jozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLONJozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLON
Jozef Ve Providing Scalability for Pirates, Lizards and Zombies at #DOXLON
 
Back to the [Completable] Future
Back to the [Completable] FutureBack to the [Completable] Future
Back to the [Completable] Future
 
Journey to the Cloud
Journey to the CloudJourney to the Cloud
Journey to the Cloud
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
 
AtlasCamp 2015: Web technologies you should be using now
AtlasCamp 2015: Web technologies you should be using nowAtlasCamp 2015: Web technologies you should be using now
AtlasCamp 2015: Web technologies you should be using now
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
 

Viewers also liked

Entity System
Entity SystemEntity System
Entity SystemElvisQin
 
Case (iidf) team 1 (eng)
Case (iidf)   team 1 (eng)Case (iidf)   team 1 (eng)
Case (iidf) team 1 (eng)
EVA
 
19. 초록별마을_2015 에너지자립마을 성과발표자료
19. 초록별마을_2015 에너지자립마을 성과발표자료19. 초록별마을_2015 에너지자립마을 성과발표자료
19. 초록별마을_2015 에너지자립마을 성과발표자료
Seoul Energy Self-sufficient Villages
 
Introduction to VR Development
Introduction to VR DevelopmentIntroduction to VR Development
Introduction to VR Development
Jonathan Van Beneden
 
사업계획서 알음알음 포스코기술투자
사업계획서 알음알음 포스코기술투자사업계획서 알음알음 포스코기술투자
사업계획서 알음알음 포스코기술투자
Sangmo Kang
 
노비 게임 발표자료
노비 게임 발표자료노비 게임 발표자료
노비 게임 발표자료
은우 사
 
Begi cube zombie vr
Begi cube zombie vrBegi cube zombie vr
Begi cube zombie vr
Kiwon Seo
 
성준영 소프트콘 발표
성준영 소프트콘 발표성준영 소프트콘 발표
성준영 소프트콘 발표
Junyoung Sung
 
[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정
[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정
[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정
강 민우
 
[2D5]무인항공기드론이자동으로움직이는비밀
[2D5]무인항공기드론이자동으로움직이는비밀[2D5]무인항공기드론이자동으로움직이는비밀
[2D5]무인항공기드론이자동으로움직이는비밀
NAVER D2
 
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
MinPa Lee
 
하코사세미나_캔버스 파이그래프 만들기
하코사세미나_캔버스 파이그래프 만들기하코사세미나_캔버스 파이그래프 만들기
하코사세미나_캔버스 파이그래프 만들기
정석 양
 
Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발
Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발 Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발
Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발
Daehoon Han
 
퍼블리셔, 프론트엔드개발을 시작하다
퍼블리셔, 프론트엔드개발을 시작하다퍼블리셔, 프론트엔드개발을 시작하다
퍼블리셔, 프론트엔드개발을 시작하다
정석 양
 
NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화
NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화
NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화
Eunseok Yi
 
4조 최종
4조 최종4조 최종
4조 최종
sungmin yoon
 
Hacking & its types
Hacking & its typesHacking & its types
Hacking & its types
Sai Sakoji
 

Viewers also liked (17)

Entity System
Entity SystemEntity System
Entity System
 
Case (iidf) team 1 (eng)
Case (iidf)   team 1 (eng)Case (iidf)   team 1 (eng)
Case (iidf) team 1 (eng)
 
19. 초록별마을_2015 에너지자립마을 성과발표자료
19. 초록별마을_2015 에너지자립마을 성과발표자료19. 초록별마을_2015 에너지자립마을 성과발표자료
19. 초록별마을_2015 에너지자립마을 성과발표자료
 
Introduction to VR Development
Introduction to VR DevelopmentIntroduction to VR Development
Introduction to VR Development
 
사업계획서 알음알음 포스코기술투자
사업계획서 알음알음 포스코기술투자사업계획서 알음알음 포스코기술투자
사업계획서 알음알음 포스코기술투자
 
노비 게임 발표자료
노비 게임 발표자료노비 게임 발표자료
노비 게임 발표자료
 
Begi cube zombie vr
Begi cube zombie vrBegi cube zombie vr
Begi cube zombie vr
 
성준영 소프트콘 발표
성준영 소프트콘 발표성준영 소프트콘 발표
성준영 소프트콘 발표
 
[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정
[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정
[IGC 2016] 허니잼게임즈 이형호 - 소규모 개발사의 게임 완성과 유지 보수 과정
 
[2D5]무인항공기드론이자동으로움직이는비밀
[2D5]무인항공기드론이자동으로움직이는비밀[2D5]무인항공기드론이자동으로움직이는비밀
[2D5]무인항공기드론이자동으로움직이는비밀
 
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
[제86회 Open Technet]OGC 표준 기반의 공간자료 분석과 시각화 기술 개발
 
하코사세미나_캔버스 파이그래프 만들기
하코사세미나_캔버스 파이그래프 만들기하코사세미나_캔버스 파이그래프 만들기
하코사세미나_캔버스 파이그래프 만들기
 
Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발
Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발 Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발
Unite Seoul 2016 - 스매싱 더 배틀의 멀티플랫폼 개발
 
퍼블리셔, 프론트엔드개발을 시작하다
퍼블리셔, 프론트엔드개발을 시작하다퍼블리셔, 프론트엔드개발을 시작하다
퍼블리셔, 프론트엔드개발을 시작하다
 
NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화
NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화
NDC 2016 이은석 - 돌죽을 끓입시다: 창의적 게임개발팀을 위한 왓 스튜디오의 업무 문화
 
4조 최종
4조 최종4조 최종
4조 최종
 
Hacking & its types
Hacking & its typesHacking & its types
Hacking & its types
 

Similar to A frame beginner lesson

React responsively, render responsibly - react meetup
React responsively, render responsibly - react meetupReact responsively, render responsibly - react meetup
React responsively, render responsibly - react meetup
Yoav Niran
 
How to React Native
How to React NativeHow to React Native
How to React Native
Dmitry Ulyanov
 
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the UglyProvisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
christianbourgeois
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
Nick Pruehs
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScriptersgerbille
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
Christian Melchior
 
Secrets of JavaScript Libraries
Secrets of JavaScript LibrariesSecrets of JavaScript Libraries
Secrets of JavaScript Libraries
jeresig
 
Introduction to Struts
Introduction to StrutsIntroduction to Struts
Introduction to Strutselliando dias
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 
Lightning chess
Lightning chessLightning chess
Lightning chess
Lieven Juwet
 
Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016Evan Schultz
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
Jeff Durta
 
WebXR if X = how?
WebXR if X = how?WebXR if X = how?
Asynchronous Interfaces
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
maccman
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
Brian Lonsdorf
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous Deployment
Mike Brittain
 
Visual State Manager
Visual State ManagerVisual State Manager
Visual State Manager
Jeremy Likness
 

Similar to A frame beginner lesson (20)

React responsively, render responsibly - react meetup
React responsively, render responsibly - react meetupReact responsively, render responsibly - react meetup
React responsively, render responsibly - react meetup
 
Bottom Up
Bottom UpBottom Up
Bottom Up
 
How to React Native
How to React NativeHow to React Native
How to React Native
 
Intro to HTML5
Intro to HTML5Intro to HTML5
Intro to HTML5
 
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the UglyProvisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
 
Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScripters
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
Secrets of JavaScript Libraries
Secrets of JavaScript LibrariesSecrets of JavaScript Libraries
Secrets of JavaScript Libraries
 
Introduction to Struts
Introduction to StrutsIntroduction to Struts
Introduction to Struts
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Lightning chess
Lightning chessLightning chess
Lightning chess
 
Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016Evan Schultz - Angular Summit - 2016
Evan Schultz - Angular Summit - 2016
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
WebXR if X = how?
WebXR if X = how?WebXR if X = how?
WebXR if X = how?
 
Asynchronous Interfaces
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous Deployment
 
Visual State Manager
Visual State ManagerVisual State Manager
Visual State Manager
 

Recently uploaded

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 

Recently uploaded (20)

IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

A frame beginner lesson

  • 3. Mozilla VR team - “Our goal is to help bring high performance virtual reality to the open web.”
  • 6. Recap: WebVR var leftEyeParams = vrHMD.getEyeParameters(‘left’); var rightEyeParams = vrHMD.getEyeParameters(‘right’); // In meters var leftEyeTranslation = leftEyeParams.eyeTranslation; var rightEyeTranslation = rightEyeParams.eyeTranslation; var leftEyeFOV = leftEyeParams.recommendedFieldOfView; var rightEyeFOV = rightEyeParams.recommendedFieldOfView;
  • 7. Recap: WebVR function onRequestAnimationFrame() { if ( vrPosSensor ) { var state = vrPosSensor.getState(); if ( state.hasOrientation ) { camera.quaternion.set( state.orientation.x, state.orientation.y, state.orientation.z, state.orientation.w); } } render( camera ); }
  • 8. Recap: WebVR function render( camera ) { // Left eye setViewport( leftEyeParams ); setProjMatrix( leftEyeFOV ); setViewMatrix( camera.matrixWorld, leftEyeTranslation ); drawScene(); // Right eye setViewport( rightEyeParams ); setProjMatrix( rightEyeFOV ); setViewMatrix( camera.matrixWorld, rightEyeTranslation ); drawScene(); }
  • 10. A-Frame Building blocks for the virtual reality web
  • 11. A-Frame Demo • VR Shopping • 360 Video • Panorama
  • 12. A-Frame • Building blocks for the virtual reality web • Use markup to create VR experiences that work across desktop, iPhones, and the Oculus Rift. Android support coming soon. • Virtual Reality: Drop in the library and have a WebVR scene within a few lines of markup. • Based on the DOM: Manipulate with JavaScript, use with your favorite libraries and frameworks. • Entity-Component System: Use the entity-component system for better composability and flexibility.
  • 13. Items • Components • Entity • Scene • Utils aframe three.js webvr-polyfill
  • 14. <body> <a-scene stats="true"> <a-entity geometry="primitive: box;" material="color: #d00"> </a-entity> </a-scene> </body> Scene
  • 15. <body> <a-scene stats="true"> <a-entity geometry="primitive: box;" material="color: #d00"> </a-entity> </a-scene> </body> Scene Entity
  • 16. <body> <a-scene stats="true"> <a-entity geometry="primitive: box;" material="color: #d00"> </a-entity> </a-scene> </body> Scene Entity Component
  • 17. Entity system in A-Frame Entities are HTML elements (i.e., <a-entity>). Components are HTML attributes that are set on the entity. <a-entity geometry="primitive: cube; depth: 1; height: 1; width: 1" material="color: pink”></a-entity>
  • 18. <a-entity geometry="primitive: cube; depth: 1; height: 1; width: 1" material="color: pink”> </a-entity>
  • 19. <a-entity geometry="primitive: cube; depth: 1; height: 1; width: 1" material="color: pink” light="intensity: 2"> </a-entity>
  • 20. <a-entity geometry="primitive: cube; depth: 1; height: 1; width: 1" material="color: pink” light="intensity: 2” position="-1 5 0” sound="src: dangerzone.mp3; volume: 2"> </a-entity>
  • 21.
  • 22. Entity <a-entity> • Entities are general purpose objects (e.g., to create a player, monster, sky, or cube). • They inherently have a position, rotation, and scale in the scene. Properties - components - sceneEl Methods - emit - get/setAttribute - getComputedAttribute - removeAttribute Events - componentChanged - loaded
  • 23. Component • Components are reusable and modular chunks of data that modify an aspect of an entity, changing its appearance, behavior, or functionality.
  • 24. Defining Component Data <a-entity geometry="primitive: box; width: 5"></a-entity> var entity = document.querySelector('a-entity'); entity.setAttribute('material', 'color: red'); entity.setAttribute('geometry', {primitive: 'box'}); entity.setAttribute('geometry', 'width', 5); OR
  • 25. Scene • Set up what to render, where to render, and is where all of the entities live. • Initialization • Creating a canvas • Instantiating a renderer • Attaching event and full screen listeners • Setting up default lighting and camera • Injecting <meta> tags and button to Enter VR • Registering keyboard shortcuts • Render Loop • requestAnimationFrame <a-scene> AScene three.js
  • 26. Animation <a-animation> <a-entity geometry="primitive: box;" material="color: pink" position="0 0 0" rotation="0 0 0"> <a-animation attribute="rotation" to="0 360 0" dur="3000" fill="forwards" repeat="indefinite"> </a-animation> </a-entity>
  • 27. Primitives Primitives are concise, semantic building blocks that wrap A-Frame’s underlying entity-component system. <a-entity geometry="primitive: box; width: 3" material="color: red"> </a-entity> <a-cube width="3" color="red"></a-cube>
  • 28. Mixin <a-mixin> • Mixins provide a way to compose and reuse commonly-used sets of component properties. <a-assets> <a-mixin id="red" material="color: red"></a-mixin> <a-mixin id="blue" material="color: blue"></a-mixin> <a-mixin id="cube" geometry="primitive: box"></a-mixin> </a-assets> <a-scene> <a-entity mixin="red cube"></a-entity> <a-entity mixin="blue cube"></a-entity> </a-scene>
  • 29. Conclusion • A-Frame provides developers a rapid way to make WebVR content • A-Frame makes “Write once, Run everywhere” to be real
  • 30. Platform Support Oculus Firef ox Android Fire fox iOS Safari FxOS HMD WebVR WebVR webvr-polyfill WebVR Position WebVR X X X Orientation WebVR WebVR webvr-polyfill: devicemotion WebVR: but quiet slow Fullscreen WebVR X distortion correction filter* X distortion correction filter* X distortion correction filter* *https://github.com/aframevr/aframe/issues/1295
  • 31. Thanks for your attention

Editor's Notes

  1. VR device is “hot”, but software platform? 2012 Oculus from Kickstarter 2014 Mozilla WebVR 2015 many success stories 2016 commercial VR devices A-Frame is a project from mozVR team. Rapid prototyping. Proving for users to show them making webVR content can be easy.
  2. Mozilla (Vlad), Google (Brandon Jones), M$ in progress…
  3. Stereo render
  4. Developers need to know - WebGL 3D computer graphics can not be reusable.
  5. Developers need to know - WebGL 3D computer graphics can not be reusable.
  6. Developers need to know - WebGL 3D computer graphics can not be reusable.
  7. WebGL developers are much less than web developers Easy to use / Quick to prototype Cross all browsers
  8. very easy to compose entities with mixtures of behavior and functionality and everyone can write their own components to modify entities however they desire.
  9. very easy to compose entities with mixtures of behavior and functionality and everyone can write their own components to modify entities however they desire.
  10. very easy to compose entities with mixtures of behavior and functionality and everyone can write their own components to modify entities however they desire.
  11. To solve a real world problem: In a game, if we define Tree / Solider, Tree has no HP no weapon. How to update their own specific functions at the right place?
  12. An entity can have multiple components, and an entity’s behavior can be changed at runtime by adding, removing, or modifying components.
  13. http://localhost:8000/defineComponent.html
  14. registers callback functions on every frame or tick. —> this.el.sceneEl.addBehavior(this);
  15. http://localhost:8000/animation.html
  16. http://localhost:8000/primitive.html