Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cqiang1993
AR.js
提交
c8cf005b
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 搜索 >>
提交
c8cf005b
编写于
10月 16, 2019
作者:
N
Nicolò Carpignoli
提交者:
GitHub
10月 16, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #614 from jeromeetienne/ios13
fix ios13 permissions
上级
5acf4ef7
84a1fbe3
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
1376 addition
and
1344 deletion
+1376
-1344
CHANGELOG.md
CHANGELOG.md
+4
-0
README.md
README.md
+1
-1
aframe/build/aframe-ar.js
aframe/build/aframe-ar.js
+1346
-1332
aframe/build/aframe-ar.min.js
aframe/build/aframe-ar.min.js
+1
-1
aframe/examples/places-name/index.html
aframe/examples/places-name/index.html
+1
-1
aframe/examples/places-name/places.js
aframe/examples/places-name/places.js
+1
-1
aframe/src/location-based/gps-camera.js
aframe/src/location-based/gps-camera.js
+20
-6
package.json
package.json
+1
-1
three.js/src/threex/threex-artoolkitcontext.js
three.js/src/threex/threex-artoolkitcontext.js
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
c8cf005b
# 2.0.2
-
Fixed motion and orientation sensors permission for iOS 13+ devices
# 2.0.1
-
Fixed location-based files build
...
...
README.md
浏览文件 @
c8cf005b
...
...
@@ -123,7 +123,7 @@ You can also use GeoAR.js **without** the script, adding `gps-entity-place` enti
<!doctype HTML>
<html>
<script
src=
"https://aframe.io/releases/0.9.2/aframe.min.js"
></script>
<script
src=
"https://raw.githack.com/jeromeetienne/AR.js/2.0.
1
/aframe/build/aframe-ar.js"
></script>
<script
src=
"https://raw.githack.com/jeromeetienne/AR.js/2.0.
2
/aframe/build/aframe-ar.js"
></script>
<body
style=
'margin : 0px; overflow: hidden;'
>
<a-scene
embedded
arjs
>
<a-marker
preset=
"hiro"
>
...
...
aframe/build/aframe-ar.js
浏览文件 @
c8cf005b
此差异已折叠。
点击以展开。
aframe/build/aframe-ar.min.js
浏览文件 @
c8cf005b
此差异已折叠。
点击以展开。
aframe/examples/places-name/index.html
浏览文件 @
c8cf005b
...
...
@@ -5,7 +5,7 @@
<meta
http-equiv=
'X-UA-Compatible'
content=
'IE=edge'
>
<title>
GeoAR.js demo
</title>
<script
src=
'https://aframe.io/releases/0.9.2/aframe.min.js'
></script>
<script
src=
'
https://raw.githack.com/jeromeetienne/AR.js/master/aframe/build/aframe-ar.min
.js'
></script>
<script
src=
'
../../build/aframe-ar
.js'
></script>
<script>
THREEx
.
ArToolkitContext
.
baseURL
=
'
https://raw.githack.com/jeromeetienne/ar.js/master/three.js/
'
</script>
...
...
aframe/examples/places-name/places.js
浏览文件 @
c8cf005b
...
...
@@ -24,7 +24,7 @@ function loadPlaceFromAPIs(position) {
const
params
=
{
radius
:
300
,
// search places not farther than this value (in meters)
clientId
:
'
HZIJGI4COHQ4AI45QXKCDFJWFJ1SFHYDFCCWKPIJDWHLVQVZ
'
,
clientSecret
:
''
,
clientSecret
:
'
2VBFT2H3OWI03RY5TDIMANCX4ATUTRYSXWZJHUVYGRWEZQ24
'
,
version
:
'
20300101
'
,
// foursquare versioning, required but unuseful for this demo
};
...
...
aframe/src/location-based/gps-camera.js
浏览文件 @
c8cf005b
...
...
@@ -31,13 +31,27 @@ AFRAME.registerComponent('gps-camera', {
var
eventName
=
this
.
_getDeviceOrientationEventName
();
this
.
_onDeviceOrientation
=
this
.
_onDeviceOrientation
.
bind
(
this
);
// From iOS 12.2 Safari has Motion & Orientation turned off by default.
// This may change from iOS 13.*
// if Safari
if
(
!!
navigator
.
userAgent
.
match
(
/Version
\/[\d
.
]
+.*Safari/
))
{
var
timeout
=
setTimeout
(
function
()
{
alert
(
'
Please enable device orientation in Settings > Safari > Motion & Orientation Access.
'
)},
750
);
window
.
addEventListener
(
eventName
,
function
()
{
clearTimeout
(
timeout
);
});
// iOS 13+
if
(
typeof
DeviceOrientationEvent
.
requestPermission
===
'
function
'
)
{
var
handler
=
function
()
{
console
.
log
(
'
Requesting device orientation permissions...
'
)
DeviceOrientationEvent
.
requestPermission
();
document
.
removeEventListener
(
'
touchend
'
,
handler
);
};
document
.
addEventListener
(
'
touchend
'
,
function
()
{
handler
()
},
false
);
alert
(
'
After camera permission prompt, please tap the screen to active geolocation.
'
);
}
else
{
var
timeout
=
setTimeout
(
function
()
{
alert
(
'
Please enable device orientation in Settings > Safari > Motion & Orientation Access.
'
)
},
750
);
window
.
addEventListener
(
eventName
,
function
()
{
clearTimeout
(
timeout
);
});
}
}
window
.
addEventListener
(
eventName
,
this
.
_onDeviceOrientation
,
false
);
...
...
package.json
浏览文件 @
c8cf005b
{
"name"
:
"ar.js"
,
"version"
:
"2.0.
1
"
,
"version"
:
"2.0.
2
"
,
"description"
:
"Efficient Augmented Reality for the Web"
,
"main"
:
""
,
"scripts"
:
{
...
...
three.js/src/threex/threex-artoolkitcontext.js
浏览文件 @
c8cf005b
...
...
@@ -76,7 +76,7 @@ Object.assign( ARjs.Context.prototype, THREE.EventDispatcher.prototype );
// ARjs.Context.baseURL = '../'
// default to github page
ARjs
.
Context
.
baseURL
=
'
https://jeromeetienne.github.io/AR.js/three.js/
'
ARjs
.
Context
.
REVISION
=
'
2.0.
1
'
;
ARjs
.
Context
.
REVISION
=
'
2.0.
2
'
;
/**
* Create a default camera for this trackingBackend
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录