VR Prototypes Aframe + Glitch What is aframe? Web VR framework - - PowerPoint PPT Presentation

vr prototypes
SMART_READER_LITE
LIVE PREVIEW

VR Prototypes Aframe + Glitch What is aframe? Web VR framework - - PowerPoint PPT Presentation

VR Prototypes Aframe + Glitch What is aframe? Web VR framework Built on top of HTML <head> <script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script> </head> Uses three.js Works with


slide-1
SLIDE 1

VR Prototypes

Aframe + Glitch

slide-2
SLIDE 2

What is aframe?

  • Web VR framework
  • Built on top of HTML

<head> <script src="https://aframe.io/releases/0.5.0/aframe.min.js"></script> </head>

  • Uses three.js
  • Works with Vive,Daydream, GearVR, and Cardboard and

Desktop

slide-3
SLIDE 3

Entity + Components

  • Entities - the base of all objects in the scene. Without components, entities do

not render anything, similar to empty <div>s.

  • Components - reusable modules attached to entities to provide appearance,

behavior, functionality.

  • Use components to build things
  • Box = Position + Geometry + Material
  • Find community components at: https://aframe.io/aframe-registry/
slide-4
SLIDE 4

Scene

<a-scene> </a-scene>

slide-5
SLIDE 5

Entity

<a-scene> <a-entity> </a-entity> <a-scene>

slide-6
SLIDE 6

Components

<a-scene> <a-entity geometry="primitive:sphere" material= "color:skyblue"> </a-entity> <a-entity geometry="primitive:sphere" material="color:red" position="0 0 -4"></a-entity> </a-scene>

slide-7
SLIDE 7

What is Glitch

  • Host a web app online for free
  • View live demos
  • Collaborate with others
  • Host assets
slide-8
SLIDE 8

Glitch

Code we will be starting with today:

https://glitch.com/edit/#!/madlab

Here is a demo of what we’re hoping to get!

https://madlab.glitch.me/

slide-9
SLIDE 9

Glitch

Other cool projects to remix: ○

Aframe Aincraft: https://glitch.com/~aframe-aincraft

360 Image Gallery: https://glitch.com/~aframe-gallery

… and more in the A-Frame docs

slide-10
SLIDE 10

Events

  • Events are a way to send out a signal that other code can

pick up and respond to.

  • Entities can emit events others listen to
  • Entities can also listen for certain events and respond to

those events

  • Events contain information about what happened
slide-11
SLIDE 11

Emit an Event

  • To emit events use: element.emit(eventName, eventDetails)
  • entityEl.emit('physicscollided', {collidingEntity: anotherEntityEl});
slide-12
SLIDE 12

Where to find 3D models

  • Sketchfab

  • Eg. https://sketchfab.com/models/5be6368dcdaa4f8c8b580d6692ffb333
  • Clara.io
  • Archive3D
  • Sketchup’s 3D Warehouse
  • Or create your own using Blender or MagicaVoxel
slide-13
SLIDE 13

Useful sources

There is so much more to A-Frame. To learn more visit the A-Frame docs: https://aframe.io/docs/0.5.0/introduction/ Also check out the A-Frame registry for more components: https://aframe.io/aframe-registry/