Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
075b95fc
T
three.js
项目概览
车家大少爷
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
075b95fc
编写于
5月 27, 2020
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Examples: Removed webgl_loader_json_claraio.
上级
a62fc7f3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
0 addition
and
122 deletion
+0
-122
docs/api/en/loaders/ObjectLoader.html
docs/api/en/loaders/ObjectLoader.html
+0
-1
docs/api/zh/loaders/ObjectLoader.html
docs/api/zh/loaders/ObjectLoader.html
+0
-1
examples/files.js
examples/files.js
+0
-1
examples/models/json/teapot-claraio.json
examples/models/json/teapot-claraio.json
+0
-1
examples/screenshots/webgl_loader_json_claraio.jpg
examples/screenshots/webgl_loader_json_claraio.jpg
+0
-0
examples/webgl_loader_json_claraio.html
examples/webgl_loader_json_claraio.html
+0
-118
未找到文件。
docs/api/en/loaders/ObjectLoader.html
浏览文件 @
075b95fc
...
...
@@ -55,7 +55,6 @@
<h2>
Examples
</h2>
<p>
[example:webgl_loader_json_claraio WebGL / loader / json / claraio]
<br
/>
[example:webgl_materials_lightmap WebGL / materials / lightmap]
</p>
...
...
docs/api/zh/loaders/ObjectLoader.html
浏览文件 @
075b95fc
...
...
@@ -55,7 +55,6 @@
<h2>
例子
</h2>
<p>
[example:webgl_loader_json_claraio WebGL / loader / json / claraio]
<br
/>
[example:webgl_materials_lightmap WebGL / materials / lightmap]
</p>
...
...
examples/files.js
浏览文件 @
075b95fc
...
...
@@ -93,7 +93,6 @@ var files = {
"
webgl_loader_gltf
"
,
"
webgl_loader_gltf_extensions
"
,
"
webgl_loader_imagebitmap
"
,
"
webgl_loader_json_claraio
"
,
"
webgl_loader_kmz
"
,
"
webgl_loader_ldraw
"
,
"
webgl_loader_lwo
"
,
...
...
examples/models/json/teapot-claraio.json
已删除
100644 → 0
浏览文件 @
a62fc7f3
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
examples/screenshots/webgl_loader_json_claraio.jpg
已删除
100644 → 0
浏览文件 @
a62fc7f3
12.5 KB
examples/webgl_loader_json_claraio.html
已删除
100644 → 0
浏览文件 @
a62fc7f3
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
three.js webgl - loaders - Clara.io JSON loader
</title>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"main.css"
>
</head>
<body>
<div
id=
"info"
>
<a
href=
"https://threejs.org"
target=
"_blank"
rel=
"noopener"
>
three.js
</a>
-
<a
href=
"https://clara.io"
target=
"_blank"
rel=
"noopener"
>
Clara.io
</a>
JSON THREE.Scene/Object Load Test
<br/>
More Information:
<a
href=
"https://clara.io/learn/user-guide/data_exchange/threejs_export"
target=
"_blank"
rel=
"noopener"
>
Clara.io ThreeJS Export Documentation
</a>
</div>
<script
type=
"module"
>
import
*
as
THREE
from
'
../build/three.module.js
'
;
var
container
;
var
camera
,
scene
,
renderer
;
var
mouseX
=
0
,
mouseY
=
0
;
var
windowHalfX
=
window
.
innerWidth
/
2
;
var
windowHalfY
=
window
.
innerHeight
/
2
;
init
();
animate
();
function
init
()
{
container
=
document
.
createElement
(
'
div
'
);
document
.
body
.
appendChild
(
container
);
camera
=
new
THREE
.
PerspectiveCamera
(
45
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
2000
);
camera
.
position
.
z
=
4
;
// scene
scene
=
new
THREE
.
Scene
();
var
ambient
=
new
THREE
.
AmbientLight
(
0x444444
);
scene
.
add
(
ambient
);
var
directionalLight
=
new
THREE
.
DirectionalLight
(
0xffeedd
);
directionalLight
.
position
.
set
(
0
,
0
,
1
).
normalize
();
scene
.
add
(
directionalLight
);
// BEGIN Clara.io JSON loader code
var
objectLoader
=
new
THREE
.
ObjectLoader
();
objectLoader
.
load
(
"
models/json/teapot-claraio.json
"
,
function
(
obj
)
{
obj
.
position
.
y
=
-
0.8
;
scene
.
add
(
obj
);
}
);
// END Clara.io JSON loader code
renderer
=
new
THREE
.
WebGLRenderer
();
renderer
.
setPixelRatio
(
window
.
devicePixelRatio
);
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
container
.
appendChild
(
renderer
.
domElement
);
document
.
addEventListener
(
'
mousemove
'
,
onDocumentMouseMove
,
false
);
//
window
.
addEventListener
(
'
resize
'
,
onWindowResize
,
false
);
}
function
onWindowResize
()
{
windowHalfX
=
window
.
innerWidth
/
2
;
windowHalfY
=
window
.
innerHeight
/
2
;
camera
.
aspect
=
window
.
innerWidth
/
window
.
innerHeight
;
camera
.
updateProjectionMatrix
();
renderer
.
setSize
(
window
.
innerWidth
,
window
.
innerHeight
);
}
function
onDocumentMouseMove
(
event
)
{
mouseX
=
(
event
.
clientX
-
windowHalfX
)
/
2
;
mouseY
=
(
event
.
clientY
-
windowHalfY
)
/
2
;
}
//
function
animate
()
{
requestAnimationFrame
(
animate
);
render
();
}
function
render
()
{
camera
.
position
.
x
+=
(
mouseX
-
camera
.
position
.
x
)
*
.
05
;
camera
.
position
.
y
+=
(
-
mouseY
-
camera
.
position
.
y
)
*
.
05
;
camera
.
lookAt
(
scene
.
position
);
renderer
.
render
(
scene
,
camera
);
}
</script>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录