Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cqiang1993
AR.js
提交
380c2338
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,发现更多精彩内容 >>
提交
380c2338
编写于
8月 10, 2017
作者:
J
Jerome Etienne
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixing orientation
上级
8944821a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
12 deletion
+29
-12
babylon.js/README.md
babylon.js/README.md
+2
-0
babylon.js/TODO.md
babylon.js/TODO.md
+7
-0
babylon.js/examples/manual.html
babylon.js/examples/manual.html
+20
-12
未找到文件。
babylon.js/README.md
浏览文件 @
380c2338
Example of AR.js on babylon.js
# ARBJS
Proof of Concept connecting Augmented Reality to Babylon.js for first time with AR.js
...
...
babylon.js/TODO.md
0 → 100644
浏览文件 @
380c2338
# Remaining issue
-
babylon.js object shacky
-
perspective camera to set
-
resize to handle
babylon.js/examples/manual.html
浏览文件 @
380c2338
...
...
@@ -19,6 +19,7 @@ window.addEventListener('DOMContentLoaded', function(){
canvasElement
.
style
.
width
=
'
100%
'
canvasElement
.
style
.
height
=
'
100%
'
canvasElement
.
style
.
position
=
'
absolute
'
canvasElement
.
style
.
zIndex
=
-
1
document
.
body
.
appendChild
(
canvasElement
)
var
engine
=
new
BABYLON
.
Engine
(
canvasElement
,
true
);
...
...
@@ -58,6 +59,7 @@ window.addEventListener('DOMContentLoaded', function(){
material
.
diffuseTexture
=
new
BABYLON
.
Texture
(
"
images/UV_Grid_Sm.jpg
"
,
scene
);
var
mesh
=
BABYLON
.
Mesh
.
CreateSphere
(
"
mesh
"
,
12
,
1
,
scene
);
// mesh.position.y = 60;
mesh
.
material
=
material
;
mesh
.
position
=
new
BABYLON
.
Vector3
(
0
,
0
,
0
)
...
...
@@ -94,16 +96,25 @@ window.addEventListener('DOMContentLoaded', function(){
material
.
twoSidedLighting
=
true
material
.
diffuseTexture
=
new
BABYLON
.
Texture
(
"
images/UV_Grid_Sm.jpg
"
,
scene
);
material
.
specularColor
=
new
BABYLON
.
Color3
(
1
,
1
,
1
);
// material.backFaceCulling = true;
var
mesh
=
BABYLON
.
Mesh
.
CreatePlane
(
"
mesh
"
,
2
,
scene
);
// var mesh = BABYLON.Mesh.CreatePlane("mesh", 2, scene);
var
mesh
=
BABYLON
.
MeshBuilder
.
CreatePlane
(
"
plane1
"
,
{
size
:
2
,
sideOrientation
:
BABYLON
.
Mesh
.
DOUBLESIDE
},
scene
);
mesh
.
material
=
material
;
mesh
.
position
=
new
BABYLON
.
Vector3
(
0
,
0
,
0
)
mesh
.
rotation
.
y
=
Math
.
PI
}
/*********************************CREATE-SCENE******************************/
var
createScene
=
function
(){
scene
=
new
BABYLON
.
Scene
(
engine
);
scene
.
useRightHandedSystem
=
true
createLights
();
createCamera
();
...
...
@@ -138,19 +149,16 @@ window.addEventListener('DOMContentLoaded', function(){
var
cameraBabylon
=
arcRotateCamera
;
// cameraBabylon.setPosition(new BABYLON.Vector3(0, 0, -4));
// cameraBabylon.setPosition(new BABYLON.Vector3(-threejsPosition.x, 0, -4));
cameraBabylon
.
setPosition
(
new
BABYLON
.
Vector3
(
-
threejsPosition
.
x
,
-
threejsPosition
.
y
,
-
threejsPosition
.
z
));
cameraBabylon
.
position
.
x
=
-
threejsPosition
.
x
cameraBabylon
.
position
.
x
=
threejsPosition
.
x
cameraBabylon
.
position
.
y
=
threejsPosition
.
y
cameraBabylon
.
position
.
z
=
-
threejsPosition
.
z
// , -threejsPosition.y, -threejsPosition.z));
// cameraBabylon.setTarget(BABYLON.Vector3.Zero());
cameraBabylon
.
position
.
z
=
threejsPosition
.
z
cameraBabylon
.
setTarget
(
new
BABYLON
.
Vector3
(
threejsTarget
.
x
,
0
,
0
))
;
threejsTarget
.
x
,
threejsTarget
.
y
,
threejsTarget
.
z
))
// cameraBabylon.target.x = -threejsTarget.x
// cameraBabylon.target.y = 0
// cameraBabylon.target.z = 0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录