mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-12 12:10:48 +08:00
add vrcontrols definition
This commit is contained in:
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();
|
||||
});
|
||||
Reference in new issue
Block a user