Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
e819c82f
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 搜索 >>
提交
e819c82f
编写于
8月 10, 2021
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated examples builds.
上级
fdef2b21
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
examples/js/misc/ProgressiveLightMap.js
examples/js/misc/ProgressiveLightMap.js
+13
-13
未找到文件。
examples/js/misc/ProgressiveLightMap.js
浏览文件 @
e819c82f
...
...
@@ -25,22 +25,22 @@
this
.
res
=
res
;
this
.
lightMapContainers
=
[];
this
.
compiled
=
false
;
this
.
scene
=
new
THREE
.
THREE
.
THREE
.
Scene
();
this
.
scene
=
new
THREE
.
Scene
();
this
.
scene
.
background
=
null
;
this
.
tinyTarget
=
new
THREE
.
THREE
.
THREE
.
WebGLRenderTarget
(
1
,
1
);
this
.
tinyTarget
=
new
THREE
.
WebGLRenderTarget
(
1
,
1
);
this
.
buffer1Active
=
false
;
this
.
firstUpdate
=
true
;
this
.
warned
=
false
;
// Create the Progressive LightMap Texture
const
format
=
/
(
Android|iPad|iPhone|iPod
)
/g
.
test
(
navigator
.
userAgent
)
?
THREE
.
THREE
.
THREE
.
HalfFloatType
:
THREE
.
THREE
.
THREE
.
FloatType
;
this
.
progressiveLightMap1
=
new
THREE
.
THREE
.
THREE
.
WebGLRenderTarget
(
this
.
res
,
this
.
res
,
{
const
format
=
/
(
Android|iPad|iPhone|iPod
)
/g
.
test
(
navigator
.
userAgent
)
?
THREE
.
HalfFloatType
:
THREE
.
FloatType
;
this
.
progressiveLightMap1
=
new
THREE
.
WebGLRenderTarget
(
this
.
res
,
this
.
res
,
{
type
:
format
}
);
this
.
progressiveLightMap2
=
new
THREE
.
THREE
.
THREE
.
WebGLRenderTarget
(
this
.
res
,
this
.
res
,
{
this
.
progressiveLightMap2
=
new
THREE
.
WebGLRenderTarget
(
this
.
res
,
this
.
res
,
{
type
:
format
}
);
// Inject some spicy new logic into a standard phong material
this
.
uvMat
=
new
THREE
.
THREE
.
THREE
.
MeshPhongMaterial
();
this
.
uvMat
=
new
THREE
.
MeshPhongMaterial
();
this
.
uvMat
.
uniforms
=
{};
this
.
uvMat
.
onBeforeCompile
=
shader
=>
{
...
...
@@ -243,12 +243,12 @@
if
(
this
.
labelMesh
==
null
)
{
this
.
labelMaterial
=
new
THREE
.
THREE
.
THREE
.
MeshBasicMaterial
(
{
this
.
labelMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
map
:
this
.
progressiveLightMap1
.
texture
,
side
:
THREE
.
THREE
.
THREE
.
DoubleSide
side
:
THREE
.
DoubleSide
}
);
this
.
labelPlane
=
new
THREE
.
THREE
.
THREE
.
PlaneGeometry
(
100
,
100
);
this
.
labelMesh
=
new
THREE
.
THREE
.
THREE
.
Mesh
(
this
.
labelPlane
,
this
.
labelMaterial
);
this
.
labelPlane
=
new
THREE
.
PlaneGeometry
(
100
,
100
);
this
.
labelMesh
=
new
THREE
.
Mesh
(
this
.
labelPlane
,
this
.
labelMaterial
);
this
.
labelMesh
.
position
.
y
=
250
;
this
.
lightMapContainers
[
0
].
object
.
parent
.
add
(
this
.
labelMesh
);
...
...
@@ -272,7 +272,7 @@
_initializeBlurPlane
(
res
,
lightMap
=
null
)
{
const
blurMaterial
=
new
THREE
.
THREE
.
THREE
.
MeshBasicMaterial
();
const
blurMaterial
=
new
THREE
.
MeshBasicMaterial
();
blurMaterial
.
uniforms
=
{
previousShadowMap
:
{
value
:
null
...
...
@@ -315,7 +315,7 @@
};
this
.
blurringPlane
=
new
THREE
.
THREE
.
THREE
.
Mesh
(
new
THREE
.
THREE
.
THREE
.
PlaneBufferGeometry
(
1
,
1
),
blurMaterial
);
this
.
blurringPlane
=
new
THREE
.
Mesh
(
new
THREE
.
PlaneBufferGeometry
(
1
,
1
),
blurMaterial
);
this
.
blurringPlane
.
name
=
'
Blurring Plane
'
;
this
.
blurringPlane
.
frustumCulled
=
false
;
this
.
blurringPlane
.
renderOrder
=
0
;
...
...
@@ -326,6 +326,6 @@
}
THREE
.
THREE
.
THREE
.
ProgressiveLightMap
=
ProgressiveLightMap
;
THREE
.
ProgressiveLightMap
=
ProgressiveLightMap
;
}
)();
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录