Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
ccd108de
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,发现更多精彩内容 >>
提交
ccd108de
编写于
9月 28, 2015
作者:
M
Marius Kintel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#7245 coding style
上级
1f6e5915
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
120 addition
and
43 deletion
+120
-43
src/renderers/WebGLRenderTarget.js
src/renderers/WebGLRenderTarget.js
+102
-27
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+18
-16
未找到文件。
src/renderers/WebGLRenderTarget.js
浏览文件 @
ccd108de
...
...
@@ -12,12 +12,7 @@ THREE.WebGLRenderTarget = function ( width, height, options ) {
options
=
options
||
{};
this
.
texture
=
new
THREE
.
Texture
(
undefined
,
undefined
,
options
.
wrapS
,
options
.
wrapT
,
options
.
magFilter
,
options
.
minFilter
!==
undefined
?
options
.
minFilter
:
THREE
.
LinearFilter
,
options
.
format
,
options
.
type
,
options
.
anisotropy
);
this
.
texture
=
new
THREE
.
Texture
(
undefined
,
undefined
,
options
.
wrapS
,
options
.
wrapT
,
options
.
magFilter
,
options
.
minFilter
!==
undefined
?
options
.
minFilter
:
THREE
.
LinearFilter
,
options
.
format
,
options
.
type
,
options
.
anisotropy
);
this
.
depthBuffer
=
options
.
depthBuffer
!==
undefined
?
options
.
depthBuffer
:
true
;
this
.
stencilBuffer
=
options
.
stencilBuffer
!==
undefined
?
options
.
stencilBuffer
:
true
;
...
...
@@ -71,26 +66,106 @@ THREE.WebGLRenderTarget.prototype = {
},
get
wrapS
()
{
return
this
.
texture
.
wrapS
;
},
set
wrapS
(
wrapS
)
{
this
.
texture
.
wrapS
=
wrapS
;
},
get
wrapT
()
{
return
this
.
texture
.
wrapT
;
},
set
wrapT
(
wrapT
)
{
this
.
texture
.
wrapT
=
wrapT
;
},
get
magFilter
()
{
return
this
.
texture
.
magFilter
;
},
set
magFilter
(
magFilter
)
{
this
.
texture
.
magFilter
=
magFilter
;
},
get
minFilter
()
{
return
this
.
texture
.
minFilter
;
},
set
minFilter
(
minFilter
)
{
this
.
texture
.
minFilter
=
minFilter
;
},
get
anisotropy
()
{
return
this
.
texture
.
anisotropy
;
},
set
anisotropy
(
anisotropy
)
{
this
.
texture
.
anisotropy
=
anisotropy
;
},
get
offset
()
{
return
this
.
texture
.
offset
;
},
set
offset
(
offset
)
{
this
.
texture
.
offset
=
offset
;
},
get
repeat
()
{
return
this
.
texture
.
repeat
;
},
set
repeat
(
repeat
)
{
this
.
texture
.
repeat
=
repeat
;
},
get
format
()
{
return
this
.
texture
.
format
;
},
set
format
(
format
)
{
this
.
texture
.
format
=
format
;
},
get
type
()
{
return
this
.
texture
.
type
;
},
set
type
(
type
)
{
this
.
texture
.
type
=
type
;
},
get
generateMipmaps
()
{
return
this
.
texture
.
generateMipmaps
;
},
set
generateMipmaps
(
generateMipmaps
)
{
this
.
texture
.
generateMipmaps
=
generateMipmaps
;
}
get
wrapS
()
{
return
this
.
texture
.
wrapS
;
},
set
wrapS
(
wrapS
)
{
this
.
texture
.
wrapS
=
wrapS
;
},
get
wrapT
()
{
return
this
.
texture
.
wrapT
;
},
set
wrapT
(
wrapT
)
{
this
.
texture
.
wrapT
=
wrapT
;
},
get
magFilter
()
{
return
this
.
texture
.
magFilter
;
},
set
magFilter
(
magFilter
)
{
this
.
texture
.
magFilter
=
magFilter
;
},
get
minFilter
()
{
return
this
.
texture
.
minFilter
;
},
set
minFilter
(
minFilter
)
{
this
.
texture
.
minFilter
=
minFilter
;
},
get
anisotropy
()
{
return
this
.
texture
.
anisotropy
;
},
set
anisotropy
(
anisotropy
)
{
this
.
texture
.
anisotropy
=
anisotropy
;
},
get
offset
()
{
return
this
.
texture
.
offset
;
},
set
offset
(
offset
)
{
this
.
texture
.
offset
=
offset
;
},
get
repeat
()
{
return
this
.
texture
.
repeat
;
},
set
repeat
(
repeat
)
{
this
.
texture
.
repeat
=
repeat
;
},
get
format
()
{
return
this
.
texture
.
format
;
},
set
format
(
format
)
{
this
.
texture
.
format
=
format
;
},
get
type
()
{
return
this
.
texture
.
type
;
},
set
type
(
type
)
{
this
.
texture
.
type
=
type
;
},
get
generateMipmaps
()
{
return
this
.
texture
.
generateMipmaps
;
},
set
generateMipmaps
(
generateMipmaps
)
{
this
.
texture
.
generateMipmaps
=
generateMipmaps
;
}
};
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
ccd108de
...
...
@@ -32,9 +32,9 @@ THREE.WebGLRenderer = function ( parameters ) {
var
lights
=
[];
var
opaqueObjects
=
[];
var
opaqueObjectsLastIndex
=
-
1
;
var
opaqueObjectsLastIndex
=
-
1
;
var
transparentObjects
=
[];
var
transparentObjectsLastIndex
=
-
1
;
var
transparentObjectsLastIndex
=
-
1
;
var
morphInfluences
=
new
Float32Array
(
8
);
...
...
@@ -603,6 +603,7 @@ THREE.WebGLRenderer = function ( parameters ) {
if
(
programInfo
!==
undefined
)
{
programCache
.
releaseProgram
(
programInfo
);
}
}
...
...
@@ -1093,8 +1094,8 @@ THREE.WebGLRenderer = function ( parameters ) {
lights
.
length
=
0
;
opaqueObjectsLastIndex
=
-
1
;
transparentObjectsLastIndex
=
-
1
;
opaqueObjectsLastIndex
=
-
1
;
transparentObjectsLastIndex
=
-
1
;
sprites
.
length
=
0
;
lensFlares
.
length
=
0
;
...
...
@@ -1160,14 +1161,15 @@ THREE.WebGLRenderer = function ( parameters ) {
// Generate mipmap if we're using any kind of mipmap filtering
if
(
renderTarget
)
{
var
texture
=
renderTarget
.
texture
;
var
isTargetPowerOfTwo
=
THREE
.
Math
.
isPowerOfTwo
(
renderTarget
.
width
)
&&
THREE
.
Math
.
isPowerOfTwo
(
renderTarget
.
height
);
if
(
texture
.
generateMipmaps
&&
isTargetPowerOfTwo
&&
texture
.
minFilter
!==
THREE
.
NearestFilter
&&
texture
.
minFilter
!==
THREE
.
LinearFilter
)
{
if
(
texture
.
generateMipmaps
&&
isTargetPowerOfTwo
&&
texture
.
minFilter
!==
THREE
.
NearestFilter
&&
texture
.
minFilter
!==
THREE
.
LinearFilter
)
{
updateRenderTargetMipmap
(
renderTarget
);
}
}
// Ensure depth buffer writing is enabled so it can be cleared on next render
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录