Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9014a06c
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 搜索 >>
提交
9014a06c
编写于
5月 19, 2016
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
bb5600fd
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
72 addition
and
51 deletion
+72
-51
build/three.js
build/three.js
+52
-32
build/three.min.js
build/three.min.js
+20
-19
未找到文件。
build/three.js
浏览文件 @
9014a06c
...
...
@@ -12760,7 +12760,7 @@ THREE.AnimationAction._new.prototype = {
halt: function( duration ) {
return this.warp( this._
current
TimeScale, 0, duration );
return this.warp( this._
effective
TimeScale, 0, duration );
},
...
...
@@ -13166,10 +13166,12 @@ THREE.AnimationAction._new.prototype = {
THREE.AnimationClip = function ( name, duration, tracks ) {
this.name = name
|| THREE.Math.generateUUID()
;
this.name = name;
this.tracks = tracks;
this.duration = ( duration !== undefined ) ? duration : -1;
this.uuid = THREE.Math.generateUUID();
// this means it should figure out its duration by scanning the tracks
if ( this.duration < 0 ) {
...
...
@@ -13318,7 +13320,16 @@ Object.assign( THREE.AnimationClip, {
},
findByName: function( clipArray, name ) {
findByName: function( objectOrClipArray, name ) {
var clipArray = objectOrClipArray;
if ( ! Array.isArray( objectOrClipArray ) ) {
var o = objectOrClipArray;
clipArray = o.geometry && o.geometry.animations || o.animations;
}
for ( var i = 0; i < clipArray.length; i ++ ) {
...
...
@@ -13538,11 +13549,14 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
var root = optionalRoot || this._root,
rootUuid = root.uuid,
clipName = ( typeof clip === 'string' ) ? clip : clip.name,
clipObject = ( clip !== clipName ) ? clip : null,
actionsForClip = this._actionsByClip[ clipName ],
prototypeAction;
clipObject = typeof clip === 'string' ?
THREE.AnimationClip.findByName( root, clip ) : clip,
clipUuid = clipObject !== null ? clipObject.uuid : clip,
actionsForClip = this._actionsByClip[ clipUuid ],
prototypeAction = null;
if ( actionsForClip !== undefined ) {
...
...
@@ -13560,14 +13574,8 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
prototypeAction = actionsForClip.knownActions[ 0 ];
// also, take the clip from the prototype action
clipObject = prototypeAction._clip;
if ( clip !== clipName && clip !== clipObject ) {
throw new Error(
"Different clips with the same name detected!" );
}
if ( clipObject === null )
clipObject = prototypeAction._clip;
}
...
...
@@ -13581,7 +13589,7 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
this._bindAction( newAction, prototypeAction );
// and make the action known to the memory manager
this._addInactiveAction( newAction, clip
Name
, rootUuid );
this._addInactiveAction( newAction, clip
Uuid
, rootUuid );
return newAction;
...
...
@@ -13592,8 +13600,13 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
var root = optionalRoot || this._root,
rootUuid = root.uuid,
clipName = ( typeof clip === 'string' ) ? clip : clip.name,
actionsForClip = this._actionsByClip[ clipName ];
clipObject = typeof clip === 'string' ?
THREE.AnimationClip.findByName( root, clip ) : clip,
clipUuid = clipObject ? clipObject.uuid : clip,
actionsForClip = this._actionsByClip[ clipUuid ];
if ( actionsForClip !== undefined ) {
...
...
@@ -13685,9 +13698,9 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
uncacheClip: function( clip ) {
var actions = this._actions,
clip
Name = clip.name
,
clip
Uuid = clip.uuid
,
actionsByClip = this._actionsByClip,
actionsForClip = actionsByClip[ clip
Name
];
actionsForClip = actionsByClip[ clip
Uuid
];
if ( actionsForClip !== undefined ) {
...
...
@@ -13717,7 +13730,7 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
}
delete actionsByClip[ clip
Name
];
delete actionsByClip[ clip
Uuid
];
}
...
...
@@ -13729,9 +13742,9 @@ Object.assign( THREE.AnimationMixer.prototype, THREE.EventDispatcher.prototype,
var rootUuid = root.uuid,
actionsByClip = this._actionsByClip;
for ( var clip
Name
in actionsByClip ) {
for ( var clip
Uuid
in actionsByClip ) {
var actionByRoot = actionsByClip[ clip
Name
].actionByRoot,
var actionByRoot = actionsByClip[ clip
Uuid
].actionByRoot,
action = actionByRoot[ rootUuid ];
if ( action !== undefined ) {
...
...
@@ -13859,13 +13872,13 @@ Object.assign( THREE.AnimationMixer.prototype, {
// appears to be still using it -> rebind
var rootUuid = ( action._localRoot || this._root ).uuid,
clip
Name = action._clip.name
,
actionsForClip = this._actionsByClip[ clip
Name
];
clip
Uuid = action._clip.uuid
,
actionsForClip = this._actionsByClip[ clip
Uuid
];
this._bindAction( action,
actionsForClip && actionsForClip.knownActions[ 0 ] );
this._addInactiveAction( action, clip
Name
, rootUuid );
this._addInactiveAction( action, clip
Uuid
, rootUuid );
}
...
...
@@ -13971,11 +13984,11 @@ Object.assign( THREE.AnimationMixer.prototype, {
},
_addInactiveAction: function( action, clip
Name
, rootUuid ) {
_addInactiveAction: function( action, clip
Uuid
, rootUuid ) {
var actions = this._actions,
actionsByClip = this._actionsByClip,
actionsForClip = actionsByClip[ clip
Name
];
actionsForClip = actionsByClip[ clip
Uuid
];
if ( actionsForClip === undefined ) {
...
...
@@ -13988,7 +14001,7 @@ Object.assign( THREE.AnimationMixer.prototype, {
action._byClipCacheIndex = 0;
actionsByClip[ clip
Name
] = actionsForClip;
actionsByClip[ clip
Uuid
] = actionsForClip;
} else {
...
...
@@ -14019,9 +14032,9 @@ Object.assign( THREE.AnimationMixer.prototype, {
action._cacheIndex = null;
var clip
Name = action._clip.name
,
var clip
Uuid = action._clip.uuid
,
actionsByClip = this._actionsByClip,
actionsForClip = actionsByClip[ clip
Name
],
actionsForClip = actionsByClip[ clip
Uuid
],
knownActionsForClip = actionsForClip.knownActions,
lastKnownAction =
...
...
@@ -14043,7 +14056,7 @@ Object.assign( THREE.AnimationMixer.prototype, {
if ( knownActionsForClip.length === 0 ) {
delete actionsByClip[ clip
Name
];
delete actionsByClip[ clip
Uuid
];
}
...
...
@@ -17295,6 +17308,13 @@ THREE.PerspectiveCamera.prototype = Object.assign( Object.create( THREE.Camera.p
},
clearViewOffset: function() {
this.view = null;
this.updateProjectionMatrix();
},
updateProjectionMatrix: function () {
var near = this.near,
...
...
build/three.min.js
浏览文件 @
9014a06c
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录