Andrzej Mazur — @end3r — Enclave Games
Meet.js Warsaw — Warsaw, Poland — September 30th 2015
end3r.com, enclavegames.com, js13kgames.com, gamedevjs.com, gamedevjsweekly.com, devicelab.pl
View Master (1939)
Project Headsight (1961)
Tron (1982), Star Trek (1987), Matrix (1999)
Sega Genesis (1991)
Virtua Racing (1993)
Norvegian Army (2014)
Oculus Rift
Playstation VR (Project Morpheus)
Gear VR, HTC Vive, Google Cardboard
Firefox Nightly, Chromium
Editors Draft: mozvr.github.io/webvr-spec/webvr.html
Web: mozvr.com, webvr.info.
Install vs online, multiplatform, distribution through URLs
Keyboard and mouse, Leap Motion, Gamepad API, Device Orientation, ...
HMDVRDevice and PositionSensorVRDevice
HMDVRDevice: getEyeParameters(), setFieldOfView().
PositionSensorVRDevice: getState(), resetSensor().
navigator.getVRDevices().then(function(devices) {
for (var i = 0; i < devices.length; ++i) {
if (devices[i] instanceof HMDVRDevice) {
gHMD = devices[i];
break;
}
}
if (gHMD) {
for (var i = 0; i < devices.length; ++i) {
if (devices[i] instanceof PositionSensorVRDevice
&& devices[i].hardwareUnitId === gHMD.hardwareUnitId) {
gPositionSensor = devices[i];
break;
}
}
}
});
VREffect ⁄ VRControls
var effect = new THREE.VREffect(renderer);
var manager = new WebVRManager(renderer, effect);
hacks.mozilla.org/2015/09/stereoscopic-rendering-in-webvr/
function init () {
// using gl-matrix for linear algebra
var viewMatrix = mat4.lookAt(mat4.create(), eye, center, up);
var projectionMatrix = mat4.perspective(mat4.create(), fov, near, far);
var mvpMatrix = mat4.multiply(mat4.create(), projectionMatrix, viewMatrix);
gl.uniformMatrix4fv(uniforms.uMVPMatrixLocation, false, mvpMatrix);
};
function update (t) {
gl.clear(flags);
gl.drawElements(mode, count, type, offset);
requestAnimationFrame(update);
};
3D websites, CSS for VR
Kickstart your project.
Write once, run in any VR headset... or without it.
github.com/borismus/webvr-boilerplate
A starting point for web-based VR experiences.
Both export to WebGL using asm.js.
Consumer devices: Q1 2016.
There's already an API for that!
Stable specification
Totally new UX and UI
Better hardware
More tools and libraries
Motion sickness may be a problem
(keep high framerate, no camera movement, keep horizon level)
New 360 view
(give reasons to look around)
Immersion over gameplay and⁄or graphics
(you have to be "inside")
end3r.com/slides/meetjswarsaw-webvr