mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
add vrcontrols definition
This commit is contained in:
committed by
Toshiya Nakakura
parent
304a251979
commit
17894fdec8
@@ -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();
|
||||
});
|
||||
Reference in New Issue
Block a user