Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
84ef5f90
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,发现更多精彩内容 >>
提交
84ef5f90
编写于
2月 12, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
f86548ef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
6 deletion
+13
-6
build/three.js
build/three.js
+12
-5
build/three.min.js
build/three.min.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
84ef5f90
...
...
@@ -15509,14 +15509,21 @@ THREE.LOD.prototype.clone = function ( object ) {
* @author alteredq / http://alteredqualia.com/
*/
THREE.Sprite =
function ( material
) {
THREE.Sprite =
( function (
) {
THREE.Object3D.call( this );
var geometry = new THREE.Geometry2( 3 );
geometry.vertices.set( [ - 0.5, - 0.5, 0, 0.5, - 0.5, 0, 0.5, 0.5, 0 ] );
this.geometry = { boundingSphere: new THREE.Sphere( new THREE.Vector3(), 0.5 ), addEventListener: function () {} /* WebGLRenderer dependency */ };
this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
return function ( material ) {
};
THREE.Object3D.call( this );
this.geometry = geometry;
this.material = ( material !== undefined ) ? material : new THREE.SpriteMaterial();
};
} )();
THREE.Sprite.prototype = Object.create( THREE.Object3D.prototype );
...
...
build/three.min.js
浏览文件 @
84ef5f90
...
...
@@ -303,7 +303,7 @@ THREE.MorphAnimMesh.prototype.updateAnimation=function(a){var b=this.duration/th
(
this
.
morphTargetInfluences
[
this
.
lastKeyframe
]
=
0
,
this
.
morphTargetInfluences
[
this
.
currentKeyframe
]
=
1
,
this
.
morphTargetInfluences
[
a
]
=
0
,
this
.
lastKeyframe
=
this
.
currentKeyframe
,
this
.
currentKeyframe
=
a
);
b
=
this
.
time
%
b
/
b
;
this
.
directionBackwards
&&
(
b
=
1
-
b
);
this
.
morphTargetInfluences
[
this
.
currentKeyframe
]
=
b
;
this
.
morphTargetInfluences
[
this
.
lastKeyframe
]
=
1
-
b
};
THREE
.
MorphAnimMesh
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
MorphAnimMesh
(
this
.
geometry
,
this
.
material
));
a
.
duration
=
this
.
duration
;
a
.
mirroredLoop
=
this
.
mirroredLoop
;
a
.
time
=
this
.
time
;
a
.
lastKeyframe
=
this
.
lastKeyframe
;
a
.
currentKeyframe
=
this
.
currentKeyframe
;
a
.
direction
=
this
.
direction
;
a
.
directionBackwards
=
this
.
directionBackwards
;
THREE
.
Mesh
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
LOD
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
objects
=
[]};
THREE
.
LOD
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
LOD
.
prototype
.
addLevel
=
function
(
a
,
b
){
void
0
===
b
&&
(
b
=
0
);
b
=
Math
.
abs
(
b
);
for
(
var
c
=
0
;
c
<
this
.
objects
.
length
&&!
(
b
<
this
.
objects
[
c
].
distance
);
c
++
);
this
.
objects
.
splice
(
c
,
0
,{
distance
:
b
,
object
:
a
});
this
.
add
(
a
)};
THREE
.
LOD
.
prototype
.
getObjectForDistance
=
function
(
a
){
for
(
var
b
=
1
,
c
=
this
.
objects
.
length
;
b
<
c
&&!
(
a
<
this
.
objects
[
b
].
distance
);
b
++
);
return
this
.
objects
[
b
-
1
].
object
};
THREE
.
LOD
.
prototype
.
update
=
function
(){
var
a
=
new
THREE
.
Vector3
,
b
=
new
THREE
.
Vector3
;
return
function
(
c
){
if
(
1
<
this
.
objects
.
length
){
a
.
setFromMatrixPosition
(
c
.
matrixWorld
);
b
.
setFromMatrixPosition
(
this
.
matrixWorld
);
c
=
a
.
distanceTo
(
b
);
this
.
objects
[
0
].
object
.
visible
=!
0
;
for
(
var
d
=
1
,
e
=
this
.
objects
.
length
;
d
<
e
;
d
++
)
if
(
c
>=
this
.
objects
[
d
].
distance
)
this
.
objects
[
d
-
1
].
object
.
visible
=!
1
,
this
.
objects
[
d
].
object
.
visible
=!
0
;
else
break
;
for
(;
d
<
e
;
d
++
)
this
.
objects
[
d
].
object
.
visible
=!
1
}}}();
THREE
.
LOD
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
LOD
);
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
for
(
var
b
=
0
,
c
=
this
.
objects
.
length
;
b
<
c
;
b
++
){
var
d
=
this
.
objects
[
b
].
object
.
clone
();
d
.
visible
=
0
===
b
;
a
.
addLevel
(
d
,
this
.
objects
[
b
].
distance
)}
return
a
};
THREE
.
Sprite
=
function
(
a
){
THREE
.
Object3D
.
call
(
this
);
this
.
geometry
=
{
boundingSphere
:
new
THREE
.
Sphere
(
new
THREE
.
Vector3
,
0.5
),
addEventListener
:
function
(){}};
this
.
material
=
void
0
!==
a
?
a
:
new
THREE
.
SpriteMaterial
}
;
THREE
.
Sprite
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Sprite
.
prototype
.
updateMatrix
=
function
(){
this
.
matrix
.
compose
(
this
.
position
,
this
.
quaternion
,
this
.
scale
);
this
.
matrixWorldNeedsUpdate
=!
0
};
THREE
.
LOD
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
LOD
);
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
for
(
var
b
=
0
,
c
=
this
.
objects
.
length
;
b
<
c
;
b
++
){
var
d
=
this
.
objects
[
b
].
object
.
clone
();
d
.
visible
=
0
===
b
;
a
.
addLevel
(
d
,
this
.
objects
[
b
].
distance
)}
return
a
};
THREE
.
Sprite
=
function
(
){
var
a
=
new
THREE
.
Geometry2
(
3
);
a
.
vertices
.
set
([
-
0.5
,
-
0.5
,
0
,
0.5
,
-
0.5
,
0
,
0.5
,
0.5
,
0
]);
return
function
(
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
geometry
=
a
;
this
.
material
=
void
0
!==
b
?
b
:
new
THREE
.
SpriteMaterial
}}()
;
THREE
.
Sprite
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Sprite
.
prototype
.
updateMatrix
=
function
(){
this
.
matrix
.
compose
(
this
.
position
,
this
.
quaternion
,
this
.
scale
);
this
.
matrixWorldNeedsUpdate
=!
0
};
THREE
.
Sprite
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
Sprite
(
this
.
material
));
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
Particle
=
THREE
.
Sprite
;
THREE
.
Scene
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
overrideMaterial
=
this
.
fog
=
null
;
this
.
autoUpdate
=!
0
;
this
.
matrixAutoUpdate
=!
1
;
this
.
__lights
=
[];
this
.
__objectsAdded
=
[];
this
.
__objectsRemoved
=
[]};
THREE
.
Scene
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Scene
.
prototype
.
__addObject
=
function
(
a
){
if
(
a
instanceof
THREE
.
Light
)
-
1
===
this
.
__lights
.
indexOf
(
a
)
&&
this
.
__lights
.
push
(
a
),
a
.
target
&&
void
0
===
a
.
target
.
parent
&&
this
.
add
(
a
.
target
);
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)){
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
-
1
!==
b
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
this
.
dispatchEvent
({
type
:
"
objectAdded
"
,
object
:
a
});
a
.
dispatchEvent
({
type
:
"
addedToScene
"
,
scene
:
this
});
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__addObject
(
a
.
children
[
b
])};
THREE
.
Scene
.
prototype
.
__removeObject
=
function
(
a
){
if
(
a
instanceof
THREE
.
Light
){
var
b
=
this
.
__lights
.
indexOf
(
a
);
-
1
!==
b
&&
this
.
__lights
.
splice
(
b
,
1
);
if
(
a
.
shadowCascadeArray
)
for
(
b
=
0
;
b
<
a
.
shadowCascadeArray
.
length
;
b
++
)
this
.
__removeObject
(
a
.
shadowCascadeArray
[
b
])}
else
a
instanceof
THREE
.
Camera
||
(
this
.
__objectsRemoved
.
push
(
a
),
b
=
this
.
__objectsAdded
.
indexOf
(
a
),
-
1
!==
b
&&
this
.
__objectsAdded
.
splice
(
b
,
1
));
this
.
dispatchEvent
({
type
:
"
objectRemoved
"
,
object
:
a
});
a
.
dispatchEvent
({
type
:
"
removedFromScene
"
,
scene
:
this
});
for
(
b
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录