Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
0e91f968
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,发现更多精彩内容 >>
提交
0e91f968
编写于
1月 04, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated builds.
上级
13a9df54
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
11 deletion
+11
-11
build/Three.js
build/Three.js
+9
-9
build/custom/ThreeExtras.js
build/custom/ThreeExtras.js
+2
-2
未找到文件。
build/Three.js
浏览文件 @
0e91f968
此差异已折叠。
点击以展开。
build/custom/ThreeExtras.js
浏览文件 @
0e91f968
...
...
@@ -66,8 +66,8 @@ for(e=1;e<=m;e++)c.push(g.getPointAt(e/m));break;case THREE.PathActions.ARC:e=th
THREE
.
Path
.
prototype
.
nltransform
=
function
(
a
,
b
,
c
,
d
,
f
,
g
){
var
e
=
this
.
getPoints
(),
h
,
i
,
j
,
k
,
o
;
for
(
h
=
0
,
i
=
e
.
length
;
h
<
i
;
h
++
)
j
=
e
[
h
],
k
=
j
.
x
,
o
=
j
.
y
,
j
.
x
=
a
*
k
+
b
*
o
+
c
,
j
.
y
=
d
*
o
+
f
*
k
+
g
;
return
e
};
THREE
.
Path
.
prototype
.
debug
=
function
(
a
){
var
b
=
this
.
getBoundingBox
();
a
||
(
a
=
document
.
createElement
(
"
canvas
"
),
a
.
setAttribute
(
"
width
"
,
b
.
maxX
+
100
),
a
.
setAttribute
(
"
height
"
,
b
.
maxY
+
100
),
document
.
body
.
appendChild
(
a
));
b
=
a
.
getContext
(
"
2d
"
);
b
.
fillStyle
=
"
white
"
;
b
.
fillRect
(
0
,
0
,
a
.
width
,
a
.
height
);
b
.
strokeStyle
=
"
black
"
;
b
.
beginPath
();
var
c
,
d
,
f
;
for
(
a
=
0
,
c
=
this
.
actions
.
length
;
a
<
c
;
a
++
)
d
=
this
.
actions
[
a
],
f
=
d
.
args
,
d
=
d
.
action
,
d
!=
THREE
.
PathActions
.
CSPLINE_THRU
&&
b
[
d
].
apply
(
b
,
f
);
b
.
stroke
();
b
.
closePath
();
b
.
strokeStyle
=
"
red
"
;
d
=
this
.
getPoints
();
for
(
a
=
0
,
c
=
d
.
length
;
a
<
c
;
a
++
)
f
=
d
[
a
],
b
.
beginPath
(),
b
.
arc
(
f
.
x
,
f
.
y
,
1.5
,
0
,
2
*
Math
.
PI
,
!
1
),
b
.
stroke
(),
b
.
closePath
()};
THREE
.
Path
.
prototype
.
toShapes
=
function
(){
var
a
,
b
,
c
,
d
,
f
=
[],
g
=
new
THREE
.
Path
;
for
(
a
=
0
,
b
=
this
.
actions
.
length
;
a
<
b
;
a
++
)
c
=
this
.
actions
[
a
],
d
=
c
.
args
,
c
=
c
.
action
,
c
==
THREE
.
PathActions
.
MOVE_TO
&&
0
!=
g
.
actions
.
length
&&
(
f
.
push
(
g
),
g
=
new
THREE
.
Path
),
g
[
c
].
apply
(
g
,
d
);
0
!=
g
.
actions
.
length
&&
f
.
push
(
g
);
if
(
0
==
f
.
length
)
return
[];
a
=!
THREE
.
Shape
.
Utils
.
isClockWise
(
f
[
0
].
getPoints
());
if
(
1
==
f
.
length
)
return
g
=
f
[
0
],
e
=
new
THREE
.
Shape
,
e
.
actions
=
g
.
actions
,
e
.
curves
=
g
.
curves
,
e
;
var
e
;
d
=
[];
if
(
a
){
e
=
new
THREE
.
Shape
;
for
(
a
=
0
,
b
=
f
.
length
;
a
<
b
;
a
++
)
g
=
f
[
a
],
THREE
.
Shape
.
Utils
.
isClockWise
(
g
.
getPoints
())?(
e
.
actions
=
g
.
actions
,
e
.
curves
=
g
.
curves
,
d
.
push
(
e
),
e
=
new
THREE
.
Shape
):
e
.
holes
.
push
(
g
)}
else
{
for
(
a
=
0
,
b
=
f
.
length
;
a
<
b
;
a
++
)
g
=
f
[
a
],
THREE
.
Shape
.
Utils
.
isClockWise
(
g
.
getPoints
())?(
e
&&
d
.
push
(
e
),
e
=
new
THREE
.
Shape
,
e
.
actions
=
g
.
actions
,
e
.
curves
=
g
.
curves
):
e
.
holes
.
push
(
g
);
d
.
push
(
e
)}
return
d
};
THREE
.
Shape
=
function
(){
THREE
.
Path
.
apply
(
this
,
arguments
);
this
.
holes
=
[]};
THREE
.
Shape
.
prototype
=
new
THREE
.
Path
;
THREE
.
Shape
.
prototype
.
constructor
=
THREE
.
Path
;
THREE
.
Path
.
prototype
.
toShapes
=
function
(){
var
a
,
b
,
c
,
d
,
f
=
[],
g
=
new
THREE
.
Path
;
for
(
a
=
0
,
b
=
this
.
actions
.
length
;
a
<
b
;
a
++
)
c
=
this
.
actions
[
a
],
d
=
c
.
args
,
c
=
c
.
action
,
c
==
THREE
.
PathActions
.
MOVE_TO
&&
0
!=
g
.
actions
.
length
&&
(
f
.
push
(
g
),
g
=
new
THREE
.
Path
),
g
[
c
].
apply
(
g
,
d
);
0
!=
g
.
actions
.
length
&&
f
.
push
(
g
);
if
(
0
==
f
.
length
)
return
[];
var
e
;
d
=
[];
a
=!
THREE
.
Shape
.
Utils
.
isClockWise
(
f
[
0
].
getPoints
());
if
(
1
==
f
.
length
)
return
g
=
f
[
0
],
e
=
new
THREE
.
Shape
,
e
.
actions
=
g
.
actions
,
e
.
curves
=
g
.
curves
,
d
.
push
(
e
),
d
;
if
(
a
){
e
=
new
THREE
.
Shape
;
for
(
a
=
0
,
b
=
f
.
length
;
a
<
b
;
a
++
)
g
=
f
[
a
],
THREE
.
Shape
.
Utils
.
isClockWise
(
g
.
getPoints
())?(
e
.
actions
=
g
.
actions
,
e
.
curves
=
g
.
curves
,
d
.
push
(
e
),
e
=
new
THREE
.
Shape
):
e
.
holes
.
push
(
g
)}
else
{
for
(
a
=
0
,
b
=
f
.
length
;
a
<
b
;
a
++
)
g
=
f
[
a
],
THREE
.
Shape
.
Utils
.
isClockWise
(
g
.
getPoints
())?(
e
&&
d
.
push
(
e
),
e
=
new
THREE
.
Shape
,
e
.
actions
=
g
.
actions
,
e
.
curves
=
g
.
curves
):
e
.
holes
.
push
(
g
);
d
.
push
(
e
)}
return
d
};
THREE
.
Shape
=
function
(){
THREE
.
Path
.
apply
(
this
,
arguments
);
this
.
holes
=
[]};
THREE
.
Shape
.
prototype
=
new
THREE
.
Path
;
THREE
.
Shape
.
prototype
.
constructor
=
THREE
.
Path
;
THREE
.
Shape
.
prototype
.
extrude
=
function
(
a
){
return
new
THREE
.
ExtrudeGeometry
(
this
,
a
)};
THREE
.
Shape
.
prototype
.
getPointsHoles
=
function
(
a
){
var
b
,
c
=
this
.
holes
.
length
,
d
=
[];
for
(
b
=
0
;
b
<
c
;
b
++
)
d
[
b
]
=
this
.
holes
[
b
].
getTransformedPoints
(
a
,
this
.
bends
);
return
d
};
THREE
.
Shape
.
prototype
.
getSpacedPointsHoles
=
function
(
a
){
var
b
,
c
=
this
.
holes
.
length
,
d
=
[];
for
(
b
=
0
;
b
<
c
;
b
++
)
d
[
b
]
=
this
.
holes
[
b
].
getTransformedSpacedPoints
(
a
,
this
.
bends
);
return
d
};
THREE
.
Shape
.
prototype
.
extractAllPoints
=
function
(
a
){
return
{
shape
:
this
.
getTransformedPoints
(
a
),
holes
:
this
.
getPointsHoles
(
a
)}};
THREE
.
Shape
.
prototype
.
extractAllSpacedPoints
=
function
(
a
){
return
{
shape
:
this
.
getTransformedSpacedPoints
(
a
),
holes
:
this
.
getSpacedPointsHoles
(
a
)}};
THREE
.
Shape
.
Utils
=
{
removeHoles
:
function
(
a
,
b
){
var
c
=
a
.
concat
(),
d
=
c
.
concat
(),
f
,
g
,
e
,
h
,
i
,
j
,
k
,
o
,
l
,
n
,
p
=
[];
for
(
i
=
0
;
i
<
b
.
length
;
i
++
){
j
=
b
[
i
];
Array
.
prototype
.
push
.
apply
(
d
,
j
);
g
=
Number
.
POSITIVE_INFINITY
;
for
(
f
=
0
;
f
<
j
.
length
;
f
++
){
l
=
j
[
f
];
n
=
[];
for
(
o
=
0
;
o
<
c
.
length
;
o
++
)
k
=
c
[
o
],
k
=
l
.
distanceToSquared
(
k
),
n
.
push
(
k
),
k
<
g
&&
(
g
=
k
,
e
=
f
,
h
=
o
)}
f
=
0
<=
h
-
1
?
h
-
1
:
c
.
length
-
1
;
g
=
0
<=
e
-
1
?
e
-
1
:
j
.
length
-
1
;
var
m
=
[
j
[
e
],
c
[
h
],
c
[
f
]];
o
=
THREE
.
FontUtils
.
Triangulate
.
area
(
m
);
var
q
=
[
j
[
e
],
j
[
g
],
c
[
h
]];
l
=
THREE
.
FontUtils
.
Triangulate
.
area
(
q
);
n
=
h
;
k
=
e
;
h
+=
1
;
e
+=-
1
;
0
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录