Jump With WebVR
JumpVR is a module for Three.js to sense jumping thanks to Device Acceleration for Virtual Reality application (i.e: (WC3))
I tested it with just CardBoard.
<script src="js/JumpVR.js"></script>Attach it to html after Three.js
Using Example
var jump = new THREE.JumpVR(function(e){
//e.result if user jump it will return true
//e.state.count count of jumping
//e.state.max global max acceleration
//e.state.min global min acceleration
//e.event is devicemotion event
if (e.result){
console.log(e);
}
});Options
THREE.JumpVR(Event,Options);{max: 3, min: -3/*g*/, TimeOut: 500/* ms */, minTime: 10/* ms */ }THREE.JumpVR(function(e){},{max: 3, min: -3/*g*/, TimeOut: 500/* ms */, minTime: 10/* ms */ });#TO DO
- add demo
- 'll try to make more stabile
Contact
you can ask any question Ahmet AK [email protected]Warning: if you are not at the World, it cannot work :)
GIBIR