GithubHelp home page GithubHelp logo

cesiumleap's Introduction

cesiumLeap

use leap motion to control cesium

依赖库版本:

cesium -- 1.36

leap motion -- 0.6.4

leap motion 坐标系:

指示符号示意图:

1. 东南西北方向偏移,沿XZ平面的手势移动

2. 高度改变,在leap motion 坐标系原点上的Y轴高低移动

3. 航偏角改变,在XZ平面上的左右挥动

4. 俯仰角改变,手指方向的弯曲表示

使用

  1. 引入CesiumLeap文件、cesium文件和leap文件
    <script src="../ThirdParty/Cesium/Cesium.js"></script>
    <script src="../ThirdParty/leap/leap-0.6.4.js"></script>
    <script src="../lib/CesiumLeap.js"></script>
  1. 引入css文件
  <link rel="stylesheet" type="text/css" href="../lib/css/cesiumLeap.css">
  1. 初始化CesiumLeap
    var viewer = new Cesium.Viewer('cesiumContainer');  
    
    var cesiumLeap = new CesiumLeap({
      scene : viewer.scene,
      ellipsoid : viewer.scene.mapProjection.ellipsoid
    });
  1. 默认是启用的状态的,可以进行停止和启用
    cesiumLeap.stop();
    cesiumLeap.start();

使用注意事项

  • 只可以使用一只手
  • 先攥住拳头进入到leap motion控制器的上方,之后再伸出手掌,进行手势的使用
  • 准备停止手势时,请握拳即可停止

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.