Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
1b15f3d2
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,发现更多精彩内容 >>
提交
1b15f3d2
编写于
4月 09, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
6d4fe3f8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
13 deletion
+10
-13
build/three.js
build/three.js
+9
-12
build/three.min.js
build/three.min.js
+1
-1
未找到文件。
build/three.js
浏览文件 @
1b15f3d2
...
...
@@ -29079,8 +29079,12 @@ THREE.ImageUtils = {
var images = [];
images.loadCount = 0;
var loader = new THREE.ImageLoader();
loader.crossOrigin = this.crossOrigin;
var texture = new THREE.Texture();
texture.image = images;
if ( mapping !== undefined ) texture.mapping = mapping;
// no flipping needed for cube textures
...
...
@@ -29089,10 +29093,7 @@ THREE.ImageUtils = {
for ( var i = 0, il = array.length; i < il; ++ i ) {
var cubeImage = new Image();
images[ i ] = cubeImage;
cubeImage.onload = function () {
var cubeImage = loader.load( array[i], function () {
images.loadCount += 1;
...
...
@@ -29103,15 +29104,11 @@ THREE.ImageUtils = {
}
};
cubeImage.onerror = onError;
cubeImage.crossOrigin = this.crossOrigin;
cubeImage.src = array[ i ];
} );
images[ i ] = cubeImage;
}
return texture;
},
...
...
build/three.min.js
浏览文件 @
1b15f3d2
...
...
@@ -573,7 +573,7 @@ n;this.vertexShader=h;this.fragmentShader=g;return this}}();THREE.WebGLShader=fu
a
.
copy
(
c
);
a
.
multiplyScalar
(
g
);
e
.
add
(
a
);
a
.
copy
(
d
);
a
.
multiplyScalar
(
h
);
e
.
add
(
a
);
return
e
}}(),
randomPointInFace
:
function
(
a
,
b
,
c
){
return
THREE
.
GeometryUtils
.
randomPointInTriangle
(
b
.
vertices
[
a
.
a
],
b
.
vertices
[
a
.
b
],
b
.
vertices
[
a
.
c
])},
randomPointsInGeometry
:
function
(
a
,
b
){
function
c
(
a
){
function
b
(
c
,
d
){
if
(
d
<
c
)
return
c
;
var
e
=
c
+
Math
.
floor
((
d
-
c
)
/
2
);
return
l
[
e
]
>
a
?
b
(
c
,
e
-
1
):
l
[
e
]
<
a
?
b
(
e
+
1
,
d
):
e
}
return
b
(
0
,
l
.
length
-
1
)}
var
d
,
e
,
f
=
a
.
faces
,
g
=
a
.
vertices
,
h
=
f
.
length
,
k
=
0
,
l
=
[],
n
,
r
,
p
;
for
(
e
=
0
;
e
<
h
;
e
++
)
d
=
f
[
e
],
n
=
g
[
d
.
a
],
r
=
g
[
d
.
b
],
p
=
g
[
d
.
c
],
d
.
_area
=
THREE
.
GeometryUtils
.
triangleArea
(
n
,
r
,
p
),
k
+=
d
.
_area
,
l
[
e
]
=
k
;
d
=
[];
for
(
e
=
0
;
e
<
b
;
e
++
)
g
=
THREE
.
Math
.
random16
()
*
k
,
g
=
c
(
g
),
d
[
e
]
=
THREE
.
GeometryUtils
.
randomPointInFace
(
f
[
g
],
a
,
!
0
);
return
d
},
triangleArea
:
function
(){
var
a
=
new
THREE
.
Vector3
,
b
=
new
THREE
.
Vector3
;
return
function
(
c
,
d
,
e
){
a
.
subVectors
(
d
,
c
);
b
.
subVectors
(
e
,
c
);
a
.
cross
(
b
);
return
0.5
*
a
.
length
()}}(),
center
:
function
(
a
){
a
.
computeBoundingBox
();
var
b
=
a
.
boundingBox
,
c
=
new
THREE
.
Vector3
;
c
.
addVectors
(
b
.
min
,
b
.
max
);
c
.
multiplyScalar
(
-
0.5
);
a
.
applyMatrix
((
new
THREE
.
Matrix4
).
makeTranslation
(
c
.
x
,
c
.
y
,
c
.
z
));
a
.
computeBoundingBox
();
return
c
}};
THREE
.
ImageUtils
=
{
crossOrigin
:
void
0
,
loadTexture
:
function
(
a
,
b
,
c
,
d
){
var
e
=
new
THREE
.
ImageLoader
;
e
.
crossOrigin
=
this
.
crossOrigin
;
var
f
=
new
THREE
.
Texture
(
void
0
,
b
);
b
=
e
.
load
(
a
,
function
(){
f
.
needsUpdate
=!
0
;
c
&&
c
(
f
)},
void
0
,
function
(
a
){
d
&&
d
(
a
)});
f
.
image
=
b
;
f
.
sourceFile
=
a
;
return
f
},
loadCompressedTexture
:
function
(
a
,
b
,
c
,
d
){
var
e
=
new
THREE
.
CompressedTexture
;
e
.
mapping
=
b
;
var
f
=
new
XMLHttpRequest
;
f
.
onload
=
function
(){
var
a
=
THREE
.
ImageUtils
.
parseDDS
(
f
.
response
,
!
0
);
e
.
format
=
a
.
format
;
e
.
mipmaps
=
a
.
mipmaps
;
e
.
image
.
width
=
a
.
width
;
e
.
image
.
height
=
a
.
height
;
e
.
generateMipmaps
=!
1
;
e
.
needsUpdate
=!
0
;
c
&&
c
(
e
)};
f
.
onerror
=
d
;
f
.
open
(
"
GET
"
,
a
,
!
0
);
f
.
responseType
=
"
arraybuffer
"
;
f
.
send
(
null
);
return
e
},
loadTextureCube
:
function
(
a
,
b
,
c
,
d
){
var
e
=
[];
e
.
loadCount
=
0
;
var
f
=
new
THREE
.
Texture
;
f
.
image
=
e
;
void
0
!==
b
&&
(
f
.
mapping
=
b
);
f
.
flipY
=!
1
;
b
=
0
;
for
(
var
g
=
a
.
length
;
b
<
g
;
++
b
){
var
h
=
new
Image
;
e
[
b
]
=
h
;
h
.
onload
=
function
(){
e
.
loadCount
+=
1
;
6
===
e
.
loadCount
&&
(
f
.
needsUpdate
=!
0
,
c
&&
c
(
f
))};
h
.
onerror
=
d
;
h
.
crossOrigin
=
this
.
crossOrigin
;
h
.
src
=
a
[
b
]
}
return
f
},
loadCompressedTextureCube
:
function
(
a
,
a
.
width
;
e
.
image
.
height
=
a
.
height
;
e
.
generateMipmaps
=!
1
;
e
.
needsUpdate
=!
0
;
c
&&
c
(
e
)};
f
.
onerror
=
d
;
f
.
open
(
"
GET
"
,
a
,
!
0
);
f
.
responseType
=
"
arraybuffer
"
;
f
.
send
(
null
);
return
e
},
loadTextureCube
:
function
(
a
,
b
,
c
,
d
){
var
e
=
[];
e
.
loadCount
=
0
;
d
=
new
THREE
.
ImageLoader
;
d
.
crossOrigin
=
this
.
crossOrigin
;
var
f
=
new
THREE
.
Texture
;
f
.
image
=
e
;
void
0
!==
b
&&
(
f
.
mapping
=
b
);
f
.
flipY
=!
1
;
b
=
0
;
for
(
var
g
=
a
.
length
;
b
<
g
;
++
b
){
var
h
=
d
.
load
(
a
[
b
],
function
(){
e
.
loadCount
+=
1
;
6
===
e
.
loadCount
&&
(
f
.
needsUpdate
=!
0
,
c
&&
c
(
f
))});
e
[
b
]
=
h
}
return
f
},
loadCompressedTextureCube
:
function
(
a
,
b
,
c
,
d
){
var
e
=
[];
e
.
loadCount
=
0
;
var
f
=
new
THREE
.
CompressedTexture
;
f
.
image
=
e
;
void
0
!==
b
&&
(
f
.
mapping
=
b
);
f
.
flipY
=!
1
;
f
.
generateMipmaps
=!
1
;
b
=
function
(
a
,
b
){
return
function
(){
var
d
=
THREE
.
ImageUtils
.
parseDDS
(
a
.
response
,
!
0
);
b
.
format
=
d
.
format
;
b
.
mipmaps
=
d
.
mipmaps
;
b
.
width
=
d
.
width
;
b
.
height
=
d
.
height
;
e
.
loadCount
+=
1
;
6
===
e
.
loadCount
&&
(
f
.
format
=
d
.
format
,
f
.
needsUpdate
=!
0
,
c
&&
c
(
f
))}};
if
(
a
instanceof
Array
)
for
(
var
g
=
0
,
h
=
a
.
length
;
g
<
h
;
++
g
){
var
k
=
{};
e
[
g
]
=
k
;
var
l
=
new
XMLHttpRequest
;
l
.
onload
=
b
(
l
,
k
);
l
.
onerror
=
d
;
k
=
a
[
g
];
l
.
open
(
"
GET
"
,
k
,
!
0
);
l
.
responseType
=
"
arraybuffer
"
;
l
.
send
(
null
)}
else
l
=
new
XMLHttpRequest
,
l
.
onload
=
function
(){
var
a
=
THREE
.
ImageUtils
.
parseDDS
(
l
.
response
,
!
0
);
if
(
a
.
isCubemap
){
for
(
var
b
=
a
.
mipmaps
.
length
/
a
.
mipmapCount
,
d
=
0
;
d
<
b
;
d
++
){
e
[
d
]
=
{
mipmaps
:[]};
for
(
var
g
=
0
;
g
<
a
.
mipmapCount
;
g
++
)
e
[
d
].
mipmaps
.
push
(
a
.
mipmaps
[
d
*
a
.
mipmapCount
+
g
]),
e
[
d
].
format
=
a
.
format
,
e
[
d
].
width
=
a
.
width
,
e
[
d
].
height
=
a
.
height
}
f
.
format
=
a
.
format
;
f
.
needsUpdate
=!
0
;
c
&&
c
(
f
)}},
l
.
onerror
=
d
,
l
.
open
(
"
GET
"
,
a
,
!
0
),
l
.
responseType
=
"
arraybuffer
"
,
l
.
send
(
null
);
return
f
},
loadDDSTexture
:
function
(
a
,
b
,
c
,
d
){
var
e
=
[];
e
.
loadCount
=
0
;
var
f
=
new
THREE
.
CompressedTexture
;
f
.
image
=
e
;
void
0
!==
b
&&
(
f
.
mapping
=
b
);
f
.
flipY
=!
1
;
f
.
generateMipmaps
=!
1
;
var
g
=
new
XMLHttpRequest
;
g
.
onload
=
function
(){
var
a
=
THREE
.
ImageUtils
.
parseDDS
(
g
.
response
,
!
0
);
if
(
a
.
isCubemap
)
for
(
var
b
=
a
.
mipmaps
.
length
/
a
.
mipmapCount
,
d
=
0
;
d
<
b
;
d
++
){
e
[
d
]
=
{
mipmaps
:[]};
for
(
var
n
=
0
;
n
<
a
.
mipmapCount
;
n
++
)
e
[
d
].
mipmaps
.
push
(
a
.
mipmaps
[
d
*
a
.
mipmapCount
+
n
]),
e
[
d
].
format
=
a
.
format
,
e
[
d
].
width
=
a
.
width
,
e
[
d
].
height
=
a
.
height
}
else
f
.
image
.
width
=
a
.
width
,
f
.
image
.
height
=
a
.
height
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录