Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
760252a5
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,发现更多精彩内容 >>
提交
760252a5
编写于
7月 24, 2015
作者:
G
gero3
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add space after comma
上级
ae57c164
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
34 addition
and
33 deletion
+34
-33
examples/js/Cloth.js
examples/js/Cloth.js
+2
-2
examples/js/Sparks.js
examples/js/Sparks.js
+4
-4
examples/js/controls/TransformControls.js
examples/js/controls/TransformControls.js
+5
-5
examples/js/loaders/AssimpJSONLoader.js
examples/js/loaders/AssimpJSONLoader.js
+1
-1
examples/js/loaders/ColladaLoader.js
examples/js/loaders/ColladaLoader.js
+12
-12
examples/js/loaders/PDBLoader.js
examples/js/loaders/PDBLoader.js
+3
-3
examples/js/loaders/RGBELoader.js
examples/js/loaders/RGBELoader.js
+1
-1
examples/js/loaders/STLLoader.js
examples/js/loaders/STLLoader.js
+1
-1
examples/js/loaders/VRMLLoader.js
examples/js/loaders/VRMLLoader.js
+1
-1
src/extras/geometries/OctahedronGeometry.js
src/extras/geometries/OctahedronGeometry.js
+1
-1
src/math/Quaternion.js
src/math/Quaternion.js
+1
-1
src/math/Ray.js
src/math/Ray.js
+1
-1
utils/codestyle/config.json
utils/codestyle/config.json
+1
-0
未找到文件。
examples/js/Cloth.js
浏览文件 @
760252a5
...
...
@@ -35,7 +35,7 @@ var pins = [];
var
wind
=
true
;
var
windStrength
=
2
;
var
windForce
=
new
THREE
.
Vector3
(
0
,
0
,
0
);
var
windForce
=
new
THREE
.
Vector3
(
0
,
0
,
0
);
var
ballPosition
=
new
THREE
.
Vector3
(
0
,
-
45
,
0
);
var
ballSize
=
60
;
//40
...
...
@@ -239,7 +239,7 @@ function simulate( time ) {
particles
=
cloth
.
particles
;
for
(
i
=
0
,
il
=
faces
.
length
;
i
<
il
;
i
++
)
{
for
(
i
=
0
,
il
=
faces
.
length
;
i
<
il
;
i
++
)
{
face
=
faces
[
i
];
normal
=
face
.
normal
;
...
...
examples/js/Sparks.js
浏览文件 @
760252a5
...
...
@@ -487,7 +487,7 @@ SPARKS.ActionZone.prototype.update = function( emitter, particle, time ) {
/*
* Accelerate action affects velocity in specified 3d direction
*/
SPARKS
.
Accelerate
=
function
(
x
,
y
,
z
)
{
SPARKS
.
Accelerate
=
function
(
x
,
y
,
z
)
{
if
(
x
instanceof
THREE
.
Vector3
)
{
...
...
@@ -496,7 +496,7 @@ SPARKS.Accelerate = function( x,y,z ) {
}
this
.
acceleration
=
new
THREE
.
Vector3
(
x
,
y
,
z
);
this
.
acceleration
=
new
THREE
.
Vector3
(
x
,
y
,
z
);
};
...
...
@@ -569,7 +569,7 @@ SPARKS.AccelerateVelocity.prototype.update = function( emitter, particle, time )
/* Set the max ammount of x,y,z drift movements in a second */
SPARKS
.
RandomDrift
=
function
(
x
,
y
,
z
)
{
SPARKS
.
RandomDrift
=
function
(
x
,
y
,
z
)
{
if
(
x
instanceof
THREE
.
Vector3
)
{
...
...
@@ -578,7 +578,7 @@ SPARKS.RandomDrift = function( x,y,z ) {
}
this
.
drift
=
new
THREE
.
Vector3
(
x
,
y
,
z
);
this
.
drift
=
new
THREE
.
Vector3
(
x
,
y
,
z
);
};
...
...
examples/js/controls/TransformControls.js
浏览文件 @
760252a5
...
...
@@ -382,23 +382,23 @@
this
.
handleGizmos
=
{
X
:
[
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
x
'
,
0.5
),
new
GizmoLineMaterial
(
{
color
:
0xff0000
}
)
)
]
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
x
'
,
0.5
),
new
GizmoLineMaterial
(
{
color
:
0xff0000
}
)
)
]
],
Y
:
[
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
y
'
,
0.5
),
new
GizmoLineMaterial
(
{
color
:
0x00ff00
}
)
)
]
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
y
'
,
0.5
),
new
GizmoLineMaterial
(
{
color
:
0x00ff00
}
)
)
]
],
Z
:
[
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
z
'
,
0.5
),
new
GizmoLineMaterial
(
{
color
:
0x0000ff
}
)
)
]
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
z
'
,
0.5
),
new
GizmoLineMaterial
(
{
color
:
0x0000ff
}
)
)
]
],
E
:
[
[
new
THREE
.
Line
(
new
CircleGeometry
(
1.25
,
'
z
'
,
1
),
new
GizmoLineMaterial
(
{
color
:
0xcccc00
}
)
)
]
[
new
THREE
.
Line
(
new
CircleGeometry
(
1.25
,
'
z
'
,
1
),
new
GizmoLineMaterial
(
{
color
:
0xcccc00
}
)
)
]
],
XYZE
:
[
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
z
'
,
1
),
new
GizmoLineMaterial
(
{
color
:
0x787878
}
)
)
]
[
new
THREE
.
Line
(
new
CircleGeometry
(
1
,
'
z
'
,
1
),
new
GizmoLineMaterial
(
{
color
:
0x787878
}
)
)
]
]
};
...
...
examples/js/loaders/AssimpJSONLoader.js
浏览文件 @
760252a5
...
...
@@ -123,7 +123,7 @@ THREE.AssimpJSONLoader.prototype = {
for
(
in_data
=
json
.
faces
,
i
=
0
,
e
=
in_data
.
length
;
i
<
e
;
++
i
)
{
src
=
in_data
[
i
];
face
=
new
THREE
.
Face3
(
src
[
0
],
src
[
1
],
src
[
2
]
);
face
=
new
THREE
.
Face3
(
src
[
0
],
src
[
1
],
src
[
2
]
);
geometry
.
faces
.
push
(
face
);
}
...
...
examples/js/loaders/ColladaLoader.js
浏览文件 @
760252a5
...
...
@@ -4398,8 +4398,8 @@
// TODO - this might be a good place to choose greatest 4 weights
for
(
var
i
=
0
;
i
<
weights
.
length
;
i
++
)
{
var
indicies
=
new
THREE
.
Vector4
(
weights
[
i
][
0
]
?
weights
[
i
][
0
].
joint
:
0
,
weights
[
i
][
1
]
?
weights
[
i
][
1
].
joint
:
0
,
weights
[
i
][
2
]
?
weights
[
i
][
2
].
joint
:
0
,
weights
[
i
][
3
]
?
weights
[
i
][
3
].
joint
:
0
);
var
weight
=
new
THREE
.
Vector4
(
weights
[
i
][
0
]
?
weights
[
i
][
0
].
weight
:
0
,
weights
[
i
][
1
]
?
weights
[
i
][
1
].
weight
:
0
,
weights
[
i
][
2
]
?
weights
[
i
][
2
].
weight
:
0
,
weights
[
i
][
3
]
?
weights
[
i
][
3
].
weight
:
0
);
var
indicies
=
new
THREE
.
Vector4
(
weights
[
i
][
0
]
?
weights
[
i
][
0
].
joint
:
0
,
weights
[
i
][
1
]
?
weights
[
i
][
1
].
joint
:
0
,
weights
[
i
][
2
]
?
weights
[
i
][
2
].
joint
:
0
,
weights
[
i
][
3
]
?
weights
[
i
][
3
].
joint
:
0
);
var
weight
=
new
THREE
.
Vector4
(
weights
[
i
][
0
]
?
weights
[
i
][
0
].
weight
:
0
,
weights
[
i
][
1
]
?
weights
[
i
][
1
].
weight
:
0
,
weights
[
i
][
2
]
?
weights
[
i
][
2
].
weight
:
0
,
weights
[
i
][
3
]
?
weights
[
i
][
3
].
weight
:
0
);
skinIndices
.
push
(
indicies
);
skinWeights
.
push
(
weight
);
...
...
@@ -4413,7 +4413,7 @@
//create an animation for the animated bones
//NOTE: this has no effect when using morphtargets
var
animationdata
=
{
"
name
"
:
animationBounds
.
ID
,
"
fps
"
:
30
,
"
length
"
:
animationBounds
.
frames
/
30
,
"
hierarchy
"
:
[]
};
var
animationdata
=
{
"
name
"
:
animationBounds
.
ID
,
"
fps
"
:
30
,
"
length
"
:
animationBounds
.
frames
/
30
,
"
hierarchy
"
:
[]
};
for
(
var
j
=
0
;
j
<
sortedbones
.
length
;
j
++
)
{
...
...
@@ -4451,12 +4451,12 @@
if
(
frame
===
0
)
bones
[
i
].
matrix
=
key
.
matrix
;
var
data
=
[
new
THREE
.
Vector3
(),
new
THREE
.
Quaternion
(),
new
THREE
.
Vector3
()
];
var
data
=
[
new
THREE
.
Vector3
(),
new
THREE
.
Quaternion
(),
new
THREE
.
Vector3
()
];
key
.
matrix
.
decompose
(
data
[
0
],
data
[
1
],
data
[
2
]
);
key
.
pos
=
[
data
[
0
].
x
,
data
[
0
].
y
,
data
[
0
].
z
];
key
.
pos
=
[
data
[
0
].
x
,
data
[
0
].
y
,
data
[
0
].
z
];
key
.
scl
=
[
data
[
2
].
x
,
data
[
2
].
y
,
data
[
2
].
z
];
key
.
scl
=
[
data
[
2
].
x
,
data
[
2
].
y
,
data
[
2
].
z
];
key
.
rot
=
data
[
1
];
animationdata
.
hierarchy
[
j
].
keys
.
push
(
key
);
...
...
@@ -4497,7 +4497,7 @@
}
return
{
start
:
start
,
end
:
end
,
frames
:
frames
,
ID
:
ID
};
return
{
start
:
start
,
end
:
end
,
frames
:
frames
,
ID
:
ID
};
};
...
...
@@ -5028,13 +5028,13 @@
bone
.
name
=
node
.
sid
;
bone
.
parent
=
parentid
;
bone
.
matrix
=
node
.
matrix
;
var
data
=
[
new
THREE
.
Vector3
(),
new
THREE
.
Quaternion
(),
new
THREE
.
Vector3
()
];
var
data
=
[
new
THREE
.
Vector3
(),
new
THREE
.
Quaternion
(),
new
THREE
.
Vector3
()
];
bone
.
matrix
.
decompose
(
data
[
0
],
data
[
1
],
data
[
2
]
);
bone
.
pos
=
[
data
[
0
].
x
,
data
[
0
].
y
,
data
[
0
].
z
];
bone
.
pos
=
[
data
[
0
].
x
,
data
[
0
].
y
,
data
[
0
].
z
];
bone
.
scl
=
[
data
[
2
].
x
,
data
[
2
].
y
,
data
[
2
].
z
];
bone
.
rotq
=
[
data
[
1
].
x
,
data
[
1
].
y
,
data
[
1
].
z
,
data
[
1
].
w
];
bone
.
scl
=
[
data
[
2
].
x
,
data
[
2
].
y
,
data
[
2
].
z
];
bone
.
rotq
=
[
data
[
1
].
x
,
data
[
1
].
y
,
data
[
1
].
z
,
data
[
1
].
w
];
list
.
push
(
bone
);
for
(
var
i
in
node
.
nodes
)
{
...
...
@@ -5532,7 +5532,7 @@
};
//Move the vertices into the pose that is proper for the start of the animation
function
skinToBindPose
(
geometry
,
skeleton
,
skinController
)
{
function
skinToBindPose
(
geometry
,
skeleton
,
skinController
)
{
var
bones
=
[];
setupSkeleton
(
skeleton
,
bones
,
-
1
);
...
...
examples/js/loaders/PDBLoader.js
浏览文件 @
760252a5
...
...
@@ -81,8 +81,8 @@ THREE.PDBLoader.prototype = {
}
var
CPK
=
{
"
h
"
:
[
255
,
255
,
255
],
"
he
"
:
[
217
,
255
,
255
],
"
li
"
:
[
204
,
128
,
255
],
"
be
"
:
[
194
,
255
,
0
],
"
b
"
:
[
255
,
181
,
181
],
"
c
"
:
[
144
,
144
,
144
],
"
n
"
:
[
48
,
80
,
248
],
"
o
"
:
[
255
,
13
,
13
],
"
f
"
:
[
144
,
224
,
80
],
"
ne
"
:
[
179
,
227
,
245
],
"
na
"
:
[
171
,
92
,
242
],
"
mg
"
:
[
138
,
255
,
0
],
"
al
"
:
[
191
,
166
,
166
],
"
si
"
:
[
240
,
200
,
160
],
"
p
"
:
[
255
,
128
,
0
],
"
s
"
:
[
255
,
255
,
48
],
"
cl
"
:
[
31
,
240
,
31
],
"
ar
"
:
[
128
,
209
,
227
],
"
k
"
:
[
143
,
64
,
212
],
"
ca
"
:
[
61
,
255
,
0
],
"
sc
"
:
[
230
,
230
,
230
],
"
ti
"
:
[
191
,
194
,
199
],
"
v
"
:
[
166
,
166
,
171
],
"
cr
"
:
[
138
,
153
,
199
],
"
mn
"
:
[
156
,
122
,
199
],
"
fe
"
:
[
224
,
102
,
51
],
"
co
"
:
[
240
,
144
,
160
],
"
ni
"
:
[
80
,
208
,
80
],
"
cu
"
:
[
200
,
128
,
51
],
"
zn
"
:
[
125
,
128
,
176
],
"
ga
"
:
[
194
,
143
,
143
],
"
ge
"
:
[
102
,
143
,
143
],
"
as
"
:
[
189
,
128
,
227
],
"
se
"
:
[
255
,
161
,
0
],
"
br
"
:
[
166
,
41
,
41
],
"
kr
"
:
[
92
,
184
,
209
],
"
rb
"
:
[
112
,
46
,
176
],
"
sr
"
:
[
0
,
255
,
0
],
"
y
"
:
[
148
,
255
,
255
],
"
zr
"
:
[
148
,
224
,
224
],
"
nb
"
:
[
115
,
194
,
201
],
"
mo
"
:
[
84
,
181
,
181
],
"
tc
"
:
[
59
,
158
,
158
],
"
ru
"
:
[
36
,
143
,
143
],
"
rh
"
:
[
10
,
125
,
140
],
"
pd
"
:
[
0
,
105
,
133
],
"
ag
"
:
[
192
,
192
,
192
],
"
cd
"
:
[
255
,
217
,
143
],
"
in
"
:
[
166
,
117
,
115
],
"
sn
"
:
[
102
,
128
,
128
],
"
sb
"
:
[
158
,
99
,
181
],
"
te
"
:
[
212
,
122
,
0
],
"
i
"
:
[
148
,
0
,
148
],
"
xe
"
:
[
66
,
158
,
176
],
"
cs
"
:
[
87
,
23
,
143
],
"
ba
"
:
[
0
,
201
,
0
],
"
la
"
:
[
112
,
212
,
255
],
"
ce
"
:
[
255
,
255
,
199
],
"
pr
"
:
[
217
,
255
,
199
],
"
nd
"
:
[
199
,
255
,
199
],
"
pm
"
:
[
163
,
255
,
199
],
"
sm
"
:
[
143
,
255
,
199
],
"
eu
"
:
[
97
,
255
,
199
],
"
gd
"
:
[
69
,
255
,
199
],
"
tb
"
:
[
48
,
255
,
199
],
"
dy
"
:
[
31
,
255
,
199
],
"
ho
"
:
[
0
,
255
,
156
],
"
er
"
:
[
0
,
230
,
117
],
"
tm
"
:
[
0
,
212
,
82
],
"
yb
"
:
[
0
,
191
,
56
],
"
lu
"
:
[
0
,
171
,
36
],
"
hf
"
:
[
77
,
194
,
255
],
"
ta
"
:
[
77
,
166
,
255
],
"
w
"
:
[
33
,
148
,
214
],
"
re
"
:
[
38
,
125
,
171
],
"
os
"
:
[
38
,
102
,
150
],
"
ir
"
:
[
23
,
84
,
135
],
"
pt
"
:
[
208
,
208
,
224
],
"
au
"
:
[
255
,
209
,
35
],
"
hg
"
:
[
184
,
184
,
208
],
"
tl
"
:
[
166
,
84
,
77
],
"
pb
"
:
[
87
,
89
,
97
],
"
bi
"
:
[
158
,
79
,
181
],
"
po
"
:
[
171
,
92
,
0
],
"
at
"
:
[
117
,
79
,
69
],
"
rn
"
:
[
66
,
130
,
150
],
"
fr
"
:
[
66
,
0
,
102
],
"
ra
"
:
[
0
,
125
,
0
],
"
ac
"
:
[
112
,
171
,
250
],
"
th
"
:
[
0
,
186
,
255
],
"
pa
"
:
[
0
,
161
,
255
],
"
u
"
:
[
0
,
143
,
255
],
"
np
"
:
[
0
,
128
,
255
],
"
pu
"
:
[
0
,
107
,
255
],
"
am
"
:
[
84
,
92
,
242
],
"
cm
"
:
[
120
,
92
,
227
],
"
bk
"
:
[
138
,
79
,
227
],
"
cf
"
:
[
161
,
54
,
212
],
"
es
"
:
[
179
,
31
,
212
],
"
fm
"
:
[
179
,
31
,
186
],
"
md
"
:
[
179
,
13
,
166
],
"
no
"
:
[
189
,
13
,
135
],
"
lr
"
:
[
199
,
0
,
102
],
"
rf
"
:
[
204
,
0
,
89
],
"
db
"
:
[
209
,
0
,
79
],
"
sg
"
:
[
217
,
0
,
69
],
"
bh
"
:
[
224
,
0
,
56
],
"
hs
"
:
[
230
,
0
,
46
],
"
mt
"
:
[
235
,
0
,
38
],
"
ds
"
:
[
235
,
0
,
38
],
"
rg
"
:
[
235
,
0
,
38
],
"
cn
"
:
[
235
,
0
,
38
],
"
uut
"
:
[
235
,
0
,
38
],
"
uuq
"
:
[
235
,
0
,
38
],
"
uup
"
:
[
235
,
0
,
38
],
"
uuh
"
:
[
235
,
0
,
38
],
"
uus
"
:
[
235
,
0
,
38
],
"
uuo
"
:
[
235
,
0
,
38
]
};
var
CPK
=
{
"
h
"
:
[
255
,
255
,
255
],
"
he
"
:
[
217
,
255
,
255
],
"
li
"
:
[
204
,
128
,
255
],
"
be
"
:
[
194
,
255
,
0
],
"
b
"
:
[
255
,
181
,
181
],
"
c
"
:
[
144
,
144
,
144
],
"
n
"
:
[
48
,
80
,
248
],
"
o
"
:
[
255
,
13
,
13
],
"
f
"
:
[
144
,
224
,
80
],
"
ne
"
:
[
179
,
227
,
245
],
"
na
"
:
[
171
,
92
,
242
],
"
mg
"
:
[
138
,
255
,
0
],
"
al
"
:
[
191
,
166
,
166
],
"
si
"
:
[
240
,
200
,
160
],
"
p
"
:
[
255
,
128
,
0
],
"
s
"
:
[
255
,
255
,
48
],
"
cl
"
:
[
31
,
240
,
31
],
"
ar
"
:
[
128
,
209
,
227
],
"
k
"
:
[
143
,
64
,
212
],
"
ca
"
:
[
61
,
255
,
0
],
"
sc
"
:
[
230
,
230
,
230
],
"
ti
"
:
[
191
,
194
,
199
],
"
v
"
:
[
166
,
166
,
171
],
"
cr
"
:
[
138
,
153
,
199
],
"
mn
"
:
[
156
,
122
,
199
],
"
fe
"
:
[
224
,
102
,
51
],
"
co
"
:
[
240
,
144
,
160
],
"
ni
"
:
[
80
,
208
,
80
],
"
cu
"
:
[
200
,
128
,
51
],
"
zn
"
:
[
125
,
128
,
176
],
"
ga
"
:
[
194
,
143
,
143
],
"
ge
"
:
[
102
,
143
,
143
],
"
as
"
:
[
189
,
128
,
227
],
"
se
"
:
[
255
,
161
,
0
],
"
br
"
:
[
166
,
41
,
41
],
"
kr
"
:
[
92
,
184
,
209
],
"
rb
"
:
[
112
,
46
,
176
],
"
sr
"
:
[
0
,
255
,
0
],
"
y
"
:
[
148
,
255
,
255
],
"
zr
"
:
[
148
,
224
,
224
],
"
nb
"
:
[
115
,
194
,
201
],
"
mo
"
:
[
84
,
181
,
181
],
"
tc
"
:
[
59
,
158
,
158
],
"
ru
"
:
[
36
,
143
,
143
],
"
rh
"
:
[
10
,
125
,
140
],
"
pd
"
:
[
0
,
105
,
133
],
"
ag
"
:
[
192
,
192
,
192
],
"
cd
"
:
[
255
,
217
,
143
],
"
in
"
:
[
166
,
117
,
115
],
"
sn
"
:
[
102
,
128
,
128
],
"
sb
"
:
[
158
,
99
,
181
],
"
te
"
:
[
212
,
122
,
0
],
"
i
"
:
[
148
,
0
,
148
],
"
xe
"
:
[
66
,
158
,
176
],
"
cs
"
:
[
87
,
23
,
143
],
"
ba
"
:
[
0
,
201
,
0
],
"
la
"
:
[
112
,
212
,
255
],
"
ce
"
:
[
255
,
255
,
199
],
"
pr
"
:
[
217
,
255
,
199
],
"
nd
"
:
[
199
,
255
,
199
],
"
pm
"
:
[
163
,
255
,
199
],
"
sm
"
:
[
143
,
255
,
199
],
"
eu
"
:
[
97
,
255
,
199
],
"
gd
"
:
[
69
,
255
,
199
],
"
tb
"
:
[
48
,
255
,
199
],
"
dy
"
:
[
31
,
255
,
199
],
"
ho
"
:
[
0
,
255
,
156
],
"
er
"
:
[
0
,
230
,
117
],
"
tm
"
:
[
0
,
212
,
82
],
"
yb
"
:
[
0
,
191
,
56
],
"
lu
"
:
[
0
,
171
,
36
],
"
hf
"
:
[
77
,
194
,
255
],
"
ta
"
:
[
77
,
166
,
255
],
"
w
"
:
[
33
,
148
,
214
],
"
re
"
:
[
38
,
125
,
171
],
"
os
"
:
[
38
,
102
,
150
],
"
ir
"
:
[
23
,
84
,
135
],
"
pt
"
:
[
208
,
208
,
224
],
"
au
"
:
[
255
,
209
,
35
],
"
hg
"
:
[
184
,
184
,
208
],
"
tl
"
:
[
166
,
84
,
77
],
"
pb
"
:
[
87
,
89
,
97
],
"
bi
"
:
[
158
,
79
,
181
],
"
po
"
:
[
171
,
92
,
0
],
"
at
"
:
[
117
,
79
,
69
],
"
rn
"
:
[
66
,
130
,
150
],
"
fr
"
:
[
66
,
0
,
102
],
"
ra
"
:
[
0
,
125
,
0
],
"
ac
"
:
[
112
,
171
,
250
],
"
th
"
:
[
0
,
186
,
255
],
"
pa
"
:
[
0
,
161
,
255
],
"
u
"
:
[
0
,
143
,
255
],
"
np
"
:
[
0
,
128
,
255
],
"
pu
"
:
[
0
,
107
,
255
],
"
am
"
:
[
84
,
92
,
242
],
"
cm
"
:
[
120
,
92
,
227
],
"
bk
"
:
[
138
,
79
,
227
],
"
cf
"
:
[
161
,
54
,
212
],
"
es
"
:
[
179
,
31
,
212
],
"
fm
"
:
[
179
,
31
,
186
],
"
md
"
:
[
179
,
13
,
166
],
"
no
"
:
[
189
,
13
,
135
],
"
lr
"
:
[
199
,
0
,
102
],
"
rf
"
:
[
204
,
0
,
89
],
"
db
"
:
[
209
,
0
,
79
],
"
sg
"
:
[
217
,
0
,
69
],
"
bh
"
:
[
224
,
0
,
56
],
"
hs
"
:
[
230
,
0
,
46
],
"
mt
"
:
[
235
,
0
,
38
],
"
ds
"
:
[
235
,
0
,
38
],
"
rg
"
:
[
235
,
0
,
38
],
"
cn
"
:
[
235
,
0
,
38
],
"
uut
"
:
[
235
,
0
,
38
],
"
uuq
"
:
[
235
,
0
,
38
],
"
uup
"
:
[
235
,
0
,
38
],
"
uuh
"
:
[
235
,
0
,
38
],
"
uus
"
:
[
235
,
0
,
38
],
"
uuo
"
:
[
235
,
0
,
38
]
};
var
atoms
=
[];
...
...
@@ -106,7 +106,7 @@ THREE.PDBLoader.prototype = {
e
=
trim
(
lines
[
i
].
substr
(
76
,
2
)
).
toLowerCase
();
if
(
e
==
""
)
e
=
trim
(
lines
[
i
].
substr
(
12
,
2
)
).
toLowerCase
();
atoms
.
push
(
[
x
,
y
,
z
,
CPK
[
e
],
capitalize
(
e
)
]
);
atoms
.
push
(
[
x
,
y
,
z
,
CPK
[
e
],
capitalize
(
e
)
]
);
if
(
histogram
[
e
]
==
undefined
)
histogram
[
e
]
=
1
;
else
histogram
[
e
]
+=
1
;
...
...
examples/js/loaders/RGBELoader.js
浏览文件 @
760252a5
...
...
@@ -327,7 +327,7 @@ THREE.RGBELoader.prototype._parser = function( buffer ) {
var
w
=
rgbe_header_info
.
width
,
h
=
rgbe_header_info
.
height
,
image_rgba_data
=
RGBE_ReadPixels_RLE
(
byteArray
.
subarray
(
byteArray
.
pos
),
w
,
h
)
,
image_rgba_data
=
RGBE_ReadPixels_RLE
(
byteArray
.
subarray
(
byteArray
.
pos
),
w
,
h
)
;
if
(
RGBE_RETURN_FAILURE
!==
image_rgba_data
)
{
...
...
examples/js/loaders/STLLoader.js
浏览文件 @
760252a5
...
...
@@ -302,7 +302,7 @@ if ( typeof DataView === 'undefined' ) {
DataView
.
prototype
=
{
_getCharCodes
:
function
(
buffer
,
start
,
length
)
{
_getCharCodes
:
function
(
buffer
,
start
,
length
)
{
start
=
start
||
0
;
length
=
length
||
buffer
.
length
;
...
...
examples/js/loaders/VRMLLoader.js
浏览文件 @
760252a5
...
...
@@ -509,7 +509,7 @@ THREE.VRMLLoader.prototype = {
// first subpattern should match the Node name
var
block
=
{
'
nodeType
'
:
matches
[
1
],
'
string
'
:
line
,
'
parent
'
:
current
,
'
children
'
:
[],
'
comment
'
:
comment
};
var
block
=
{
'
nodeType
'
:
matches
[
1
],
'
string
'
:
line
,
'
parent
'
:
current
,
'
children
'
:
[],
'
comment
'
:
comment
};
current
.
children
.
push
(
block
);
current
=
block
;
...
...
src/extras/geometries/OctahedronGeometry.js
浏览文件 @
760252a5
...
...
@@ -5,7 +5,7 @@
THREE
.
OctahedronGeometry
=
function
(
radius
,
detail
)
{
var
vertices
=
[
1
,
0
,
0
,
-
1
,
0
,
0
,
0
,
1
,
0
,
0
,
-
1
,
0
,
0
,
0
,
1
,
0
,
0
,
-
1
1
,
0
,
0
,
-
1
,
0
,
0
,
0
,
1
,
0
,
0
,
-
1
,
0
,
0
,
0
,
1
,
0
,
0
,
-
1
];
var
indices
=
[
...
...
src/math/Quaternion.js
浏览文件 @
760252a5
...
...
@@ -18,7 +18,7 @@ THREE.Quaternion.prototype = {
constructor
:
THREE
.
Quaternion
,
_x
:
0
,
_y
:
0
,
_z
:
0
,
_w
:
0
,
_x
:
0
,
_y
:
0
,
_z
:
0
,
_w
:
0
,
get
x
()
{
...
...
src/math/Ray.js
浏览文件 @
760252a5
...
...
@@ -356,7 +356,7 @@ THREE.Ray.prototype = {
// http://www.scratchapixel.com/lessons/3d-basic-lessons/lesson-7-intersecting-simple-shapes/ray-box-intersection/
var
tmin
,
tmax
,
tymin
,
tymax
,
tzmin
,
tzmax
;
var
tmin
,
tmax
,
tymin
,
tymax
,
tzmin
,
tzmax
;
var
invdirx
=
1
/
this
.
direction
.
x
,
invdiry
=
1
/
this
.
direction
.
y
,
...
...
utils/codestyle/config.json
浏览文件 @
760252a5
{
"preset"
:
"mdcs"
,
"disallowNewlineBeforeBlockStatements"
:
true
,
"requireSpaceAfterBinaryOperators"
:
[
","
],
"excludeFiles"
:
[
"../../.c9/"
,
"../../.c9version/"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录