Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
9eed9c5e
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,发现更多精彩内容 >>
提交
9eed9c5e
编写于
7月 20, 2015
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
f593b206
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
16 deletion
+8
-16
build/three.js
build/three.js
+0
-7
build/three.min.js
build/three.min.js
+8
-9
未找到文件。
build/three.js
浏览文件 @
9eed9c5e
...
...
@@ -15950,7 +15950,6 @@ THREE.Texture.prototype = {
if ( value === true ) {
this.version ++;
this.update();
}
...
...
@@ -16078,12 +16077,6 @@ THREE.Texture.prototype = {
},
update: function () {
this.dispatchEvent( { type: 'update' } );
},
dispose: function () {
this.dispatchEvent( { type: 'dispose' } );
...
...
build/three.min.js
浏览文件 @
9eed9c5e
...
...
@@ -366,15 +366,14 @@ THREE.RawShaderMaterial.prototype.constructor=THREE.RawShaderMaterial;THREE.RawS
THREE
.
SpriteMaterial
.
prototype
.
constructor
=
THREE
.
SpriteMaterial
;
THREE
.
SpriteMaterial
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
SpriteMaterial
;
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
color
.
copy
(
this
.
color
);
a
.
map
=
this
.
map
;
a
.
rotation
=
this
.
rotation
;
a
.
fog
=
this
.
fog
;
return
a
};
THREE
.
Texture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
){
Object
.
defineProperty
(
this
,
"
id
"
,{
value
:
THREE
.
TextureIdCount
++
});
this
.
uuid
=
THREE
.
Math
.
generateUUID
();
this
.
sourceFile
=
this
.
name
=
""
;
this
.
image
=
void
0
!==
a
?
a
:
THREE
.
Texture
.
DEFAULT_IMAGE
;
this
.
mipmaps
=
[];
this
.
mapping
=
void
0
!==
b
?
b
:
THREE
.
Texture
.
DEFAULT_MAPPING
;
this
.
wrapS
=
void
0
!==
c
?
c
:
THREE
.
ClampToEdgeWrapping
;
this
.
wrapT
=
void
0
!==
d
?
d
:
THREE
.
ClampToEdgeWrapping
;
this
.
magFilter
=
void
0
!==
e
?
e
:
THREE
.
LinearFilter
;
this
.
minFilter
=
void
0
!==
g
?
g
:
THREE
.
LinearMipMapLinearFilter
;
this
.
anisotropy
=
void
0
!==
k
?
k
:
1
;
this
.
format
=
void
0
!==
f
?
f
:
THREE
.
RGBAFormat
;
this
.
type
=
void
0
!==
h
?
h
:
THREE
.
UnsignedByteType
;
this
.
offset
=
new
THREE
.
Vector2
(
0
,
0
);
this
.
repeat
=
new
THREE
.
Vector2
(
1
,
1
);
this
.
generateMipmaps
=!
0
;
this
.
premultiplyAlpha
=!
1
;
this
.
flipY
=!
0
;
this
.
unpackAlignment
=
4
;
this
.
version
=
0
;
this
.
onUpdate
=
null
};
THREE
.
Texture
.
DEFAULT_IMAGE
=
void
0
;
THREE
.
Texture
.
DEFAULT_MAPPING
=
THREE
.
UVMapping
;
THREE
.
Texture
.
prototype
=
{
constructor
:
THREE
.
Texture
,
set
needsUpdate
(
a
){
!
0
===
a
&&
(
this
.
version
++
,
this
.
update
())},
clone
:
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
Texture
);
a
.
image
=
this
.
image
;
a
.
mipmaps
=
this
.
mipmaps
.
slice
(
0
);
a
.
mapping
=
this
.
mapping
;
a
.
wrapS
=
this
.
wrapS
;
a
.
wrapT
=
this
.
wrapT
;
a
.
magFilter
=
this
.
magFilter
;
a
.
minFilter
=
this
.
minFilter
;
a
.
anisotropy
=
this
.
anisotropy
;
a
.
format
=
this
.
format
;
a
.
type
=
this
.
type
;
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
premultiplyAlpha
=
this
.
premultiplyAlpha
;
a
.
flipY
=
this
.
flipY
;
a
.
unpackAlignment
=
this
.
unpackAlignment
;
return
a
},
toJSON
:
function
(
a
){
if
(
void
0
!==
a
.
textures
[
this
.
uuid
])
return
a
.
textures
[
this
.
uuid
];
var
b
=
{
metadata
:{
version
:
4.4
,
type
:
"
Texture
"
,
generator
:
"
Texture.toJSON
"
},
uuid
:
this
.
uuid
,
name
:
this
.
name
,
mapping
:
this
.
mapping
,
repeat
:[
this
.
repeat
.
x
,
this
.
repeat
.
y
],
offset
:[
this
.
offset
.
x
,
this
.
offset
.
y
],
wrap
:[
this
.
wrapS
,
this
.
wrapT
],
minFilter
:
this
.
minFilter
,
magFilter
:
this
.
magFilter
,
anisotropy
:
this
.
anisotropy
};
if
(
void
0
!==
this
.
image
){
var
c
=
this
.
image
;
void
0
===
c
.
uuid
&&
(
c
.
uuid
=
THREE
.
Math
.
generateUUID
());
if
(
void
0
===
a
.
images
[
c
.
uuid
]){
var
d
=
a
.
images
,
e
=
c
.
uuid
,
g
=
c
.
uuid
,
f
;
void
0
!==
c
.
toDataURL
?
f
=
c
:(
f
=
document
.
createElement
(
"
canvas
"
),
f
.
width
=
c
.
width
,
f
.
height
=
c
.
height
,
f
.
getContext
(
"
2d
"
).
drawImage
(
c
,
0
,
0
,
c
.
width
,
c
.
height
));
f
=
2048
<
f
.
width
||
2048
<
f
.
height
?
f
.
toDataURL
(
"
image/jpeg
"
,.
6
):
f
.
toDataURL
(
"
image/png
"
);
d
[
e
]
=
{
uuid
:
g
,
url
:
f
}}
b
.
image
=
c
.
uuid
}
return
a
.
textures
[
this
.
uuid
]
=
b
},
update
:
function
(){
this
.
dispatchEvent
({
type
:
"
update
"
})},
dispose
:
function
(){
this
.
dispatchEvent
({
type
:
"
dispose
"
})}};
THREE
.
EventDispatcher
.
prototype
.
apply
(
THREE
.
Texture
.
prototype
);
THREE
.
TextureIdCount
=
0
;
THREE
.
CubeTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
){
b
=
void
0
!==
b
?
b
:
THREE
.
CubeReflectionMapping
;
THREE
.
Texture
.
call
(
this
,
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
);
this
.
images
=
a
;
this
.
flipY
=!
1
};
THREE
.
CubeTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
CubeTexture
.
prototype
.
constructor
=
THREE
.
CubeTexture
;
THREE
.
CubeTexture
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
CubeTexture
);
THREE
.
Texture
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
images
=
this
.
images
;
return
a
};
THREE
.
CompressedTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
,
l
,
n
){
THREE
.
Texture
.
call
(
this
,
null
,
g
,
f
,
h
,
k
,
l
,
d
,
e
,
n
);
this
.
image
=
{
width
:
b
,
height
:
c
};
this
.
mipmaps
=
a
;
this
.
generateMipmaps
=
this
.
flipY
=!
1
};
THREE
.
CompressedTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
CompressedTexture
.
prototype
.
constructor
=
THREE
.
CompressedTexture
;
THREE
.
CompressedTexture
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
CompressedTexture
;
THREE
.
Texture
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
DataTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
,
l
,
n
){
THREE
.
Texture
.
call
(
this
,
null
,
g
,
f
,
h
,
k
,
l
,
d
,
e
,
n
);
this
.
image
=
{
data
:
a
,
width
:
b
,
height
:
c
}};
THREE
.
DataTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
DataTexture
.
prototype
.
constructor
=
THREE
.
DataTexture
;
THREE
.
DataTexture
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
DataTexture
;
THREE
.
Texture
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
VideoTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
){
THREE
.
Texture
.
call
(
this
,
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
);
this
.
generateMipmaps
=!
1
;
var
l
=
this
,
n
=
function
(){
requestAnimationFrame
(
n
);
a
.
readyState
===
a
.
HAVE_ENOUGH_DATA
&&
(
l
.
needsUpdate
=!
0
)};
n
()};
THREE
.
VideoTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
VideoTexture
.
prototype
.
constructor
=
THREE
.
VideoTexture
;
THREE
.
Group
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
type
=
"
Group
"
};
THREE
.
Group
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Group
.
prototype
.
constructor
=
THREE
.
Group
;
THREE
.
Group
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
Group
);
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
PointCloud
=
function
(
a
,
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
type
=
"
PointCloud
"
;
this
.
geometry
=
void
0
!==
a
?
a
:
new
THREE
.
Geometry
;
this
.
material
=
void
0
!==
b
?
b
:
new
THREE
.
PointCloudMaterial
({
color
:
16777215
*
Math
.
random
()})};
THREE
.
PointCloud
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
PointCloud
.
prototype
.
constructor
=
THREE
.
PointCloud
;
THREE
.
Texture
.
prototype
=
{
constructor
:
THREE
.
Texture
,
set
needsUpdate
(
a
){
!
0
===
a
&&
this
.
version
++
},
clone
:
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
Texture
);
a
.
image
=
this
.
image
;
a
.
mipmaps
=
this
.
mipmaps
.
slice
(
0
);
a
.
mapping
=
this
.
mapping
;
a
.
wrapS
=
this
.
wrapS
;
a
.
wrapT
=
this
.
wrapT
;
a
.
magFilter
=
this
.
magFilter
;
a
.
minFilter
=
this
.
minFilter
;
a
.
anisotropy
=
this
.
anisotropy
;
a
.
format
=
this
.
format
;
a
.
type
=
this
.
type
;
a
.
offset
.
copy
(
this
.
offset
);
a
.
repeat
.
copy
(
this
.
repeat
);
a
.
generateMipmaps
=
this
.
generateMipmaps
;
a
.
premultiplyAlpha
=
this
.
premultiplyAlpha
;
a
.
flipY
=
this
.
flipY
;
a
.
unpackAlignment
=
this
.
unpackAlignment
;
return
a
},
toJSON
:
function
(
a
){
if
(
void
0
!==
a
.
textures
[
this
.
uuid
])
return
a
.
textures
[
this
.
uuid
];
var
b
=
{
metadata
:{
version
:
4.4
,
type
:
"
Texture
"
,
generator
:
"
Texture.toJSON
"
},
uuid
:
this
.
uuid
,
name
:
this
.
name
,
mapping
:
this
.
mapping
,
repeat
:[
this
.
repeat
.
x
,
this
.
repeat
.
y
],
offset
:[
this
.
offset
.
x
,
this
.
offset
.
y
],
wrap
:[
this
.
wrapS
,
this
.
wrapT
],
minFilter
:
this
.
minFilter
,
magFilter
:
this
.
magFilter
,
anisotropy
:
this
.
anisotropy
};
if
(
void
0
!==
this
.
image
){
var
c
=
this
.
image
;
void
0
===
c
.
uuid
&&
(
c
.
uuid
=
THREE
.
Math
.
generateUUID
());
if
(
void
0
===
a
.
images
[
c
.
uuid
]){
var
d
=
a
.
images
,
e
=
c
.
uuid
,
g
=
c
.
uuid
,
f
;
void
0
!==
c
.
toDataURL
?
f
=
c
:(
f
=
document
.
createElement
(
"
canvas
"
),
f
.
width
=
c
.
width
,
f
.
height
=
c
.
height
,
f
.
getContext
(
"
2d
"
).
drawImage
(
c
,
0
,
0
,
c
.
width
,
c
.
height
));
f
=
2048
<
f
.
width
||
2048
<
f
.
height
?
f
.
toDataURL
(
"
image/jpeg
"
,.
6
):
f
.
toDataURL
(
"
image/png
"
);
d
[
e
]
=
{
uuid
:
g
,
url
:
f
}}
b
.
image
=
c
.
uuid
}
return
a
.
textures
[
this
.
uuid
]
=
b
},
dispose
:
function
(){
this
.
dispatchEvent
({
type
:
"
dispose
"
})}};
THREE
.
EventDispatcher
.
prototype
.
apply
(
THREE
.
Texture
.
prototype
);
THREE
.
TextureIdCount
=
0
;
THREE
.
CubeTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
){
b
=
void
0
!==
b
?
b
:
THREE
.
CubeReflectionMapping
;
THREE
.
Texture
.
call
(
this
,
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
);
this
.
images
=
a
;
this
.
flipY
=!
1
};
THREE
.
CubeTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
CubeTexture
.
prototype
.
constructor
=
THREE
.
CubeTexture
;
THREE
.
CubeTexture
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
CubeTexture
);
THREE
.
Texture
.
prototype
.
clone
.
call
(
this
,
a
);
a
.
images
=
this
.
images
;
return
a
};
THREE
.
CompressedTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
,
l
,
n
){
THREE
.
Texture
.
call
(
this
,
null
,
g
,
f
,
h
,
k
,
l
,
d
,
e
,
n
);
this
.
image
=
{
width
:
b
,
height
:
c
};
this
.
mipmaps
=
a
;
this
.
generateMipmaps
=
this
.
flipY
=!
1
};
THREE
.
CompressedTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
CompressedTexture
.
prototype
.
constructor
=
THREE
.
CompressedTexture
;
THREE
.
CompressedTexture
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
CompressedTexture
;
THREE
.
Texture
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
DataTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
,
l
,
n
){
THREE
.
Texture
.
call
(
this
,
null
,
g
,
f
,
h
,
k
,
l
,
d
,
e
,
n
);
this
.
image
=
{
data
:
a
,
width
:
b
,
height
:
c
}};
THREE
.
DataTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
DataTexture
.
prototype
.
constructor
=
THREE
.
DataTexture
;
THREE
.
DataTexture
.
prototype
.
clone
=
function
(){
var
a
=
new
THREE
.
DataTexture
;
THREE
.
Texture
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
VideoTexture
=
function
(
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
){
THREE
.
Texture
.
call
(
this
,
a
,
b
,
c
,
d
,
e
,
g
,
f
,
h
,
k
);
this
.
generateMipmaps
=!
1
;
var
l
=
this
,
n
=
function
(){
requestAnimationFrame
(
n
);
a
.
readyState
===
a
.
HAVE_ENOUGH_DATA
&&
(
l
.
needsUpdate
=!
0
)};
n
()};
THREE
.
VideoTexture
.
prototype
=
Object
.
create
(
THREE
.
Texture
.
prototype
);
THREE
.
VideoTexture
.
prototype
.
constructor
=
THREE
.
VideoTexture
;
THREE
.
Group
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
type
=
"
Group
"
};
THREE
.
Group
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Group
.
prototype
.
constructor
=
THREE
.
Group
;
THREE
.
Group
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
Group
);
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
THREE
.
PointCloud
=
function
(
a
,
b
){
THREE
.
Object3D
.
call
(
this
);
this
.
type
=
"
PointCloud
"
;
this
.
geometry
=
void
0
!==
a
?
a
:
new
THREE
.
Geometry
;
this
.
material
=
void
0
!==
b
?
b
:
new
THREE
.
PointCloudMaterial
({
color
:
16777215
*
Math
.
random
()})};
THREE
.
PointCloud
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
PointCloud
.
prototype
.
constructor
=
THREE
.
PointCloud
;
THREE
.
PointCloud
.
prototype
.
raycast
=
function
(){
var
a
=
new
THREE
.
Matrix4
,
b
=
new
THREE
.
Ray
;
return
function
(
c
,
d
){
var
e
=
this
,
g
=
e
.
geometry
,
f
=
c
.
params
.
PointCloud
.
threshold
;
a
.
getInverse
(
this
.
matrixWorld
);
b
.
copy
(
c
.
ray
).
applyMatrix4
(
a
);
if
(
null
===
g
.
boundingBox
||!
1
!==
b
.
isIntersectionBox
(
g
.
boundingBox
)){
var
f
=
f
/
((
this
.
scale
.
x
+
this
.
scale
.
y
+
this
.
scale
.
z
)
/
3
),
h
=
f
*
f
,
k
=
new
THREE
.
Vector3
,
f
=
function
(
a
,
f
){
var
g
=
b
.
distanceSqToPoint
(
a
);
if
(
g
<
h
){
var
k
=
b
.
closestPointToPoint
(
a
);
k
.
applyMatrix4
(
e
.
matrixWorld
);
var
l
=
c
.
ray
.
origin
.
distanceTo
(
k
);
l
<
c
.
near
||
l
>
c
.
far
||
d
.
push
({
distance
:
l
,
distanceToRay
:
Math
.
sqrt
(
g
),
point
:
k
.
clone
(),
index
:
f
,
face
:
null
,
object
:
e
})}};
if
(
g
instanceof
THREE
.
BufferGeometry
){
var
l
=
g
.
attributes
,
n
=
l
.
position
.
array
;
if
(
void
0
!==
l
.
index
){
var
l
=
l
.
index
.
array
,
p
=
g
.
drawcalls
;
0
===
p
.
length
&&
(
p
=
[{
start
:
0
,
count
:
l
.
length
,
index
:
0
}]);
for
(
var
m
=
0
,
q
=
p
.
length
;
m
<
q
;
++
m
)
for
(
var
r
=
p
[
m
],
s
=
r
.
start
,
u
=
r
.
index
,
g
=
s
,
r
=
s
+
r
.
count
;
g
<
r
;
g
++
)
s
=
u
+
l
[
g
],
k
.
fromArray
(
n
,
3
*
s
),
f
(
k
,
s
)}
else
for
(
g
=
0
,
l
=
n
.
length
/
3
;
g
<
l
;
g
++
)
k
.
fromArray
(
n
,
3
*
g
),
f
(
k
,
g
)}
else
for
(
k
=
g
.
vertices
,
g
=
0
,
l
=
k
.
length
;
g
<
l
;
g
++
)
f
(
k
[
g
],
g
)}}}();
THREE
.
PointCloud
.
prototype
.
clone
=
function
(
a
){
void
0
===
a
&&
(
a
=
new
THREE
.
PointCloud
(
this
.
geometry
,
this
.
material
));
THREE
.
Object3D
.
prototype
.
clone
.
call
(
this
,
a
);
return
a
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录