@0x4d/locationar 中文文档教程
LOCATIONAR
基于简单位置的论证现实库,基于 WebRTC,地理定位,DeviceOrientation 和 AmbientLightSensor
Online Samples:
- Use Chrome
- goto the Compass example and see if it's working [camera is working, north in the right direction]
- goto the Location example and you should see a red cube 10 m in the direction of North
- 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
LOCATIONAR
Simple Location based Argumented Reality library, based on the WebRTC, Geolocation, DeviceOrientation and AmbientLightSensor
Online Samples:
- Use Chrome
- goto the Compass example and see if it's working [camera is working, north in the right direction]
- goto the Location example and you should see a red cube 10 m in the direction of North
- 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.