Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
EmberConf 2017 Ember VR
Search
Kelly Selden
March 29, 2017
430
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
EmberConf 2017 Ember VR
Kelly Selden
March 29, 2017
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Become a Pro
speakerdeck
PRO
31
6k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
340
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
800
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.4k
Design in an AI World
tapps
1
260
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
490
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
930
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
Ethics towards AI in product and experience design
skipperchong
2
330
Art, The Web, and Tiny UX
lynnandtonic
304
22k
First, design no harm
axbom
PRO
2
1.2k
Transcript
Ember + VR: Bring Your A-Frame Kelly Selden @kellyselden
<a-scene> <a-sphere position="0 1.25 -1" radius="1.25" color="#EF2D5E"> </a-sphere> <a-box position="-1
0.5 1" rotation="0 45 0" width="1" height="1" depth="1" color="#4CC3D9"> </a-box> <a-cylinder position="1 0.75 1" radius="0.5" height="1.5" color="#FFC65D"> </a-cylinder> <a-plane rotation="-90 0 0" width="4" height="4" color="#7BC8A4"> </a-plane> <a-sky color="#ECECEC"></a-sky> <a-entity position="0 0 3.8"> <a-camera></a-camera> </a-entity> </a-scene> A-Frame
None
<a-scene> <a-sphere position="0 1.25 -1" radius="1.25" color="#EF2D5E"> </a-sphere> <a-box position="-1
0.5 1" rotation="0 45 0" width="1" height="1" depth="1" color="#4CC3D9"> </a-box> <a-cylinder position="1 0.75 1" radius="0.5" height="1.5" color="#FFC65D"> </a-cylinder> <a-plane rotation="-90 0 0" width="4" height="4" color="#7BC8A4"> </a-plane> <a-sky color="#ECECEC"></a-sky> <a-entity position="0 0 3.8"> <a-camera></a-camera> </a-entity> </a-scene> A-Frame + Ember
A-Frame + Ember + Components {{a-scene}} {{a-sphere position="0 1.25 -1"
radius="1.25" color=“#EF2D5E”}} {{a-box position="-1 0.5 1" rotation="0 45 0" width="1" height="1" depth="1" color="#4CC3D9"}} {{a-cylinder position="1 0.75 1" radius="0.5" height="1.5" color="#FFC65D"}} {{a-plane rotation="-90 0 0" width="4" height="4" color="#7BC8A4"}} {{a-sky color="#ECECEC"}} {{#a-entity position="0 0 3.8"}} {{a-camera}} {{/a-entity}} {{/a-scene}}
Routing
None
Components import ASky from 'ember-a-frame/components/a-sky'; import stringifyComponent from 'ember-a-frame/macros/stringify-component'; import
raw from 'ember-macro-helpers/raw'; import { task, timeout } from 'ember-concurrency'; export default ASky.extend({ animation: stringifyComponent('animation', { property: raw('material.color'), startEvents: raw('set-image-fade'), dir: raw('alternate'), dur: 'dur', from: raw('#FFF'), to: raw('#000') }), changeMaterialTask: task(function * (src) { yield timeout(this.get('dur')); this.sendAction('changeMaterial', src); }), actions: { startChangingMaterial(src) { this.element.emit('run-animation'); this.get('changeMaterialTask').perform(src); } } });
Components import ASky from 'ember-a-frame/components/a-sky'; import stringifyComponent from 'ember-a-frame/macros/stringify-component'; import
raw from 'ember-macro-helpers/raw'; import { task, timeout } from 'ember-concurrency'; export default ASky.extend({ animation: stringifyComponent('animation', { property: raw('material.color'), startEvents: raw('set-image-fade'), dir: raw('alternate'), dur: 'dur', from: raw('#FFF'), to: raw('#000') }), changeMaterialTask: task(function * (src) { yield timeout(this.get('dur')); this.sendAction('changeMaterial', src); }), actions: { startChangingMaterial(src) { this.element.emit('run-animation'); this.get('changeMaterialTask').perform(src); } } });
Components import ASky from 'ember-a-frame/components/a-sky'; import stringifyComponent from 'ember-a-frame/macros/stringify-component'; import
raw from 'ember-macro-helpers/raw'; import { task, timeout } from 'ember-concurrency'; export default ASky.extend({ animation: stringifyComponent('animation', { property: raw('material.color'), startEvents: raw('set-image-fade'), dir: raw('alternate'), dur: 'dur', from: raw('#FFF'), to: raw('#000') }), changeMaterialTask: task(function * (src) { yield timeout(this.get('dur')); this.sendAction('changeMaterial', src); }), actions: { startChangingMaterial(src) { this.element.emit('run-animation'); this.get('changeMaterialTask').perform(src); } } });
Components import ASky from 'ember-a-frame/components/a-sky'; import stringifyComponent from 'ember-a-frame/macros/stringify-component'; import
raw from 'ember-macro-helpers/raw'; import { task, timeout } from 'ember-concurrency'; export default ASky.extend({ animation: stringifyComponent('animation', { property: raw('material.color'), startEvents: raw('set-image-fade'), dir: raw('alternate'), dur: 'dur', from: raw('#FFF'), to: raw('#000') }), changeMaterialTask: task(function * (src) { yield timeout(this.get('dur')); this.sendAction('changeMaterial', src); }), actions: { startChangingMaterial(src) { this.element.emit('run-animation'); this.get('changeMaterialTask').perform(src); } } });
Components import ASky from 'ember-a-frame/components/a-sky'; import stringifyComponent from 'ember-a-frame/macros/stringify-component'; import
raw from 'ember-macro-helpers/raw'; import { task, timeout } from 'ember-concurrency'; export default ASky.extend({ animation: stringifyComponent('animation', { property: raw('material.color'), startEvents: raw('set-image-fade'), dir: raw('alternate'), dur: 'dur', from: raw('#FFF'), to: raw('#000') }), changeMaterialTask: task(function * (src) { yield timeout(this.get('dur')); this.sendAction('changeMaterial', src); }), actions: { startChangingMaterial(src) { this.element.emit('run-animation'); this.get('changeMaterialTask').perform(src); } } });
Templates
None
Macros and Helpers
ember-concurrency • Updating query params • Sending location data •
Scheduling something to run
Social Browsing
Side Note: API Synchronization •Last resort is to maintain a
copied API •Initializers register components? •Solution: Broccoli!
Thank you! github.com/kellyselden/ember-a-frame To mingle with your neighbors in VR:
kellyselden.github.io/ember-a-frame or bit.ly/2nYBYtR