Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
55c72506
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,体验更适合开发者的 AI 搜索 >>
提交
55c72506
编写于
2月 08, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated examples that relied on SpotLight's exponent.
上级
987d0065
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
26 addition
and
21 deletion
+26
-21
examples/js/loaders/ColladaLoader.js
examples/js/loaders/ColladaLoader.js
+1
-2
examples/js/loaders/deprecated/SceneLoader.js
examples/js/loaders/deprecated/SceneLoader.js
+1
-1
examples/webgl_loader_ctm.html
examples/webgl_loader_ctm.html
+8
-7
examples/webgl_loader_gltf.html
examples/webgl_loader_gltf.html
+10
-7
examples/webgl_materials_cubemap_dynamic.html
examples/webgl_materials_cubemap_dynamic.html
+1
-1
examples/webgl_shading_physical.html
examples/webgl_shading_physical.html
+1
-1
examples/webgl_shadowmap.html
examples/webgl_shadowmap.html
+1
-1
examples/webgl_shadowmap_performance.html
examples/webgl_shadowmap_performance.html
+1
-1
examples/webgl_shadowmap_viewer.html
examples/webgl_shadowmap_viewer.html
+2
-0
未找到文件。
examples/js/loaders/ColladaLoader.js
浏览文件 @
55c72506
...
...
@@ -1258,7 +1258,6 @@ THREE.ColladaLoader = function () {
var
intensity
=
lparams
.
intensity
;
var
distance
=
lparams
.
distance
;
var
angle
=
lparams
.
falloff_angle
;
var
exponent
;
// Intentionally undefined, don't know what this is yet
switch
(
lparams
.
technique
)
{
...
...
@@ -1275,7 +1274,7 @@ THREE.ColladaLoader = function () {
case
'
spot
'
:
light
=
new
THREE
.
SpotLight
(
color
,
intensity
,
distance
,
angle
,
exponent
);
light
=
new
THREE
.
SpotLight
(
color
,
intensity
,
distance
,
angle
);
light
.
position
.
set
(
0
,
0
,
1
);
break
;
...
...
examples/js/loaders/deprecated/SceneLoader.js
浏览文件 @
55c72506
...
...
@@ -345,7 +345,7 @@ THREE.SceneLoader.prototype = {
break
;
case
'
SpotLight
'
:
light
=
new
THREE
.
SpotLight
(
color
,
intensity
,
distance
,
1
);
light
=
new
THREE
.
SpotLight
(
color
,
intensity
,
distance
);
light
.
angle
=
objJSON
.
angle
;
light
.
position
.
fromArray
(
position
);
light
.
target
.
set
(
position
[
0
],
position
[
1
]
-
distance
,
position
[
2
]
);
...
...
examples/webgl_loader_ctm.html
浏览文件 @
55c72506
...
...
@@ -99,17 +99,18 @@
// LIGHTS
var
ambient
=
new
THREE
.
AmbientLight
(
0x0
80808
);
//
scene.add( ambient );
var
ambient
=
new
THREE
.
AmbientLight
(
0x0
40404
);
scene
.
add
(
ambient
);
var
light
=
new
THREE
.
SpotLight
(
0xffeedd
,
1.2
,
650
,
Math
.
PI
/
2
,
3
);
var
light
=
new
THREE
.
SpotLight
(
0xffeedd
,
1.2
,
650
,
Math
.
PI
/
6
);
light
.
position
.
set
(
0
,
-
100
,
500
);
light
.
castShadow
=
true
;
light
.
shadowMapWidth
=
2048
;
light
.
shadowMapHeight
=
2048
;
light
.
shadowCameraFov
=
45
;
//light.shadowCameraVisible = true;
light
.
shadow
.
mapWidth
=
1024
;
light
.
shadow
.
mapHeight
=
1024
;
light
.
shadow
.
camera
.
fov
=
45
;
light
.
shadow
.
camera
.
far
=
650
;
// scene.add( new THREE.CameraHelper( light.shadow.camera ) );
scene
.
add
(
light
);
...
...
examples/webgl_loader_gltf.html
浏览文件 @
55c72506
...
...
@@ -165,20 +165,23 @@
directionalLight
.
position
.
set
(
0
,
-
1
,
1
).
normalize
();
scene
.
add
(
directionalLight
);
spot1
=
new
THREE
.
SpotLight
(
0xffffff
,
1
);
spot1
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
4
,
0.75
);
spot1
.
position
.
set
(
-
100
,
200
,
100
);
spot1
.
target
.
position
.
set
(
0
,
0
,
0
);
if
(
sceneInfo
.
shadows
)
{
spot1
.
shadowCameraNear
=
1
;
spot1
.
shadowCameraFar
=
1024
;
spot1
.
castShadow
=
true
;
spot1
.
shadowBias
=
0.0001
;
spot1
.
shadowMapWidth
=
2048
;
spot1
.
shadowMapHeight
=
2048
;
spot1
.
shadowCameraNear
=
1
;
spot1
.
shadowCameraFar
=
1024
;
spot1
.
castShadow
=
true
;
spot1
.
shadowBias
=
0.0001
;
spot1
.
shadowMapWidth
=
2048
;
spot1
.
shadowMapHeight
=
2048
;
}
scene
.
add
(
spot1
);
}
// RENDERER
...
...
examples/webgl_materials_cubemap_dynamic.html
浏览文件 @
55c72506
...
...
@@ -164,7 +164,7 @@
ambientLight
=
new
THREE
.
AmbientLight
(
0x555555
);
scene
.
add
(
ambientLight
);
spotLight
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
2
,
1
);
spotLight
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
2
);
spotLight
.
position
.
set
(
0
,
1800
,
1500
);
spotLight
.
target
.
position
.
set
(
0
,
0
,
0
);
spotLight
.
castShadow
=
true
;
...
...
examples/webgl_shading_physical.html
浏览文件 @
55c72506
...
...
@@ -267,7 +267,7 @@
pointLight
.
position
.
set
(
0
,
0
,
0
);
scene
.
add
(
pointLight
);
sunLight
=
new
THREE
.
SpotLight
(
0xffffff
,
sunIntensity
,
0
,
Math
.
PI
/
2
,
1
);
sunLight
=
new
THREE
.
SpotLight
(
0xffffff
,
sunIntensity
,
0
,
Math
.
PI
/
2
);
sunLight
.
position
.
set
(
1000
,
2000
,
1000
);
sunLight
.
castShadow
=
true
;
...
...
examples/webgl_shadowmap.html
浏览文件 @
55c72506
...
...
@@ -105,7 +105,7 @@
var
ambient
=
new
THREE
.
AmbientLight
(
0x444444
);
scene
.
add
(
ambient
);
light
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
2
,
1
);
light
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
2
);
light
.
position
.
set
(
0
,
1500
,
1000
);
light
.
target
.
position
.
set
(
0
,
0
,
0
);
...
...
examples/webgl_shadowmap_performance.html
浏览文件 @
55c72506
...
...
@@ -100,7 +100,7 @@
var
ambient
=
new
THREE
.
AmbientLight
(
0x444444
);
scene
.
add
(
ambient
);
light
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
2
,
1
);
light
=
new
THREE
.
SpotLight
(
0xffffff
,
1
,
0
,
Math
.
PI
/
2
);
light
.
position
.
set
(
0
,
1500
,
1000
);
light
.
target
.
position
.
set
(
0
,
0
,
0
);
...
...
examples/webgl_shadowmap_viewer.html
浏览文件 @
55c72506
...
...
@@ -72,6 +72,8 @@
spotLight
=
new
THREE
.
SpotLight
(
0xffffff
);
spotLight
.
name
=
'
Spot Light
'
;
spotLight
.
angle
=
Math
.
PI
/
5
;
spotLight
.
penumbra
=
0.3
;
spotLight
.
position
.
set
(
10
,
10
,
5
);
spotLight
.
castShadow
=
true
;
spotLight
.
shadowCameraNear
=
8
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录