Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
561f39df
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,发现更多精彩内容 >>
提交
561f39df
编写于
9月 30, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up.
上级
bfadabd6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
128 addition
and
63 deletion
+128
-63
src/core/Object3D.js
src/core/Object3D.js
+8
-6
src/renderers/WebGLRenderTarget.js
src/renderers/WebGLRenderTarget.js
+120
-57
未找到文件。
src/core/Object3D.js
浏览文件 @
561f39df
...
...
@@ -25,17 +25,17 @@ THREE.Object3D = function () {
var
quaternion
=
new
THREE
.
Quaternion
();
var
scale
=
new
THREE
.
Vector3
(
1
,
1
,
1
);
var
onRotationChange
=
function
()
{
function
onRotationChange
()
{
quaternion
.
setFromEuler
(
rotation
,
false
);
}
;
}
var
onQuaternionChange
=
function
()
{
function
onQuaternionChange
()
{
rotation
.
setFromQuaternion
(
quaternion
,
undefined
,
false
);
}
;
}
rotation
.
onChange
(
onRotationChange
);
quaternion
.
onChange
(
onQuaternionChange
);
...
...
@@ -94,7 +94,7 @@ THREE.Object3D.prototype = {
get
eulerOrder
()
{
console
.
warn
(
'
THREE.Object3D: .eulerOrder
has been moved to
.rotation.order.
'
);
console
.
warn
(
'
THREE.Object3D: .eulerOrder
is now
.rotation.order.
'
);
return
this
.
rotation
.
order
;
...
...
@@ -102,7 +102,7 @@ THREE.Object3D.prototype = {
set
eulerOrder
(
value
)
{
console
.
warn
(
'
THREE.Object3D: .eulerOrder
has been moved to
.rotation.order.
'
);
console
.
warn
(
'
THREE.Object3D: .eulerOrder
is now
.rotation.order.
'
);
this
.
rotation
.
order
=
value
;
...
...
@@ -126,6 +126,8 @@ THREE.Object3D.prototype = {
},
//
applyMatrix
:
function
(
matrix
)
{
this
.
matrix
.
multiplyMatrices
(
matrix
,
this
.
matrix
);
...
...
src/renderers/WebGLRenderTarget.js
浏览文件 @
561f39df
...
...
@@ -12,7 +12,9 @@ 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
);
if
(
options
.
minFilter
===
undefined
)
options
.
minFilter
=
THREE
.
LinearFilter
;
this
.
texture
=
new
THREE
.
Texture
(
undefined
,
undefined
,
options
.
wrapS
,
options
.
wrapT
,
options
.
magFilter
,
options
.
minFilter
,
options
.
format
,
options
.
type
,
options
.
anisotropy
);
this
.
depthBuffer
=
options
.
depthBuffer
!==
undefined
?
options
.
depthBuffer
:
true
;
this
.
stencilBuffer
=
options
.
stencilBuffer
!==
undefined
?
options
.
stencilBuffer
:
true
;
...
...
@@ -25,145 +27,206 @@ THREE.WebGLRenderTarget.prototype = {
constructor
:
THREE
.
WebGLRenderTarget
,
setSize
:
function
(
width
,
height
)
{
if
(
this
.
width
!==
width
||
this
.
height
!==
height
)
{
get
wrapS
()
{
this
.
width
=
width
;
this
.
height
=
height
;
console
.
warn
(
'
THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.
'
);
this
.
dispose
();
}
return
this
.
texture
.
wrapS
;
},
clone
:
function
(
)
{
set
wrapS
(
value
)
{
return
new
this
.
constructor
().
copy
(
this
);
console
.
warn
(
'
THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.
'
);
},
this
.
texture
.
wrapS
=
value
;
copy
:
function
(
source
)
{
this
.
width
=
source
.
width
;
this
.
height
=
source
.
height
;
this
.
texture
=
source
.
texture
.
clone
();
},
this
.
depthBuffer
=
source
.
depthBuffer
;
this
.
stencilBuffer
=
source
.
stencilBuffer
;
get
wrapT
()
{
this
.
shareDepthFrom
=
source
.
shareDepthFrom
;
console
.
warn
(
'
THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.
'
)
;
return
this
;
return
this
.
texture
.
wrapT
;
},
dispose
:
function
(
)
{
set
wrapT
(
value
)
{
this
.
dispatchEvent
(
{
type
:
'
dispose
'
}
);
console
.
warn
(
'
THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.
'
);
},
get
wrapS
()
{
return
this
.
texture
.
wrapS
;
this
.
texture
.
wrapT
=
value
;
},
set
wrapS
(
wrapS
)
{
this
.
texture
.
wrapS
=
wrapS
;
get
magFilter
()
{
},
get
wrapT
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.
'
);
return
this
.
texture
.
wrapT
;
return
this
.
texture
.
magFilter
;
},
set
wrapT
(
wrapT
)
{
this
.
texture
.
wrapT
=
wrapT
;
set
magFilter
(
value
)
{
},
get
magFilter
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.
'
);
return
this
.
texture
.
magFilter
;
this
.
texture
.
magFilter
=
value
;
},
set
magFilter
(
magFilter
)
{
this
.
texture
.
magFilter
=
magFilter
;
},
get
minFilter
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.
'
);
return
this
.
texture
.
minFilter
;
},
set
minFilter
(
minFilter
)
{
this
.
texture
.
minFilter
=
minFilter
;
set
minFilter
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.
'
);
this
.
texture
.
minFilter
=
value
;
},
get
anisotropy
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.
'
);
return
this
.
texture
.
anisotropy
;
},
set
anisotropy
(
anisotropy
)
{
this
.
texture
.
anisotropy
=
anisotropy
;
set
anisotropy
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.
'
);
this
.
texture
.
anisotropy
=
value
;
},
get
offset
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .offset is now .texture.offset.
'
);
return
this
.
texture
.
offset
;
},
set
offset
(
offset
)
{
this
.
texture
.
offset
=
offset
;
set
offset
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .offset is now .texture.offset.
'
);
this
.
texture
.
offset
=
value
;
},
get
repeat
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .repeat is now .texture.repeat.
'
);
return
this
.
texture
.
repeat
;
},
set
repeat
(
repeat
)
{
this
.
texture
.
repeat
=
repeat
;
set
repeat
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .repeat is now .texture.repeat.
'
);
this
.
texture
.
repeat
=
value
;
},
get
format
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .format is now .texture.format.
'
);
return
this
.
texture
.
format
;
},
set
format
(
format
)
{
this
.
texture
.
format
=
format
;
set
format
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .format is now .texture.format.
'
);
this
.
texture
.
format
=
value
;
},
get
type
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .type is now .texture.type.
'
);
return
this
.
texture
.
type
;
},
set
type
(
type
)
{
this
.
texture
.
type
=
type
;
set
type
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .type is now .texture.type.
'
);
this
.
texture
.
type
=
value
;
},
get
generateMipmaps
()
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.
'
);
return
this
.
texture
.
generateMipmaps
;
},
set
generateMipmaps
(
generateMipmaps
)
{
this
.
texture
.
generateMipmaps
=
generateMipmaps
;
set
generateMipmaps
(
value
)
{
console
.
warn
(
'
THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.
'
);
this
.
texture
.
generateMipmaps
=
value
;
},
//
setSize
:
function
(
width
,
height
)
{
if
(
this
.
width
!==
width
||
this
.
height
!==
height
)
{
this
.
width
=
width
;
this
.
height
=
height
;
this
.
dispose
();
}
},
clone
:
function
()
{
return
new
this
.
constructor
().
copy
(
this
);
},
copy
:
function
(
source
)
{
this
.
width
=
source
.
width
;
this
.
height
=
source
.
height
;
this
.
texture
=
source
.
texture
.
clone
();
this
.
depthBuffer
=
source
.
depthBuffer
;
this
.
stencilBuffer
=
source
.
stencilBuffer
;
this
.
shareDepthFrom
=
source
.
shareDepthFrom
;
return
this
;
},
dispose
:
function
()
{
this
.
dispatchEvent
(
{
type
:
'
dispose
'
}
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录