Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
b61ee54f
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,体验更适合开发者的 AI 搜索 >>
提交
b61ee54f
编写于
6月 10, 2011
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renamed all extras/geometries.
上级
9acdcbb6
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
59 addition
and
58 deletion
+59
-58
src/extras/geometries/CubeGeometry.js
src/extras/geometries/CubeGeometry.js
+3
-3
src/extras/geometries/CylinderGeometry.js
src/extras/geometries/CylinderGeometry.js
+3
-3
src/extras/geometries/IcosahedronGeometry.js
src/extras/geometries/IcosahedronGeometry.js
+3
-3
src/extras/geometries/LatheGeometry.js
src/extras/geometries/LatheGeometry.js
+3
-3
src/extras/geometries/PlaneGeometry.js
src/extras/geometries/PlaneGeometry.js
+3
-3
src/extras/geometries/SphereGeometry.js
src/extras/geometries/SphereGeometry.js
+5
-4
src/extras/geometries/TextGeometry.js
src/extras/geometries/TextGeometry.js
+11
-11
src/extras/geometries/TorusGeometry.js
src/extras/geometries/TorusGeometry.js
+3
-3
src/extras/geometries/TorusKnotGeometry.js
src/extras/geometries/TorusKnotGeometry.js
+3
-3
utils/build.bat
utils/build.bat
+1
-1
utils/build.py
utils/build.py
+15
-15
utils/build.sh
utils/build.sh
+1
-1
utils/build.xml
utils/build.xml
+3
-3
utils/build_all.bat
utils/build_all.bat
+1
-1
utils/build_all.sh
utils/build_all.sh
+1
-1
未找到文件。
src/extras/geometries/Cube.js
→
src/extras/geometries/Cube
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -3,7 +3,7 @@
* based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Cube.as
*/
THREE
.
Cube
=
function
(
width
,
height
,
depth
,
segmentsWidth
,
segmentsHeight
,
segmentsDepth
,
materials
,
flipped
,
sides
)
{
THREE
.
Cube
Geometry
=
function
(
width
,
height
,
depth
,
segmentsWidth
,
segmentsHeight
,
segmentsDepth
,
materials
,
flipped
,
sides
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -182,5 +182,5 @@ THREE.Cube = function ( width, height, depth, segmentsWidth, segmentsHeight, seg
};
THREE
.
Cube
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Cube
.
prototype
.
constructor
=
THREE
.
Cube
;
THREE
.
Cube
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Cube
Geometry
.
prototype
.
constructor
=
THREE
.
CubeGeometry
;
src/extras/geometries/Cylinder.js
→
src/extras/geometries/Cylinder
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -4,7 +4,7 @@
* @author fuzzthink
*/
THREE
.
Cylinder
=
function
(
numSegs
,
topRad
,
botRad
,
height
,
topOffset
,
botOffset
)
{
THREE
.
Cylinder
Geometry
=
function
(
numSegs
,
topRad
,
botRad
,
height
,
topOffset
,
botOffset
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -119,5 +119,5 @@ THREE.Cylinder = function ( numSegs, topRad, botRad, height, topOffset, botOffse
};
THREE
.
Cylinder
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Cylinder
.
prototype
.
constructor
=
THREE
.
Cylinder
;
THREE
.
Cylinder
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Cylinder
Geometry
.
prototype
.
constructor
=
THREE
.
CylinderGeometry
;
src/extras/geometries/Icosahedron.js
→
src/extras/geometries/Icosahedron
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -6,7 +6,7 @@
* so it draws the entire texture on the seam-faces, I think...
*/
THREE
.
Icosahedron
=
function
(
subdivisions
)
{
THREE
.
Icosahedron
Geometry
=
function
(
subdivisions
)
{
var
scope
=
this
;
var
tempScope
=
new
THREE
.
Geometry
();
...
...
@@ -173,5 +173,5 @@ THREE.Icosahedron = function ( subdivisions ) {
}
THREE
.
Icosahedron
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Icosahedron
.
prototype
.
constructor
=
THREE
.
Icosahedron
;
THREE
.
Icosahedron
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Icosahedron
Geometry
.
prototype
.
constructor
=
THREE
.
IcosahedronGeometry
;
src/extras/geometries/Lathe.js
→
src/extras/geometries/Lathe
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -2,7 +2,7 @@
* @author astrodud / http://astrodud.isgreat.org/
*/
THREE
.
Lathe
=
function
(
points
,
steps
,
angle
)
{
THREE
.
Lathe
Geometry
=
function
(
points
,
steps
,
angle
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -67,5 +67,5 @@ THREE.Lathe = function ( points, steps, angle ) {
};
THREE
.
Lathe
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Lathe
.
prototype
.
constructor
=
THREE
.
Lathe
;
THREE
.
Lathe
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Lathe
Geometry
.
prototype
.
constructor
=
THREE
.
LatheGeometry
;
src/extras/geometries/Plane.js
→
src/extras/geometries/Plane
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -3,7 +3,7 @@
* based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
*/
THREE
.
Plane
=
function
(
width
,
height
,
segmentsWidth
,
segmentsHeight
)
{
THREE
.
Plane
Geometry
=
function
(
width
,
height
,
segmentsWidth
,
segmentsHeight
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -57,5 +57,5 @@ THREE.Plane = function ( width, height, segmentsWidth, segmentsHeight ) {
};
THREE
.
Plane
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Plane
.
prototype
.
constructor
=
THREE
.
Plane
;
THREE
.
Plane
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Plane
Geometry
.
prototype
.
constructor
=
THREE
.
PlaneGeometry
;
src/extras/geometries/Sphere.js
→
src/extras/geometries/Sphere
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -3,11 +3,12 @@
* based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Sphere.as
*/
THREE
.
Sphere
=
function
(
radius
,
segmentsWidth
,
segmentsHeight
)
{
THREE
.
Sphere
Geometry
=
function
(
radius
,
segmentsWidth
,
segmentsHeight
)
{
THREE
.
Geometry
.
call
(
this
);
var
gridX
=
segmentsWidth
||
8
,
var
radius
=
radius
||
50
,
gridX
=
segmentsWidth
||
8
,
gridY
=
segmentsHeight
||
6
;
var
i
,
j
,
pi
=
Math
.
PI
;
...
...
@@ -111,5 +112,5 @@ THREE.Sphere = function ( radius, segmentsWidth, segmentsHeight ) {
};
THREE
.
Sphere
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Sphere
.
prototype
.
constructor
=
THREE
.
Sphere
;
THREE
.
Sphere
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Sphere
Geometry
.
prototype
.
constructor
=
THREE
.
SphereGeometry
;
src/extras/geometries/Text.js
→
src/extras/geometries/Text
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -28,7 +28,7 @@
*
*/
THREE
.
Text
=
function
(
text
,
parameters
)
{
THREE
.
Text
Geometry
=
function
(
text
,
parameters
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -37,10 +37,10 @@ THREE.Text = function ( text, parameters ) {
};
THREE
.
Text
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Text
.
prototype
.
constructor
=
THREE
.
Text
;
THREE
.
Text
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Text
Geometry
.
prototype
.
constructor
=
THREE
.
TextGeometry
;
THREE
.
Text
.
prototype
.
set
=
function
(
text
,
parameters
)
{
THREE
.
Text
Geometry
.
prototype
.
set
=
function
(
text
,
parameters
)
{
this
.
text
=
text
;
var
parameters
=
parameters
||
this
.
parameters
;
...
...
@@ -144,13 +144,13 @@ THREE.Text.prototype.set = function ( text, parameters ) {
if
(
vertices
[
k
].
equals
(
contour
[
i
-
1
]
)
)
break
;
}
f4
(
j
,
k
,
k
+
vlen
,
j
+
vlen
);
}
f4
(
j
,
k
,
k
+
vlen
,
j
+
vlen
);
}
// UVs to be added
// UVs to be added
this
.
computeCentroids
();
this
.
computeFaceNormals
();
...
...
@@ -167,8 +167,8 @@ THREE.Text.prototype.set = function ( text, parameters ) {
scope
.
faces
.
push
(
new
THREE
.
Face3
(
a
,
b
,
c
)
);
}
function
f4
(
a
,
b
,
c
,
d
)
{
function
f4
(
a
,
b
,
c
,
d
)
{
scope
.
faces
.
push
(
new
THREE
.
Face4
(
a
,
b
,
c
,
d
)
);
...
...
src/extras/geometries/Torus.js
→
src/extras/geometries/Torus
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -3,7 +3,7 @@
* based on http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3DLite/src/away3dlite/primitives/Torus.as?r=2888
*/
THREE
.
Torus
=
function
(
radius
,
tube
,
segmentsR
,
segmentsT
)
{
THREE
.
Torus
Geometry
=
function
(
radius
,
tube
,
segmentsR
,
segmentsT
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -74,5 +74,5 @@ THREE.Torus = function ( radius, tube, segmentsR, segmentsT ) {
};
THREE
.
Torus
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Torus
.
prototype
.
constructor
=
THREE
.
Torus
;
THREE
.
Torus
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
Torus
Geometry
.
prototype
.
constructor
=
THREE
.
TorusGeometry
;
src/extras/geometries/TorusKnot.js
→
src/extras/geometries/TorusKnot
Geometry
.js
浏览文件 @
b61ee54f
...
...
@@ -3,7 +3,7 @@
* based on http://code.google.com/p/away3d/source/browse/trunk/fp10/Away3D/src/away3d/primitives/TorusKnot.as?spec=svn2473&r=2473
*/
THREE
.
TorusKnot
=
function
(
radius
,
tube
,
segmentsR
,
segmentsT
,
p
,
q
,
heightScale
)
{
THREE
.
TorusKnot
Geometry
=
function
(
radius
,
tube
,
segmentsR
,
segmentsT
,
p
,
q
,
heightScale
)
{
THREE
.
Geometry
.
call
(
this
);
...
...
@@ -104,5 +104,5 @@ THREE.TorusKnot = function ( radius, tube, segmentsR, segmentsT, p, q, heightSca
};
THREE
.
TorusKnot
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
TorusKnot
.
prototype
.
constructor
=
THREE
.
TorusKnot
;
THREE
.
TorusKnot
Geometry
.
prototype
=
new
THREE
.
Geometry
();
THREE
.
TorusKnot
Geometry
.
prototype
.
constructor
=
THREE
.
TorusKnotGeometry
;
utils/build.bat
浏览文件 @
b61ee54f
python
build
.py
--common --
includes
python
build
.py
--common --
minified
utils/build.py
浏览文件 @
b61ee54f
...
...
@@ -94,15 +94,15 @@ EXTRAS_FILES = [
'extras/cameras/FlyCamera.js'
,
'extras/cameras/RollCamera.js'
,
'extras/cameras/TrackballCamera.js'
,
'extras/geometries/Cube.js'
,
'extras/geometries/Cylinder.js'
,
'extras/geometries/Icosahedron.js'
,
'extras/geometries/Lathe.js'
,
'extras/geometries/Plane.js'
,
'extras/geometries/Sphere.js'
,
'extras/geometries/T
orus
.js'
,
'extras/geometries/Torus
Knot
.js'
,
'extras/geometries/T
ext
.js'
,
'extras/geometries/Cube
Geometry
.js'
,
'extras/geometries/Cylinder
Geometry
.js'
,
'extras/geometries/Icosahedron
Geometry
.js'
,
'extras/geometries/Lathe
Geometry
.js'
,
'extras/geometries/Plane
Geometry
.js'
,
'extras/geometries/Sphere
Geometry
.js'
,
'extras/geometries/T
extGeometry
.js'
,
'extras/geometries/Torus
Geometry
.js'
,
'extras/geometries/T
orusKnotGeometry
.js'
,
'extras/io/Loader.js'
,
'extras/io/JSONLoader.js'
,
'extras/io/BinaryLoader.js'
,
...
...
@@ -356,7 +356,7 @@ def makeDebug(text):
return
text
def
buildLib
(
files
,
debug
,
un
minified
,
filename
):
def
buildLib
(
files
,
debug
,
minified
,
filename
):
text
=
merge
(
files
)
...
...
@@ -375,7 +375,7 @@ def buildLib(files, debug, unminified, filename):
print
"Compiling"
,
filename
print
"="
*
40
if
not
un
minified
:
if
minified
:
text
=
compress
(
text
)
output
(
addHeader
(
text
,
filename
),
folder
+
filename
)
...
...
@@ -401,7 +401,7 @@ def parse_args():
parser
.
add_argument
(
'--svg'
,
help
=
'Build ThreeSVG.js'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--dom'
,
help
=
'Build ThreeDOM.js'
,
action
=
'store_true'
)
parser
.
add_argument
(
'--debug'
,
help
=
'Generate debug versions'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
)
parser
.
add_argument
(
'--
unminified'
,
help
=
'Generate un
minified versions'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
)
parser
.
add_argument
(
'--
minified'
,
help
=
'Generate
minified versions'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
)
parser
.
add_argument
(
'--all'
,
help
=
'Build all Three.js versions'
,
action
=
'store_true'
)
args
=
parser
.
parse_args
()
...
...
@@ -416,7 +416,7 @@ def parse_args():
parser
.
add_option
(
'--svg'
,
dest
=
'svg'
,
help
=
'Build ThreeSVG.js'
,
action
=
'store_true'
)
parser
.
add_option
(
'--dom'
,
dest
=
'dom'
,
help
=
'Build ThreeDOM.js'
,
action
=
'store_true'
)
parser
.
add_option
(
'--debug'
,
dest
=
'debug'
,
help
=
'Generate debug versions'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
)
parser
.
add_option
(
'--
unminified'
,
help
=
'Generate un
minified versions'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
)
parser
.
add_option
(
'--
minified'
,
help
=
'Generate
minified versions'
,
action
=
'store_const'
,
const
=
True
,
default
=
False
)
parser
.
add_option
(
'--all'
,
dest
=
'all'
,
help
=
'Build all Three.js versions'
,
action
=
'store_true'
)
args
,
remainder
=
parser
.
parse_args
()
...
...
@@ -433,7 +433,7 @@ def main(argv=None):
args
=
parse_args
()
debug
=
args
.
debug
unminified
=
args
.
un
minified
minified
=
args
.
minified
config
=
[
[
'Three'
,
'includes'
,
COMMON_FILES
+
EXTRAS_FILES
,
args
.
common
],
...
...
@@ -446,7 +446,7 @@ def main(argv=None):
for
fname_lib
,
fname_inc
,
files
,
enabled
in
config
:
if
enabled
or
args
.
all
:
buildLib
(
files
,
debug
,
un
minified
,
fname_lib
)
buildLib
(
files
,
debug
,
minified
,
fname_lib
)
if
args
.
includes
:
buildIncludes
(
files
,
fname_inc
)
...
...
utils/build.sh
浏览文件 @
b61ee54f
#!/bin/sh
python build.py
--common
python build.py
--common
--minified
utils/build.xml
浏览文件 @
b61ee54f
...
...
@@ -27,11 +27,11 @@
</exec>
</target>
<target
name=
"
unminified"
description=
"Build debug
THREE.js"
>
<target
name=
"
minified"
description=
"Build minified
THREE.js"
>
<exec
executable=
"${python_dir}python"
>
<arg
value=
"${build_py}"
/>
<arg
value=
"--all"
/>
<arg
value=
"--
un
minified"
/>
<arg
value=
"--minified"
/>
</exec>
</target>
</project>
\ No newline at end of file
</project>
utils/build_all.bat
浏览文件 @
b61ee54f
python
build
.py
--all --
includes
python
build
.py
--all --
minified
utils/build_all.sh
浏览文件 @
b61ee54f
#!/bin/sh
python build.py
--all
python build.py
--all
--minified
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录