add vrcontrols definition

This commit is contained in:
Toshiya Nakakura committed 2015-07-05 13:52:33 +09:00
1 parent 625cd68fed
commit 0dc13ea95b
3 files changed
+39

No files matched your search

@@ -0,0 +1,18 @@
/// <reference path="../../../three.d.ts" />
/// <reference path="../../../three-vrcontrols.d.ts" />
var _vrControls = new THREE.VRControls(new THREE.Camera());
_vrControls.update();
_vrControls.scale = 25;
window.addEventListener("keydown", (ev) => {
if (ev.keyCode == "R".charCodeAt(0)) {
_vrControls.zeroSensor();
}
});
window.addEventListener("touchstart", (ev) => {
_vrControls.zeroSensor();
});