Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
4e716553
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,发现更多精彩内容 >>
提交
4e716553
编写于
11月 16, 2012
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed Clock double-counting of time in getElapsedTime (thanks to @gagern)
Fixes #2637
上级
f7aa627d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
3 deletion
+3
-3
build/three.js
build/three.js
+1
-1
build/three.min.js
build/three.min.js
+1
-1
src/core/Clock.js
src/core/Clock.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
4e716553
...
...
@@ -248,7 +248,7 @@ THREE.Clock.prototype.stop = function () {
THREE.Clock.prototype.getElapsedTime = function () {
this.
elapsedTime += this.
getDelta();
this.getDelta();
return this.elapsedTime;
...
...
build/three.min.js
浏览文件 @
4e716553
...
...
@@ -6,7 +6,7 @@ function(a){window.clearTimeout(a)}})();THREE.FrontSide=0;THREE.BackSide=1;THREE
THREE
.
OneMinusSrcColorFactor
=
203
;
THREE
.
SrcAlphaFactor
=
204
;
THREE
.
OneMinusSrcAlphaFactor
=
205
;
THREE
.
DstAlphaFactor
=
206
;
THREE
.
OneMinusDstAlphaFactor
=
207
;
THREE
.
DstColorFactor
=
208
;
THREE
.
OneMinusDstColorFactor
=
209
;
THREE
.
SrcAlphaSaturateFactor
=
210
;
THREE
.
MultiplyOperation
=
0
;
THREE
.
MixOperation
=
1
;
THREE
.
AddOperation
=
2
;
THREE
.
UVMapping
=
function
(){};
THREE
.
CubeReflectionMapping
=
function
(){};
THREE
.
CubeRefractionMapping
=
function
(){};
THREE
.
SphericalReflectionMapping
=
function
(){};
THREE
.
SphericalRefractionMapping
=
function
(){};
THREE
.
RepeatWrapping
=
1
E3
;
THREE
.
ClampToEdgeWrapping
=
1001
;
THREE
.
MirroredRepeatWrapping
=
1002
;
THREE
.
NearestFilter
=
1003
;
THREE
.
NearestMipMapNearestFilter
=
1004
;
THREE
.
NearestMipMapLinearFilter
=
1005
;
THREE
.
LinearFilter
=
1006
;
THREE
.
LinearMipMapNearestFilter
=
1007
;
THREE
.
LinearMipMapLinearFilter
=
1008
;
THREE
.
UnsignedByteType
=
1009
;
THREE
.
ByteType
=
1010
;
THREE
.
ShortType
=
1011
;
THREE
.
UnsignedShortType
=
1012
;
THREE
.
IntType
=
1013
;
THREE
.
UnsignedIntType
=
1014
;
THREE
.
FloatType
=
1015
;
THREE
.
UnsignedShort4444Type
=
1016
;
THREE
.
UnsignedShort5551Type
=
1017
;
THREE
.
UnsignedShort565Type
=
1018
;
THREE
.
AlphaFormat
=
1019
;
THREE
.
RGBFormat
=
1020
;
THREE
.
RGBAFormat
=
1021
;
THREE
.
LuminanceFormat
=
1022
;
THREE
.
LuminanceAlphaFormat
=
1023
;
THREE
.
RGB_S3TC_DXT1_Format
=
2001
;
THREE
.
RGBA_S3TC_DXT1_Format
=
2002
;
THREE
.
RGBA_S3TC_DXT3_Format
=
2003
;
THREE
.
RGBA_S3TC_DXT5_Format
=
2004
;
THREE
.
Clock
=
function
(
a
){
this
.
autoStart
=
void
0
!==
a
?
a
:
!
0
;
this
.
elapsedTime
=
this
.
oldTime
=
this
.
startTime
=
0
;
this
.
running
=!
1
};
THREE
.
Clock
.
prototype
.
start
=
function
(){
this
.
oldTime
=
this
.
startTime
=
Date
.
now
();
this
.
running
=!
0
};
THREE
.
Clock
.
prototype
.
stop
=
function
(){
this
.
getElapsedTime
();
this
.
running
=!
1
};
THREE
.
Clock
.
prototype
.
getElapsedTime
=
function
(){
return
this
.
elapsedTime
+=
this
.
getDelta
()
};
THREE
.
Clock
.
prototype
.
getDelta
=
function
(){
var
a
=
0
;
this
.
autoStart
&&!
this
.
running
&&
this
.
start
();
if
(
this
.
running
){
var
b
=
Date
.
now
(),
a
=
0.001
*
(
b
-
this
.
oldTime
);
this
.
oldTime
=
b
;
this
.
elapsedTime
+=
a
}
return
a
};
THREE
.
Clock
.
prototype
.
start
=
function
(){
this
.
oldTime
=
this
.
startTime
=
Date
.
now
();
this
.
running
=!
0
};
THREE
.
Clock
.
prototype
.
stop
=
function
(){
this
.
getElapsedTime
();
this
.
running
=!
1
};
THREE
.
Clock
.
prototype
.
getElapsedTime
=
function
(){
this
.
getDelta
();
return
this
.
elapsedTime
};
THREE
.
Clock
.
prototype
.
getDelta
=
function
(){
var
a
=
0
;
this
.
autoStart
&&!
this
.
running
&&
this
.
start
();
if
(
this
.
running
){
var
b
=
Date
.
now
(),
a
=
0.001
*
(
b
-
this
.
oldTime
);
this
.
oldTime
=
b
;
this
.
elapsedTime
+=
a
}
return
a
};
THREE
.
Color
=
function
(
a
){
void
0
!==
a
&&
this
.
setHex
(
a
);
return
this
};
THREE
.
Color
.
prototype
=
{
constructor
:
THREE
.
Color
,
r
:
1
,
g
:
1
,
b
:
1
,
copy
:
function
(
a
){
this
.
r
=
a
.
r
;
this
.
g
=
a
.
g
;
this
.
b
=
a
.
b
;
return
this
},
copyGammaToLinear
:
function
(
a
){
this
.
r
=
a
.
r
*
a
.
r
;
this
.
g
=
a
.
g
*
a
.
g
;
this
.
b
=
a
.
b
*
a
.
b
;
return
this
},
copyLinearToGamma
:
function
(
a
){
this
.
r
=
Math
.
sqrt
(
a
.
r
);
this
.
g
=
Math
.
sqrt
(
a
.
g
);
this
.
b
=
Math
.
sqrt
(
a
.
b
);
return
this
},
convertGammaToLinear
:
function
(){
var
a
=
this
.
r
,
b
=
this
.
g
,
c
=
this
.
b
;
this
.
r
=
a
*
a
;
this
.
g
=
b
*
b
;
this
.
b
=
c
*
c
;
return
this
},
convertLinearToGamma
:
function
(){
this
.
r
=
Math
.
sqrt
(
this
.
r
);
this
.
g
=
Math
.
sqrt
(
this
.
g
);
this
.
b
=
Math
.
sqrt
(
this
.
b
);
return
this
},
setRGB
:
function
(
a
,
b
,
c
){
this
.
r
=
a
;
this
.
g
=
b
;
this
.
b
=
c
;
return
this
},
setHSV
:
function
(
a
,
b
,
c
){
var
d
,
e
,
f
;
0
===
c
?
this
.
r
=
this
.
g
=
this
.
b
=
0
:(
d
=
Math
.
floor
(
6
*
a
),
e
=
6
*
a
-
d
,
a
=
c
*
(
1
-
b
),
f
=
c
*
(
1
-
b
*
e
),
b
=
c
*
(
1
-
b
*
(
1
-
e
)),
0
===
d
?(
this
.
r
=
c
,
this
.
g
=
b
,
this
.
b
=
a
):
1
===
d
?(
this
.
r
=
f
,
this
.
g
=
c
,
this
.
b
=
a
):
2
===
d
?(
this
.
r
=
a
,
this
.
g
=
c
,
this
.
b
=
b
):
3
===
d
?(
this
.
r
=
a
,
this
.
g
=
f
,
this
.
b
=
c
):
4
===
d
?(
this
.
r
=
b
,
this
.
g
=
a
,
this
.
b
=
c
):
5
===
d
&&
(
this
.
r
=
c
,
this
.
g
=
a
,
this
.
b
=
f
));
return
this
},
getHex
:
function
(){
return
255
*
this
.
r
<<
16
^
255
*
this
.
g
<<
...
...
src/core/Clock.js
浏览文件 @
4e716553
...
...
@@ -33,7 +33,7 @@ THREE.Clock.prototype.stop = function () {
THREE
.
Clock
.
prototype
.
getElapsedTime
=
function
()
{
this
.
elapsedTime
+=
this
.
getDelta
();
this
.
getDelta
();
return
this
.
elapsedTime
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录