Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
fbf28ffe
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,发现更多精彩内容 >>
提交
fbf28ffe
编写于
7月 28, 2012
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
d7dcc6cd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
3 deletion
+3
-3
build/Three.js
build/Three.js
+1
-1
build/custom/ThreeCanvas.js
build/custom/ThreeCanvas.js
+1
-1
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+1
-1
未找到文件。
build/Three.js
浏览文件 @
fbf28ffe
...
...
@@ -236,7 +236,7 @@ a.useScreenCoordinates:true;this.mergeWith3D=a.mergeWith3D!==void 0?a.mergeWith3
new
THREE
.
Vector2
(
1
,
1
)};
THREE
.
Sprite
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Sprite
.
prototype
.
updateMatrix
=
function
(){
this
.
matrix
.
setPosition
(
this
.
position
);
this
.
rotation3d
.
set
(
0
,
0
,
this
.
rotation
);
this
.
matrix
.
setRotationFromEuler
(
this
.
rotation3d
);
if
(
this
.
scale
.
x
!==
1
||
this
.
scale
.
y
!==
1
){
this
.
matrix
.
scale
(
this
.
scale
);
this
.
boundRadiusScale
=
Math
.
max
(
this
.
scale
.
x
,
this
.
scale
.
y
)}
this
.
matrixWorldNeedsUpdate
=
true
};
THREE
.
SpriteAlignment
=
{};
THREE
.
SpriteAlignment
.
topLeft
=
new
THREE
.
Vector2
(
1
,
-
1
);
THREE
.
SpriteAlignment
.
topCenter
=
new
THREE
.
Vector2
(
0
,
-
1
);
THREE
.
SpriteAlignment
.
topRight
=
new
THREE
.
Vector2
(
-
1
,
-
1
);
THREE
.
SpriteAlignment
.
centerLeft
=
new
THREE
.
Vector2
(
1
,
0
);
THREE
.
SpriteAlignment
.
center
=
new
THREE
.
Vector2
(
0
,
0
);
THREE
.
SpriteAlignment
.
centerRight
=
new
THREE
.
Vector2
(
-
1
,
0
);
THREE
.
SpriteAlignment
.
bottomLeft
=
new
THREE
.
Vector2
(
1
,
1
);
THREE
.
SpriteAlignment
.
bottomCenter
=
new
THREE
.
Vector2
(
0
,
1
);
THREE
.
SpriteAlignment
.
bottomRight
=
new
THREE
.
Vector2
(
-
1
,
1
);
THREE
.
Scene
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
overrideMaterial
=
this
.
fog
=
null
;
this
.
matrixAutoUpdate
=
false
;
this
.
__objects
=
[];
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
)
this
.
__lights
.
indexOf
(
a
)
===-
1
&&
this
.
__lights
.
push
(
a
);
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)
&&
this
.
__objects
.
indexOf
(
a
)
===-
1
){
this
.
__objects
.
push
(
a
);
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__addObject
(
a
.
children
[
b
])};
THREE
.
Scene
.
prototype
.
__addObject
=
function
(
a
){
if
(
a
instanceof
THREE
.
Light
)
{
this
.
__lights
.
indexOf
(
a
)
===-
1
&&
this
.
__lights
.
push
(
a
);
a
.
target
&&
a
.
target
.
parent
===
void
0
&&
this
.
add
(
a
.
target
)}
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)
&&
this
.
__objects
.
indexOf
(
a
)
===-
1
){
this
.
__objects
.
push
(
a
);
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
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
);
b
!==-
1
&&
this
.
__lights
.
splice
(
b
,
1
)}
else
if
(
!
(
a
instanceof
THREE
.
Camera
)){
b
=
this
.
__objects
.
indexOf
(
a
);
if
(
b
!==-
1
){
this
.
__objects
.
splice
(
b
,
1
);
this
.
__objectsRemoved
.
push
(
a
);
b
=
this
.
__objectsAdded
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsAdded
.
splice
(
b
,
1
)}}
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__removeObject
(
a
.
children
[
b
])};
THREE
.
Fog
=
function
(
a
,
b
,
c
){
this
.
color
=
new
THREE
.
Color
(
a
);
this
.
near
=
b
!==
void
0
?
b
:
1
;
this
.
far
=
c
!==
void
0
?
c
:
1
E3
};
THREE
.
FogExp2
=
function
(
a
,
b
){
this
.
color
=
new
THREE
.
Color
(
a
);
this
.
density
=
b
!==
void
0
?
b
:
2.5
E
-
4
};
THREE
.
CanvasRenderer
=
function
(
a
){
function
b
(
a
){
if
(
u
!==
a
)
u
=
m
.
globalAlpha
=
a
}
function
c
(
a
){
if
(
t
!==
a
){
if
(
a
===
THREE
.
NormalBlending
)
m
.
globalCompositeOperation
=
"
source-over
"
;
else
if
(
a
===
THREE
.
AdditiveBlending
)
m
.
globalCompositeOperation
=
"
lighter
"
;
else
if
(
a
===
THREE
.
SubtractiveBlending
)
m
.
globalCompositeOperation
=
"
darker
"
;
t
=
a
}}
function
d
(
a
){
if
(
v
!==
a
)
v
=
m
.
strokeStyle
=
a
}
function
e
(
a
){
if
(
x
!==
a
)
x
=
m
.
fillStyle
=
a
}
console
.
log
(
"
THREE.CanvasRenderer
"
,
THREE
.
REVISION
);
var
a
=
a
||
{},
f
=
this
,
g
,
h
,
j
,
i
=
new
THREE
.
Projector
,
l
=
a
.
canvas
!==
...
...
build/custom/ThreeCanvas.js
浏览文件 @
fbf28ffe
...
...
@@ -210,7 +210,7 @@ void 0?a.useScreenCoordinates:true;this.mergeWith3D=a.mergeWith3D!==void 0?a.mer
new
THREE
.
Vector2
(
1
,
1
)};
THREE
.
Sprite
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Sprite
.
prototype
.
updateMatrix
=
function
(){
this
.
matrix
.
setPosition
(
this
.
position
);
this
.
rotation3d
.
set
(
0
,
0
,
this
.
rotation
);
this
.
matrix
.
setRotationFromEuler
(
this
.
rotation3d
);
if
(
this
.
scale
.
x
!==
1
||
this
.
scale
.
y
!==
1
){
this
.
matrix
.
scale
(
this
.
scale
);
this
.
boundRadiusScale
=
Math
.
max
(
this
.
scale
.
x
,
this
.
scale
.
y
)}
this
.
matrixWorldNeedsUpdate
=
true
};
THREE
.
SpriteAlignment
=
{};
THREE
.
SpriteAlignment
.
topLeft
=
new
THREE
.
Vector2
(
1
,
-
1
);
THREE
.
SpriteAlignment
.
topCenter
=
new
THREE
.
Vector2
(
0
,
-
1
);
THREE
.
SpriteAlignment
.
topRight
=
new
THREE
.
Vector2
(
-
1
,
-
1
);
THREE
.
SpriteAlignment
.
centerLeft
=
new
THREE
.
Vector2
(
1
,
0
);
THREE
.
SpriteAlignment
.
center
=
new
THREE
.
Vector2
(
0
,
0
);
THREE
.
SpriteAlignment
.
centerRight
=
new
THREE
.
Vector2
(
-
1
,
0
);
THREE
.
SpriteAlignment
.
bottomLeft
=
new
THREE
.
Vector2
(
1
,
1
);
THREE
.
SpriteAlignment
.
bottomCenter
=
new
THREE
.
Vector2
(
0
,
1
);
THREE
.
SpriteAlignment
.
bottomRight
=
new
THREE
.
Vector2
(
-
1
,
1
);
THREE
.
Scene
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
overrideMaterial
=
this
.
fog
=
null
;
this
.
matrixAutoUpdate
=
false
;
this
.
__objects
=
[];
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
)
this
.
__lights
.
indexOf
(
a
)
===-
1
&&
this
.
__lights
.
push
(
a
);
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)
&&
this
.
__objects
.
indexOf
(
a
)
===-
1
){
this
.
__objects
.
push
(
a
);
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__addObject
(
a
.
children
[
b
])};
THREE
.
Scene
.
prototype
.
__addObject
=
function
(
a
){
if
(
a
instanceof
THREE
.
Light
)
{
this
.
__lights
.
indexOf
(
a
)
===-
1
&&
this
.
__lights
.
push
(
a
);
a
.
target
&&
a
.
target
.
parent
===
void
0
&&
this
.
add
(
a
.
target
)}
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)
&&
this
.
__objects
.
indexOf
(
a
)
===-
1
){
this
.
__objects
.
push
(
a
);
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
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
);
b
!==-
1
&&
this
.
__lights
.
splice
(
b
,
1
)}
else
if
(
!
(
a
instanceof
THREE
.
Camera
)){
b
=
this
.
__objects
.
indexOf
(
a
);
if
(
b
!==-
1
){
this
.
__objects
.
splice
(
b
,
1
);
this
.
__objectsRemoved
.
push
(
a
);
b
=
this
.
__objectsAdded
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsAdded
.
splice
(
b
,
1
)}}
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__removeObject
(
a
.
children
[
b
])};
THREE
.
CanvasRenderer
=
function
(
a
){
function
b
(
a
){
if
(
s
!==
a
)
s
=
i
.
globalAlpha
=
a
}
function
c
(
a
){
if
(
v
!==
a
){
if
(
a
===
THREE
.
NormalBlending
)
i
.
globalCompositeOperation
=
"
source-over
"
;
else
if
(
a
===
THREE
.
AdditiveBlending
)
i
.
globalCompositeOperation
=
"
lighter
"
;
else
if
(
a
===
THREE
.
SubtractiveBlending
)
i
.
globalCompositeOperation
=
"
darker
"
;
v
=
a
}}
function
d
(
a
){
if
(
A
!==
a
)
A
=
i
.
strokeStyle
=
a
}
function
f
(
a
){
if
(
w
!==
a
)
w
=
i
.
fillStyle
=
a
}
console
.
log
(
"
THREE.CanvasRenderer
"
,
THREE
.
REVISION
);
var
a
=
a
||
{},
e
=
this
,
g
,
j
,
m
,
l
=
new
THREE
.
Projector
,
h
=
a
.
canvas
!==
void
0
?
a
.
canvas
:
document
.
createElement
(
"
canvas
"
),
n
,
k
,
o
,
q
,
i
=
h
.
getContext
(
"
2d
"
),
p
=
new
THREE
.
Color
(
0
),
r
=
0
,
s
=
1
,
v
=
0
,
A
=
null
,
w
=
null
,
B
=
null
,
x
=
null
,
F
=
null
,
u
,
z
,
D
,
H
,
P
=
new
THREE
.
RenderableVertex
,
M
=
new
THREE
.
RenderableVertex
,
t
,
E
,
G
,
N
,
Q
,
O
,
y
,
S
,
L
,
U
,
T
,
V
,
C
=
new
THREE
.
Color
,
K
=
new
THREE
.
Color
,
I
=
new
THREE
.
Color
,
J
=
new
THREE
.
Color
,
R
=
new
THREE
.
Color
,
ja
=
[],
aa
=
[],
ea
,
fa
,
da
,
ka
,
za
,
Aa
,
Ba
,
Ca
,
Da
,
Ea
,
la
=
new
THREE
.
Rectangle
,
$
=
new
THREE
.
Rectangle
,
Z
=
new
THREE
.
Rectangle
,
ua
=
false
,
Y
=
new
THREE
.
Color
,
ma
=
new
THREE
.
Color
,
na
=
new
THREE
.
Color
,
W
=
...
...
build/custom/ThreeWebGL.js
浏览文件 @
fbf28ffe
...
...
@@ -228,7 +228,7 @@ a.useScreenCoordinates:true;this.mergeWith3D=a.mergeWith3D!==void 0?a.mergeWith3
new
THREE
.
Vector2
(
1
,
1
)};
THREE
.
Sprite
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
Sprite
.
prototype
.
updateMatrix
=
function
(){
this
.
matrix
.
setPosition
(
this
.
position
);
this
.
rotation3d
.
set
(
0
,
0
,
this
.
rotation
);
this
.
matrix
.
setRotationFromEuler
(
this
.
rotation3d
);
if
(
this
.
scale
.
x
!==
1
||
this
.
scale
.
y
!==
1
){
this
.
matrix
.
scale
(
this
.
scale
);
this
.
boundRadiusScale
=
Math
.
max
(
this
.
scale
.
x
,
this
.
scale
.
y
)}
this
.
matrixWorldNeedsUpdate
=
true
};
THREE
.
SpriteAlignment
=
{};
THREE
.
SpriteAlignment
.
topLeft
=
new
THREE
.
Vector2
(
1
,
-
1
);
THREE
.
SpriteAlignment
.
topCenter
=
new
THREE
.
Vector2
(
0
,
-
1
);
THREE
.
SpriteAlignment
.
topRight
=
new
THREE
.
Vector2
(
-
1
,
-
1
);
THREE
.
SpriteAlignment
.
centerLeft
=
new
THREE
.
Vector2
(
1
,
0
);
THREE
.
SpriteAlignment
.
center
=
new
THREE
.
Vector2
(
0
,
0
);
THREE
.
SpriteAlignment
.
centerRight
=
new
THREE
.
Vector2
(
-
1
,
0
);
THREE
.
SpriteAlignment
.
bottomLeft
=
new
THREE
.
Vector2
(
1
,
1
);
THREE
.
SpriteAlignment
.
bottomCenter
=
new
THREE
.
Vector2
(
0
,
1
);
THREE
.
SpriteAlignment
.
bottomRight
=
new
THREE
.
Vector2
(
-
1
,
1
);
THREE
.
Scene
=
function
(){
THREE
.
Object3D
.
call
(
this
);
this
.
overrideMaterial
=
this
.
fog
=
null
;
this
.
matrixAutoUpdate
=
false
;
this
.
__objects
=
[];
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
)
this
.
__lights
.
indexOf
(
a
)
===-
1
&&
this
.
__lights
.
push
(
a
);
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)
&&
this
.
__objects
.
indexOf
(
a
)
===-
1
){
this
.
__objects
.
push
(
a
);
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__addObject
(
a
.
children
[
b
])};
THREE
.
Scene
.
prototype
.
__addObject
=
function
(
a
){
if
(
a
instanceof
THREE
.
Light
)
{
this
.
__lights
.
indexOf
(
a
)
===-
1
&&
this
.
__lights
.
push
(
a
);
a
.
target
&&
a
.
target
.
parent
===
void
0
&&
this
.
add
(
a
.
target
)}
else
if
(
!
(
a
instanceof
THREE
.
Camera
||
a
instanceof
THREE
.
Bone
)
&&
this
.
__objects
.
indexOf
(
a
)
===-
1
){
this
.
__objects
.
push
(
a
);
this
.
__objectsAdded
.
push
(
a
);
var
b
=
this
.
__objectsRemoved
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsRemoved
.
splice
(
b
,
1
)}
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
);
b
!==-
1
&&
this
.
__lights
.
splice
(
b
,
1
)}
else
if
(
!
(
a
instanceof
THREE
.
Camera
)){
b
=
this
.
__objects
.
indexOf
(
a
);
if
(
b
!==-
1
){
this
.
__objects
.
splice
(
b
,
1
);
this
.
__objectsRemoved
.
push
(
a
);
b
=
this
.
__objectsAdded
.
indexOf
(
a
);
b
!==-
1
&&
this
.
__objectsAdded
.
splice
(
b
,
1
)}}
for
(
b
=
0
;
b
<
a
.
children
.
length
;
b
++
)
this
.
__removeObject
(
a
.
children
[
b
])};
THREE
.
Fog
=
function
(
a
,
b
,
c
){
this
.
color
=
new
THREE
.
Color
(
a
);
this
.
near
=
b
!==
void
0
?
b
:
1
;
this
.
far
=
c
!==
void
0
?
c
:
1
E3
};
THREE
.
FogExp2
=
function
(
a
,
b
){
this
.
color
=
new
THREE
.
Color
(
a
);
this
.
density
=
b
!==
void
0
?
b
:
2.5
E
-
4
};
THREE
.
ShaderChunk
=
{
fog_pars_fragment
:
"
#ifdef USE_FOG
\n
uniform vec3 fogColor;
\n
#ifdef FOG_EXP2
\n
uniform float fogDensity;
\n
#else
\n
uniform float fogNear;
\n
uniform float fogFar;
\n
#endif
\n
#endif
"
,
fog_fragment
:
"
#ifdef USE_FOG
\n
float depth = gl_FragCoord.z / gl_FragCoord.w;
\n
#ifdef FOG_EXP2
\n
const float LOG2 = 1.442695;
\n
float fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );
\n
fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );
\n
#else
\n
float fogFactor = smoothstep( fogNear, fogFar, depth );
\n
#endif
\n
gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );
\n
#endif
"
,
envmap_pars_fragment
:
"
#ifdef USE_ENVMAP
\n
varying vec3 vReflect;
\n
uniform float reflectivity;
\n
uniform samplerCube envMap;
\n
uniform float flipEnvMap;
\n
uniform int combine;
\n
#endif
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录