Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
40b53adb
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,发现更多精彩内容 >>
提交
40b53adb
编写于
3月 12, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed AsteriskGeometry.
上级
161a0a49
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
2 addition
and
94 deletion
+2
-94
docs/api/extras/geometries/AsteriskGeometry.html
docs/api/extras/geometries/AsteriskGeometry.html
+0
-37
docs/list.js
docs/list.js
+0
-1
src/extras/geometries/AsteriskGeometry.js
src/extras/geometries/AsteriskGeometry.js
+0
-40
src/extras/helpers/DirectionalLightHelper.js
src/extras/helpers/DirectionalLightHelper.js
+1
-8
src/extras/helpers/SpotLightHelper.js
src/extras/helpers/SpotLightHelper.js
+1
-7
utils/build/includes/extras.json
utils/build/includes/extras.json
+0
-1
未找到文件。
docs/api/extras/geometries/AsteriskGeometry.html
已删除
100644 → 0
浏览文件 @
161a0a49
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<script
src=
"../../../list.js"
></script>
<script
src=
"../../../page.js"
></script>
<link
type=
"text/css"
rel=
"stylesheet"
href=
"../../../page.css"
/>
</head>
<body>
<h1>
[name]
</h1>
<div
class=
"desc"
>
todo
</div>
<h2>
Constructor
</h2>
<h3>
[name]( radius, detail )
</h3>
<h2>
Properties
</h2>
<h3>
.[page:Vector3 todo]
</h3>
<h2>
Methods
</h2>
<h3>
.todo( [page:Vector3 todo] )
</h3>
<div>
todo — todo
<br
/>
</div>
<h2>
Source
</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
docs/list.js
浏览文件 @
40b53adb
...
...
@@ -155,7 +155,6 @@ var list = {
],
"
Extras / Geometries
"
:
[
[
"
AsteriskGeometry
"
,
"
api/extras/geometries/AsteriskGeometry
"
],
[
"
CircleGeometry
"
,
"
api/extras/geometries/CircleGeometry
"
],
[
"
ConvexGeometry
"
,
"
api/extras/geometries/ConvexGeometry
"
],
[
"
CubeGeometry
"
,
"
api/extras/geometries/CubeGeometry
"
],
...
...
src/extras/geometries/AsteriskGeometry.js
已删除
100644 → 0
浏览文件 @
161a0a49
/**
* @author alteredq / http://alteredqualia.com/
*
* - 3d asterisk shape (for line pieces THREE.Line)
*/
THREE
.
AsteriskGeometry
=
function
(
innerRadius
,
outerRadius
)
{
THREE
.
Geometry
.
call
(
this
);
var
sd
=
innerRadius
;
var
ed
=
outerRadius
;
var
sd2
=
0.707
*
sd
;
var
ed2
=
0.707
*
ed
;
var
rays
=
[
[
sd
,
0
,
0
],
[
ed
,
0
,
0
],
[
-
sd
,
0
,
0
],
[
-
ed
,
0
,
0
],
[
0
,
sd
,
0
],
[
0
,
ed
,
0
],
[
0
,
-
sd
,
0
],
[
0
,
-
ed
,
0
],
[
0
,
0
,
sd
],
[
0
,
0
,
ed
],
[
0
,
0
,
-
sd
],
[
0
,
0
,
-
ed
],
[
sd2
,
sd2
,
0
],
[
ed2
,
ed2
,
0
],
[
-
sd2
,
-
sd2
,
0
],
[
-
ed2
,
-
ed2
,
0
],
[
sd2
,
-
sd2
,
0
],
[
ed2
,
-
ed2
,
0
],
[
-
sd2
,
sd2
,
0
],
[
-
ed2
,
ed2
,
0
],
[
sd2
,
0
,
sd2
],
[
ed2
,
0
,
ed2
],
[
-
sd2
,
0
,
-
sd2
],
[
-
ed2
,
0
,
-
ed2
],
[
sd2
,
0
,
-
sd2
],
[
ed2
,
0
,
-
ed2
],
[
-
sd2
,
0
,
sd2
],
[
-
ed2
,
0
,
ed2
],
[
0
,
sd2
,
sd2
],
[
0
,
ed2
,
ed2
],
[
0
,
-
sd2
,
-
sd2
],
[
0
,
-
ed2
,
-
ed2
],
[
0
,
sd2
,
-
sd2
],
[
0
,
ed2
,
-
ed2
],
[
0
,
-
sd2
,
sd2
],
[
0
,
-
ed2
,
ed2
]
];
for
(
var
i
=
0
,
il
=
rays
.
length
;
i
<
il
;
i
++
)
{
var
x
=
rays
[
i
][
0
];
var
y
=
rays
[
i
][
1
];
var
z
=
rays
[
i
][
2
];
this
.
vertices
.
push
(
new
THREE
.
Vector3
(
x
,
y
,
z
)
);
}
};
THREE
.
AsteriskGeometry
.
prototype
=
Object
.
create
(
THREE
.
Geometry
.
prototype
);
\ No newline at end of file
src/extras/helpers/DirectionalLightHelper.js
浏览文件 @
40b53adb
...
...
@@ -31,17 +31,11 @@ THREE.DirectionalLightHelper = function ( light, sphereSize ) {
// light helper
var
bulbGeometry
=
new
THREE
.
SphereGeometry
(
sphereSize
,
16
,
8
);
var
raysGeometry
=
new
THREE
.
AsteriskGeometry
(
sphereSize
*
1.25
,
sphereSize
*
2.25
);
var
bulbMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
hexColor
,
fog
:
false
}
);
var
raysMaterial
=
new
THREE
.
LineBasicMaterial
(
{
color
:
hexColor
,
fog
:
false
}
);
this
.
lightSphere
=
new
THREE
.
Mesh
(
bulbGeometry
,
bulbMaterial
);
this
.
lightRays
=
new
THREE
.
Line
(
raysGeometry
,
raysMaterial
,
THREE
.
LinePieces
);
this
.
add
(
this
.
lightSphere
);
this
.
add
(
this
.
lightRays
);
this
.
lightSphere
.
userData
.
isGizmo
=
true
;
this
.
lightSphere
.
userData
.
gizmoSubject
=
light
;
...
...
@@ -89,7 +83,7 @@ THREE.DirectionalLightHelper.prototype.update = function () {
this
.
direction
.
subVectors
(
this
.
light
.
target
.
position
,
this
.
light
.
position
);
// update arrow, spheres
, rays
and line colors to light color * light intensity
// update arrow, spheres and line colors to light color * light intensity
var
intensity
=
THREE
.
Math
.
clamp
(
this
.
light
.
intensity
,
0
,
1
);
...
...
@@ -97,7 +91,6 @@ THREE.DirectionalLightHelper.prototype.update = function () {
this
.
color
.
multiplyScalar
(
intensity
);
this
.
lightSphere
.
material
.
color
.
copy
(
this
.
color
);
this
.
lightRays
.
material
.
color
.
copy
(
this
.
color
);
// Only update targetSphere and targetLine if available
if
(
this
.
targetSphere
!==
null
)
{
...
...
src/extras/helpers/SpotLightHelper.js
浏览文件 @
40b53adb
...
...
@@ -31,7 +31,6 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
// light helper
var
bulbGeometry
=
new
THREE
.
SphereGeometry
(
sphereSize
,
16
,
8
);
var
raysGeometry
=
new
THREE
.
AsteriskGeometry
(
sphereSize
*
1.25
,
sphereSize
*
2.25
);
var
coneGeometry
=
new
THREE
.
CylinderGeometry
(
0.0001
,
1
,
1
,
8
,
1
,
true
);
var
coneMatrix
=
new
THREE
.
Matrix4
();
...
...
@@ -40,7 +39,6 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
coneGeometry
.
applyMatrix
(
coneMatrix
);
var
bulbMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
hexColor
,
fog
:
false
}
);
var
raysMaterial
=
new
THREE
.
LineBasicMaterial
(
{
color
:
hexColor
,
fog
:
false
}
);
var
coneMaterial
=
new
THREE
.
MeshBasicMaterial
(
{
color
:
hexColor
,
fog
:
false
,
wireframe
:
true
,
opacity
:
0.3
,
transparent
:
true
}
);
this
.
lightSphere
=
new
THREE
.
Mesh
(
bulbGeometry
,
bulbMaterial
);
...
...
@@ -50,12 +48,9 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
var
coneWidth
=
coneLength
*
Math
.
tan
(
light
.
angle
*
0.5
)
*
2
;
this
.
lightCone
.
scale
.
set
(
coneWidth
,
coneWidth
,
coneLength
);
this
.
lightRays
=
new
THREE
.
Line
(
raysGeometry
,
raysMaterial
,
THREE
.
LinePieces
);
this
.
gyroscope
=
new
THREE
.
Gyroscope
();
this
.
gyroscope
.
add
(
this
.
lightSphere
);
this
.
gyroscope
.
add
(
this
.
lightRays
);
this
.
add
(
this
.
gyroscope
);
this
.
add
(
this
.
lightCone
);
...
...
@@ -116,7 +111,7 @@ THREE.SpotLightHelper.prototype.update = function () {
var
coneWidth
=
coneLength
*
Math
.
tan
(
this
.
light
.
angle
*
0.5
)
*
2
;
this
.
lightCone
.
scale
.
set
(
coneWidth
,
coneWidth
,
coneLength
);
// update arrow, spheres
, rays
and line colors to light color * light intensity
// update arrow, spheres and line colors to light color * light intensity
var
intensity
=
THREE
.
Math
.
clamp
(
this
.
light
.
intensity
,
0
,
1
);
...
...
@@ -124,7 +119,6 @@ THREE.SpotLightHelper.prototype.update = function () {
this
.
color
.
multiplyScalar
(
intensity
);
this
.
lightSphere
.
material
.
color
.
copy
(
this
.
color
);
this
.
lightRays
.
material
.
color
.
copy
(
this
.
color
);
this
.
lightCone
.
material
.
color
.
copy
(
this
.
color
);
// Only update targetSphere and targetLine if available
...
...
utils/build/includes/extras.json
浏览文件 @
40b53adb
...
...
@@ -13,7 +13,6 @@
"src/extras/animation/KeyFrameAnimation.js"
,
"src/extras/cameras/CubeCamera.js"
,
"src/extras/cameras/CombinedCamera.js"
,
"src/extras/geometries/AsteriskGeometry.js"
,
"src/extras/geometries/CircleGeometry.js"
,
"src/extras/geometries/CubeGeometry.js"
,
"src/extras/geometries/CylinderGeometry.js"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录