Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
a3c3d453
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,发现更多精彩内容 >>
提交
a3c3d453
编写于
9月 26, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
6822d171
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
4 deletion
+6
-4
build/three.js
build/three.js
+4
-2
build/three.min.js
build/three.min.js
+2
-2
未找到文件。
build/three.js
浏览文件 @
a3c3d453
...
...
@@ -10503,10 +10503,12 @@ THREE.PerspectiveCamera.prototype.setViewOffset = function ( fullWidth, fullHeig
THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
var fov = THREE.Math.radToDeg( 2 * Math.atan( Math.tan( THREE.Math.degToRad( this.fov ) * 0.5 ) / this.zoom ) );
if ( this.fullWidth ) {
var aspect = this.fullWidth / this.fullHeight;
var top = Math.tan( THREE.Math.degToRad(
( this.fov / this.zoom )
* 0.5 ) ) * this.near;
var top = Math.tan( THREE.Math.degToRad(
fov
* 0.5 ) ) * this.near;
var bottom = - top;
var left = aspect * bottom;
var right = aspect * top;
...
...
@@ -10524,7 +10526,7 @@ THREE.PerspectiveCamera.prototype.updateProjectionMatrix = function () {
} else {
this.projectionMatrix.makePerspective(
this.fov / this.zoom
, this.aspect, this.near, this.far );
this.projectionMatrix.makePerspective(
fov
, this.aspect, this.near, this.far );
}
...
...
build/three.min.js
浏览文件 @
a3c3d453
...
...
@@ -227,8 +227,8 @@ THREE.OrthographicCamera.prototype=Object.create(THREE.Camera.prototype);THREE.O
THREE
.
OrthographicCamera
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
OrthographicCamera
;
THREE
.
Camera
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
zoom
=
this
.
zoom
;
a
.
left
=
this
.
left
;
a
.
right
=
this
.
right
;
a
.
top
=
this
.
top
;
a
.
bottom
=
this
.
bottom
;
a
.
near
=
this
.
near
;
a
.
far
=
this
.
far
;
a
.
projectionMatrix
.
copy
(
this
.
projectionMatrix
);
return
a
};
THREE
.
PerspectiveCamera
=
function
(
a
,
b
,
c
,
d
){
THREE
.
Camera
.
call
(
this
);
this
.
type
=
"
PerspectiveCamera
"
;
this
.
zoom
=
1
;
this
.
fov
=
void
0
!==
a
?
a
:
50
;
this
.
aspect
=
void
0
!==
b
?
b
:
1
;
this
.
near
=
void
0
!==
c
?
c
:.
1
;
this
.
far
=
void
0
!==
d
?
d
:
2
E3
;
this
.
updateProjectionMatrix
()};
THREE
.
PerspectiveCamera
.
prototype
=
Object
.
create
(
THREE
.
Camera
.
prototype
);
THREE
.
PerspectiveCamera
.
prototype
.
setLens
=
function
(
a
,
b
){
void
0
===
b
&&
(
b
=
24
);
this
.
fov
=
2
*
THREE
.
Math
.
radToDeg
(
Math
.
atan
(
b
/
(
2
*
a
)));
this
.
updateProjectionMatrix
()};
THREE
.
PerspectiveCamera
.
prototype
.
setViewOffset
=
function
(
a
,
b
,
c
,
d
,
e
,
g
){
this
.
fullWidth
=
a
;
this
.
fullHeight
=
b
;
this
.
x
=
c
;
this
.
y
=
d
;
this
.
width
=
e
;
this
.
height
=
g
;
this
.
updateProjectionMatrix
()};
THREE
.
PerspectiveCamera
.
prototype
.
updateProjectionMatrix
=
function
(){
if
(
this
.
fullWidth
){
var
a
=
this
.
fullWidth
/
this
.
fullHeight
,
b
=
Math
.
tan
(
THREE
.
Math
.
degToRad
(
this
.
fov
/
this
.
zoom
*
.
5
))
*
this
.
near
,
c
=-
b
,
d
=
a
*
c
,
a
=
Math
.
abs
(
a
*
b
-
d
),
c
=
Math
.
abs
(
b
-
c
);
this
.
projectionMatrix
.
makeFrustum
(
d
+
this
.
x
*
a
/
this
.
fullWidth
,
d
+
(
this
.
x
+
this
.
width
)
*
a
/
this
.
fullWidth
,
b
-
(
this
.
y
+
this
.
height
)
*
c
/
this
.
fullHeight
,
b
-
this
.
y
*
c
/
this
.
fullHeight
,
this
.
near
,
this
.
far
)}
else
this
.
projectionMatrix
.
makePerspective
(
this
.
fov
/
this
.
zoom
,
this
.
aspect
,
this
.
near
,
this
.
far
)};
THREE
.
PerspectiveCamera
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
PerspectiveCamera
;
THREE
.
Camera
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
zoom
=
this
.
zoom
;
a
.
fov
=
this
.
fov
;
a
.
aspect
=
this
.
aspect
;
a
.
near
=
this
.
near
;
a
.
far
=
this
.
far
;
a
.
projectionMatrix
.
copy
(
this
.
projectionMatrix
);
return
a
};
THREE
.
Light
=
function
(
a
){
THREE
.
Object3D
.
call
(
this
);
this
.
type
=
"
Light
"
;
this
.
color
=
new
THREE
.
Color
(
a
)};
THREE
.
Light
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
PerspectiveCamera
.
prototype
.
updateProjectionMatrix
=
function
(){
var
a
=
THREE
.
Math
.
radToDeg
(
2
*
Math
.
atan
(
Math
.
tan
(.
5
*
THREE
.
Math
.
degToRad
(
this
.
fov
))
/
this
.
zoom
));
if
(
this
.
fullWidth
){
var
b
=
this
.
fullWidth
/
this
.
fullHeight
,
a
=
Math
.
tan
(
THREE
.
Math
.
degToRad
(.
5
*
a
))
*
this
.
near
,
c
=-
a
,
d
=
b
*
c
,
b
=
Math
.
abs
(
b
*
a
-
d
),
c
=
Math
.
abs
(
a
-
c
);
this
.
projectionMatrix
.
makeFrustum
(
d
+
this
.
x
*
b
/
this
.
fullWidth
,
d
+
(
this
.
x
+
this
.
width
)
*
b
/
this
.
fullWidth
,
a
-
(
this
.
y
+
this
.
height
)
*
c
/
this
.
fullHeight
,
a
-
this
.
y
*
c
/
this
.
fullHeight
,
this
.
near
,
this
.
far
)}
else
this
.
projectionMatrix
.
makePerspective
(
a
,
this
.
aspect
,
this
.
near
,
this
.
far
)};
THREE
.
PerspectiveCamera
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
PerspectiveCamera
;
THREE
.
Camera
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
zoom
=
this
.
zoom
;
a
.
fov
=
this
.
fov
;
a
.
aspect
=
this
.
aspect
;
a
.
near
=
this
.
near
;
a
.
far
=
this
.
far
;
a
.
projectionMatrix
.
copy
(
this
.
projectionMatrix
);
return
a
};
THREE
.
Light
=
function
(
a
){
THREE
.
Object3D
.
call
(
this
);
this
.
type
=
"
Light
"
;
this
.
color
=
new
THREE
.
Color
(
a
)};
THREE
.
Light
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Light
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
Light
);
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
return
a
};
THREE
.
AmbientLight
=
function
(
a
){
THREE
.
Light
.
call
(
this
,
a
);
this
.
type
=
"
AmbientLight
"
};
THREE
.
AmbientLight
.
prototype
=
Object
.
create
(
THREE
.
Light
.
prototype
);
THREE
.
AmbientLight
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
AmbientLight
;
THREE
.
Light
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
AreaLight
=
function
(
a
,
b
){
THREE
.
Light
.
call
(
this
,
a
);
this
.
type
=
"
AreaLight
"
;
this
.
normal
=
new
THREE
.
Vector3
(
0
,
-
1
,
0
);
this
.
right
=
new
THREE
.
Vector3
(
1
,
0
,
0
);
this
.
intensity
=
void
0
!==
b
?
b
:
1
;
this
.
height
=
this
.
width
=
1
;
this
.
constantAttenuation
=
1.5
;
this
.
linearAttenuation
=
.
5
;
this
.
quadraticAttenuation
=
.
1
};
THREE
.
AreaLight
.
prototype
=
Object
.
create
(
THREE
.
Light
.
prototype
);
THREE
.
DirectionalLight
=
function
(
a
,
b
){
THREE
.
Light
.
call
(
this
,
a
);
this
.
type
=
"
DirectionalLight
"
;
this
.
position
.
set
(
0
,
1
,
0
);
this
.
target
=
new
THREE
.
Object3D
;
this
.
intensity
=
void
0
!==
b
?
b
:
1
;
this
.
onlyShadow
=
this
.
castShadow
=!
1
;
this
.
shadowCameraNear
=
50
;
this
.
shadowCameraFar
=
5
E3
;
this
.
shadowCameraLeft
=-
500
;
this
.
shadowCameraTop
=
this
.
shadowCameraRight
=
500
;
this
.
shadowCameraBottom
=-
500
;
this
.
shadowCameraVisible
=!
1
;
this
.
shadowBias
=
0
;
this
.
shadowDarkness
=
.
5
;
this
.
shadowMapHeight
=
this
.
shadowMapWidth
=
512
;
this
.
shadowCascade
=!
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录