@0x4d/locationar 中文文档教程

发布于 5年前 浏览 25 项目主页 更新于 3年前

LOCATIONAR

基于简单位置的论证现实库,基于 WebRTC地理定位DeviceOrientationAmbientLightSensor

Online Samples:

  1. Use Chrome
  2. goto the Compass example and see if it's working [camera is working, north in the right direction]
  3. goto the Location example and you should see a red cube 10 m in the direction of North
  4. If you don't see the cube or want to change the position click "InfoPanel" and then you can press the button GetPosition to set the position of the cube to your current position and offset it with the +10N, +10W,… buttons Here you can also see the raw sensor data

Problems/Limentations

  • missing compass accurcy[can't find exact numbers, but up to +/- 10° on good devices, on some devices completely unuseable]
  • camera fov[different phones have different fov's and if the difference between the camera fov and the set fov is to big, the mapping for non-centered, far away objects will be distorted]
  • gps accurcy[can be a problem if the object is nearer than 20 meters]
  • to use the light ambient light sensor, you need to set the chrome flag #enable-generic-sensor-extra-classes to enabled

Documentation and Examples

Browser compability

✔️Chrome ❌三星互联网[缩放不起作用] ❌Firefox【无绝对罗盘】 ❌UC[来源无效] ❌歌剧 ❔Safari[无法在苹果设备上测试]

Usage

lib 很小,只有 20KB

LOCATIONAR 作为 npm 模块提供:

npm i @0x4d/locationar

您也可以下载此存储库并导入 dist/LOCATIONAR.js 文件

Development and Contribution

请参阅 开发指南。 如果您有兴趣做出贡献,在我们的 GitHub 问题页面 上查看未解决问题列表可能是一个很好的起点.

Acknowledgements

  • three.js awesome 3d rendering library
  • THREEAR marker based AR libary, with was used as a template for this project

LOCATIONAR

Simple Location based Argumented Reality library, based on the WebRTC, Geolocation, DeviceOrientation and AmbientLightSensor

Online Samples:

  1. Use Chrome
  2. goto the Compass example and see if it's working [camera is working, north in the right direction]
  3. goto the Location example and you should see a red cube 10 m in the direction of North
  4. If you don't see the cube or want to change the position click "InfoPanel" and then you can press the button GetPosition to set the position of the cube to your current position and offset it with the +10N, +10W,… buttons Here you can also see the raw sensor data

Problems/Limentations

  • missing compass accurcy[can't find exact numbers, but up to +/- 10° on good devices, on some devices completely unuseable]
  • camera fov[different phones have different fov's and if the difference between the camera fov and the set fov is to big, the mapping for non-centered, far away objects will be distorted]
  • gps accurcy[can be a problem if the object is nearer than 20 meters]
  • to use the light ambient light sensor, you need to set the chrome flag #enable-generic-sensor-extra-classes to enabled

Documentation and Examples

Browser compability

✔️Chrome ❌Samsung Internet[Scaling doesn't work] ❌Firefox [no absolute compass] ❌UC[Source doesn't work] ❌Opera ❔Safari[can't test on apple devices]

Usage

The lib is small, only 20KB

LOCATIONAR is provided as an npm module:

npm i @0x4d/locationar

You can also download this repository and import the dist/LOCATIONAR.js file

Development and Contribution

Please see the development guide. If you are interested in contributing, it may be a good starting point to see the list of open issues on our GitHub issues page.

Acknowledgements

  • three.js awesome 3d rendering library
  • THREEAR marker based AR libary, with was used as a template for this project
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文