Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cqiang1993
AR.js
提交
c28e53c1
A
AR.js
项目概览
cqiang1993
/
AR.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
AR.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c28e53c1
编写于
2月 03, 2020
作者:
N
nicolo.carpignoli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: clean
上级
ce463fb2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
5 deletion
+9
-5
.gitignore
.gitignore
+0
-1
aframe/build/aframe-ar.js
aframe/build/aframe-ar.js
+3
-1
aframe/examples/basic.html
aframe/examples/basic.html
+1
-1
aframe/examples/darimuovere/public/index.html
aframe/examples/darimuovere/public/index.html
+1
-1
aframe/examples/marker-events.html
aframe/examples/marker-events.html
+1
-1
aframe/src/location-based/gps-camera.js
aframe/src/location-based/gps-camera.js
+3
-0
未找到文件。
.gitignore
浏览文件 @
c28e53c1
.DS_Store
.atom-live-server.json
node_modules/*
aframe/examples/darimuovere/
aframe/build/aframe-ar.js
浏览文件 @
c28e53c1
...
...
@@ -5770,6 +5770,7 @@ AFRAME.registerComponent('gps-camera', {
longitude: this.currentCoords.longitude,
latitude: this.originCoords.latitude,
};
position.x = this.computeDistanceMeters(this.originCoords, dstCoords);
position.x *= this.currentCoords.longitude > this.originCoords.longitude ? 1 : -1;
...
...
@@ -5778,12 +5779,14 @@ AFRAME.registerComponent('gps-camera', {
longitude: this.originCoords.longitude,
latitude: this.currentCoords.latitude,
}
position.z = this.computeDistanceMeters(this.originCoords, dstCoords);
position.z *= this.currentCoords.latitude > this.originCoords.latitude ? -1 : 1;
// update position
this.el.setAttribute('position', position);
window.dispatchEvent(new CustomEvent('gps-camera-update-position', { detail: { position: this.currentCoords, origin: this.originCoords }}));
},
/**
...
...
@@ -5926,7 +5929,6 @@ AFRAME.registerComponent('gps-entity-place', {
return;
}
// update position.z
var dstCoords = {
longitude: this.data.longitude,
latitude: this.data.latitude,
...
...
aframe/examples/basic.html
浏览文件 @
c28e53c1
...
...
@@ -13,7 +13,7 @@
</div>
<!-- Define your 3d scene and enabled ar.js -->
<a-scene
embedded
arjs=
'trackingMethod: best;'
>
<a-scene
embedded
arjs=
'trackingMethod: best;
sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960;
'
>
<!-- Create a anchor to attach your augmented reality -->
<a-anchor
hit-testing-enabled=
'true'
>
...
...
aframe/examples/darimuovere/public/index.html
浏览文件 @
c28e53c1
...
...
@@ -6,7 +6,7 @@
<meta
http-equiv=
'X-UA-Compatible'
content=
'IE=edge'
>
<title>
Cartigli AR
</title>
<script
src=
'https://aframe.io/releases/0.9.2/aframe.min.js'
></script>
<script
src=
"../../../build/aframe-ar.
min.
js"
></script>
<script
src=
"../../../build/aframe-ar.js"
></script>
<script
src=
"https://unpkg.com/aframe-look-at-component@0.8.0/dist/aframe-look-at-component.min.js"
></script>
<script
type=
"module"
src=
"./index.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"./index.css"
/>
...
...
aframe/examples/marker-events.html
浏览文件 @
c28e53c1
...
...
@@ -36,7 +36,7 @@
<br/>
Contact me any time at
<a
href=
'https://twitter.com/jerome_etienne'
target=
'_blank'
>
@jerome_etienne
</a>
</div>
<a-scene
embedded
arjs=
'sourceType: webcam; detectionMode: mono_and_matrix; matrixCodeType: 3x3;'
>
<a-scene
embedded
arjs=
'sourceType: webcam; detectionMode: mono_and_matrix; matrixCodeType: 3x3;
sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960;
'
>
<!-- handle hiro marker -->
<!-- 'registerevents' will register event listeners for the marker when it is found and lost,
as defined in the inline script above -->
...
...
aframe/src/location-based/gps-camera.js
浏览文件 @
c28e53c1
...
...
@@ -194,6 +194,7 @@ AFRAME.registerComponent('gps-camera', {
longitude
:
this
.
currentCoords
.
longitude
,
latitude
:
this
.
originCoords
.
latitude
,
};
position
.
x
=
this
.
computeDistanceMeters
(
this
.
originCoords
,
dstCoords
);
position
.
x
*=
this
.
currentCoords
.
longitude
>
this
.
originCoords
.
longitude
?
1
:
-
1
;
...
...
@@ -202,12 +203,14 @@ AFRAME.registerComponent('gps-camera', {
longitude
:
this
.
originCoords
.
longitude
,
latitude
:
this
.
currentCoords
.
latitude
,
}
position
.
z
=
this
.
computeDistanceMeters
(
this
.
originCoords
,
dstCoords
);
position
.
z
*=
this
.
currentCoords
.
latitude
>
this
.
originCoords
.
latitude
?
-
1
:
1
;
// update position
this
.
el
.
setAttribute
(
'
position
'
,
position
);
window
.
dispatchEvent
(
new
CustomEvent
(
'
gps-camera-update-position
'
,
{
detail
:
{
position
:
this
.
currentCoords
,
origin
:
this
.
originCoords
}}));
},
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录