Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
01d5d934
T
three.js
项目概览
Ablesons
/
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,发现更多精彩内容 >>
提交
01d5d934
编写于
12月 16, 2016
作者:
S
Steven Wittens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Use if instead of shortcircuiting operator
- Undo changes to duck
上级
376df0a6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
54 deletion
+24
-54
examples/js/loaders/GLTFLoader.js
examples/js/loaders/GLTFLoader.js
+12
-6
examples/models/gltf/duck/glTF-MaterialsCommon/duck.gltf
examples/models/gltf/duck/glTF-MaterialsCommon/duck.gltf
+6
-24
examples/models/gltf/duck/glTF/duck.gltf
examples/models/gltf/duck/glTF/duck.gltf
+6
-24
未找到文件。
examples/js/loaders/GLTFLoader.js
浏览文件 @
01d5d934
...
@@ -1153,7 +1153,8 @@ THREE.GLTFLoader = ( function () {
...
@@ -1153,7 +1153,8 @@ THREE.GLTFLoader = ( function () {
var
group
=
new
THREE
.
Object3D
();
var
group
=
new
THREE
.
Object3D
();
group
.
name
=
mesh
.
name
;
group
.
name
=
mesh
.
name
;
group
.
userData
=
mesh
.
extras
||
{};
if
(
mesh
.
extras
)
group
.
userData
=
mesh
.
extras
;
var
primitives
=
mesh
.
primitives
;
var
primitives
=
mesh
.
primitives
;
...
@@ -1226,7 +1227,8 @@ THREE.GLTFLoader = ( function () {
...
@@ -1226,7 +1227,8 @@ THREE.GLTFLoader = ( function () {
var
meshNode
=
new
THREE
.
Mesh
(
geometry
,
material
);
var
meshNode
=
new
THREE
.
Mesh
(
geometry
,
material
);
meshNode
.
castShadow
=
true
;
meshNode
.
castShadow
=
true
;
meshNode
.
userData
=
primitive
.
extras
||
{};
if
(
primitive
.
extras
)
meshNode
.
userData
=
primitive
.
extras
;
group
.
add
(
meshNode
);
group
.
add
(
meshNode
);
...
@@ -1268,7 +1270,8 @@ THREE.GLTFLoader = ( function () {
...
@@ -1268,7 +1270,8 @@ THREE.GLTFLoader = ( function () {
var
_camera
=
new
THREE
.
PerspectiveCamera
(
THREE
.
Math
.
radToDeg
(
xfov
),
aspect_ratio
,
camera
.
perspective
.
znear
||
1
,
camera
.
perspective
.
zfar
||
2
e6
);
var
_camera
=
new
THREE
.
PerspectiveCamera
(
THREE
.
Math
.
radToDeg
(
xfov
),
aspect_ratio
,
camera
.
perspective
.
znear
||
1
,
camera
.
perspective
.
zfar
||
2
e6
);
_camera
.
name
=
camera
.
name
;
_camera
.
name
=
camera
.
name
;
_camera
.
userData
=
camera
.
extras
||
{};
if
(
camera
.
extras
)
_camera
.
userData
=
camera
.
extras
;
return
_camera
;
return
_camera
;
...
@@ -1276,7 +1279,8 @@ THREE.GLTFLoader = ( function () {
...
@@ -1276,7 +1279,8 @@ THREE.GLTFLoader = ( function () {
var
_camera
=
new
THREE
.
OrthographicCamera
(
window
.
innerWidth
/
-
2
,
window
.
innerWidth
/
2
,
window
.
innerHeight
/
2
,
window
.
innerHeight
/
-
2
,
camera
.
orthographic
.
znear
,
camera
.
orthographic
.
zfar
);
var
_camera
=
new
THREE
.
OrthographicCamera
(
window
.
innerWidth
/
-
2
,
window
.
innerWidth
/
2
,
window
.
innerHeight
/
2
,
window
.
innerHeight
/
-
2
,
camera
.
orthographic
.
znear
,
camera
.
orthographic
.
zfar
);
_camera
.
name
=
camera
.
name
;
_camera
.
name
=
camera
.
name
;
_camera
.
userData
=
camera
.
extras
||
{};
if
(
camera
.
extras
)
_camera
.
userData
=
camera
.
extras
;
return
_camera
;
return
_camera
;
...
@@ -1393,7 +1397,8 @@ THREE.GLTFLoader = ( function () {
...
@@ -1393,7 +1397,8 @@ THREE.GLTFLoader = ( function () {
}
}
_node
.
name
=
node
.
name
;
_node
.
name
=
node
.
name
;
_node
.
userData
=
node
.
extras
||
{};
if
(
node
.
extras
)
_node
.
userData
=
node
.
extras
;
_node
.
matrixAutoUpdate
=
false
;
_node
.
matrixAutoUpdate
=
false
;
...
@@ -1674,7 +1679,8 @@ THREE.GLTFLoader = ( function () {
...
@@ -1674,7 +1679,8 @@ THREE.GLTFLoader = ( function () {
var
_scene
=
new
THREE
.
Scene
();
var
_scene
=
new
THREE
.
Scene
();
_scene
.
name
=
scene
.
name
;
_scene
.
name
=
scene
.
name
;
_scene
.
userData
=
scene
.
extras
||
{};
if
(
scene
.
extras
)
_scene
.
userData
=
scene
.
extras
;
var
nodes
=
scene
.
nodes
;
var
nodes
=
scene
.
nodes
;
...
...
examples/models/gltf/duck/glTF-MaterialsCommon/duck.gltf
浏览文件 @
01d5d934
...
@@ -177,15 +177,9 @@
...
@@ -177,15 +177,9 @@
},
},
"indices": "accessor_21",
"indices": "accessor_21",
"material": "blinn3-fx",
"material": "blinn3-fx",
"mode": 4,
"mode": 4
"extras": {
"foo": "primitive"
}
}
}
],
]
"extras": {
"foo": "mesh"
}
}
}
},
},
"nodes": {
"nodes": {
...
@@ -212,10 +206,7 @@
...
@@ -212,10 +206,7 @@
"meshes": [
"meshes": [
"LOD3spShape-lib"
"LOD3spShape-lib"
],
],
"name": "LOD3sp",
"name": "LOD3sp"
"extras": {
"foo": "node"
}
},
},
"camera1": {
"camera1": {
"camera": "cameraShape1",
"camera": "cameraShape1",
...
@@ -238,10 +229,7 @@
...
@@ -238,10 +229,7 @@
-4.31078,
-4.31078,
1
1
],
],
"name": "camera1",
"name": "camera1"
"extras": {
"foo": "camera"
}
},
},
"directionalLight1": {
"directionalLight1": {
"children": [],
"children": [],
...
@@ -268,10 +256,7 @@
...
@@ -268,10 +256,7 @@
-2.92179,
-2.92179,
1
1
],
],
"name": "directionalLight1",
"name": "directionalLight1"
"extras": {
"foo": "light"
}
}
}
},
},
"samplers": {
"samplers": {
...
@@ -289,10 +274,7 @@
...
@@ -289,10 +274,7 @@
"LOD3sp",
"LOD3sp",
"camera1",
"camera1",
"directionalLight1"
"directionalLight1"
],
]
"extras": {
"foo": "scene"
}
}
}
},
},
"skins": {},
"skins": {},
...
...
examples/models/gltf/duck/glTF/duck.gltf
浏览文件 @
01d5d934
...
@@ -150,15 +150,9 @@
...
@@ -150,15 +150,9 @@
},
},
"indices": "accessor_21",
"indices": "accessor_21",
"material": "blinn3-fx",
"material": "blinn3-fx",
"mode": 4,
"mode": 4
"extras": {
"foo": "primitive"
}
}
}
],
]
"extras": {
"foo": "mesh"
}
}
}
},
},
"nodes": {
"nodes": {
...
@@ -185,10 +179,7 @@
...
@@ -185,10 +179,7 @@
"meshes": [
"meshes": [
"LOD3spShape-lib"
"LOD3spShape-lib"
],
],
"name": "LOD3sp",
"name": "LOD3sp"
"extras": {
"foo": "node"
}
},
},
"camera1": {
"camera1": {
"camera": "cameraShape1",
"camera": "cameraShape1",
...
@@ -211,10 +202,7 @@
...
@@ -211,10 +202,7 @@
-4.31078,
-4.31078,
1
1
],
],
"name": "camera1",
"name": "camera1"
"extras": {
"foo": "camera"
}
},
},
"directionalLight1": {
"directionalLight1": {
"children": [],
"children": [],
...
@@ -236,10 +224,7 @@
...
@@ -236,10 +224,7 @@
-2.92179,
-2.92179,
1
1
],
],
"name": "directionalLight1",
"name": "directionalLight1"
"extras": {
"foo": "light"
}
}
}
},
},
"programs": {
"programs": {
...
@@ -268,10 +253,7 @@
...
@@ -268,10 +253,7 @@
"LOD3sp",
"LOD3sp",
"camera1",
"camera1",
"directionalLight1"
"directionalLight1"
],
]
"extras": {
"foo": "scene"
}
}
}
},
},
"shaders": {
"shaders": {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录