Thanks to visit codestin.com
Credit goes to github.com

Skip to content

akahmet/JumpVR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JumpVR

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. Google CardBoard

Demo

  1. Jump Count Example -> Jump Count Demo
  2. Jump And Run Example -> Jump And Run Demo

Getting Started

<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

  1. add demo
  2. '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 :)

My Mechatronic Blog

GIBIR

About

Jumping On WebVR & Three.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors