Andrzej Mazur • @end3r • Enclave Games
Mozilla Developer Roadshow with Gamedev.js, Warsaw, Poland, May 23rd 2017
Browser APIs that enable WebGL rendering to headsets and access to VR sensors.
Editor's Draft
more info: mozvr.com, webvr.info.
<a-scene>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>A-Frame demo - cube</title>
<script src="aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-cube color="#0095DD" position="0 1 0" rotation="20 40 0"></a-cube>
</a-scene>
</body>
</html>
<a-camera>
, <a-light>
, <a-cylinder>
, <a-entity>
...
<a-entity
geometry="primitive: torus; radiusTubular: 0.1; segmentsTubular: 12;"
material="color: #EAEFF2; roughness: 0.1; metalness: 0.5;"
rotation="10 0 0"
position="-3 1 0">
</a-entity>
var scene = document.querySelector('a-scene');
var cylinder = document.createElement('a-cylinder');
cylinder.setAttribute('color', '#FF9500');
cylinder.setAttribute('height', '2');
cylinder.setAttribute('radius', '0.75');
cylinder.setAttribute('position', '3 1 0');
scene.appendChild(cylinder);
<a-cube color="#0095DD" rotation="20 40 0" position="0 1 0">
<a-animation
attribute="rotation"
from="20 0 0"
to="20 360 0"
direction="alternate"
dur="4000"
repeat="indefinite"
easing="ease">
</a-animation>
</a-cube>
var t = 0;
function render() {
t += 0.01;
requestAnimationFrame(render);
cylinder.setAttribute('position', '3 '+(Math.sin(t*2)+1)+' 0');
}
render();
Ctrl + Alt + i
Keyboard and mouse, Leap Motion, Gamepad API, Device Orientation...
Framerate, camera, horizon... nose?
Give reasons to look around.
You have to be "inside".
Find out how millions of people will use it.
end3r.com/slides/gamedevjs-aframe