Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
adb27e0c
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,发现更多精彩内容 >>
提交
adb27e0c
编写于
4月 24, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renamed *Geometry2 to *TypedGeometry
上级
218e847e
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
33 addition
and
33 deletion
+33
-33
editor/index.html
editor/index.html
+1
-1
examples/js/exporters/TypedGeometryExporter.js
examples/js/exporters/TypedGeometryExporter.js
+5
-5
examples/js/loaders/STLLoader.js
examples/js/loaders/STLLoader.js
+1
-1
examples/js/wip/CircleTypedGeometry.js
examples/js/wip/CircleTypedGeometry.js
+3
-3
examples/js/wip/IndexedTypedGeometry.js
examples/js/wip/IndexedTypedGeometry.js
+3
-3
examples/js/wip/PlaneTypedGeometry.js
examples/js/wip/PlaneTypedGeometry.js
+3
-3
examples/js/wip/TypedGeometry.js
examples/js/wip/TypedGeometry.js
+6
-6
examples/webgl_geometry_minecraft.html
examples/webgl_geometry_minecraft.html
+9
-9
examples/webgl_gpgpu_birds.html
examples/webgl_gpgpu_birds.html
+1
-2
examples/webgl_loader_stl.html
examples/webgl_loader_stl.html
+1
-0
未找到文件。
editor/index.html
浏览文件 @
adb27e0c
...
...
@@ -37,7 +37,7 @@
<script
src=
"../examples/js/BufferGeometryUtils.js"
></script>
<script
src=
"../examples/js/exporters/BufferGeometryExporter.js"
></script>
<script
src=
"../examples/js/exporters/
Geometry2
Exporter.js"
></script>
<script
src=
"../examples/js/exporters/
TypedGeometry
Exporter.js"
></script>
<script
src=
"../examples/js/exporters/GeometryExporter.js"
></script>
<script
src=
"../examples/js/exporters/MaterialExporter.js"
></script>
<script
src=
"../examples/js/exporters/ObjectExporter.js"
></script>
...
...
examples/js/exporters/
Geometry2
Exporter.js
→
examples/js/exporters/
TypedGeometry
Exporter.js
浏览文件 @
adb27e0c
...
...
@@ -2,19 +2,19 @@
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
Geometry2
Exporter
=
function
()
{};
THREE
.
TypedGeometry
Exporter
=
function
()
{};
THREE
.
Geometry2
Exporter
.
prototype
=
{
THREE
.
TypedGeometry
Exporter
.
prototype
=
{
constructor
:
THREE
.
Geometry2
Exporter
,
constructor
:
THREE
.
TypedGeometry
Exporter
,
parse
:
function
(
geometry
)
{
var
output
=
{
metadata
:
{
version
:
4.0
,
type
:
'
Geometry2
'
,
generator
:
'
Geometry2
Exporter
'
type
:
'
TypedGeometry
'
,
generator
:
'
TypedGeometry
Exporter
'
}
};
...
...
examples/js/loaders/STLLoader.js
浏览文件 @
adb27e0c
...
...
@@ -108,7 +108,7 @@ THREE.STLLoader.prototype.parseBinary = function ( data ) {
var
offset
=
0
;
var
geometry
=
new
THREE
.
Geometry2
(
faces
);
var
geometry
=
new
THREE
.
TypedGeometry
(
faces
);
for
(
var
face
=
0
;
face
<
faces
;
face
++
)
{
...
...
examples/js/wip/Circle
Geometry2
.js
→
examples/js/wip/Circle
TypedGeometry
.js
浏览文件 @
adb27e0c
...
...
@@ -3,7 +3,7 @@
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
Circle
Geometry2
=
function
(
radius
,
segments
,
thetaStart
,
thetaLength
)
{
THREE
.
Circle
TypedGeometry
=
function
(
radius
,
segments
,
thetaStart
,
thetaLength
)
{
this
.
parameters
=
{
radius
:
radius
,
...
...
@@ -64,7 +64,7 @@ THREE.CircleGeometry2 = function ( radius, segments, thetaStart, thetaLength ) {
}
THREE
.
Indexed
Geometry2
.
call
(
this
);
THREE
.
Indexed
TypedGeometry
.
call
(
this
);
this
.
setArrays
(
indices
,
vertices
,
normals
,
uvs
);
...
...
@@ -72,4 +72,4 @@ THREE.CircleGeometry2 = function ( radius, segments, thetaStart, thetaLength ) {
};
THREE
.
Circle
Geometry2
.
prototype
=
Object
.
create
(
THREE
.
IndexedGeometry2
.
prototype
);
THREE
.
Circle
TypedGeometry
.
prototype
=
Object
.
create
(
THREE
.
IndexedTypedGeometry
.
prototype
);
examples/js/wip/Indexed
Geometry2
.js
→
examples/js/wip/Indexed
TypedGeometry
.js
浏览文件 @
adb27e0c
...
...
@@ -2,15 +2,15 @@
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
Indexed
Geometry2
=
function
()
{
THREE
.
Indexed
TypedGeometry
=
function
()
{
THREE
.
BufferGeometry
.
call
(
this
);
};
THREE
.
Indexed
Geometry2
.
prototype
=
Object
.
create
(
THREE
.
BufferGeometry
.
prototype
);
THREE
.
Indexed
TypedGeometry
.
prototype
=
Object
.
create
(
THREE
.
BufferGeometry
.
prototype
);
THREE
.
Indexed
Geometry2
.
prototype
.
setArrays
=
function
(
indices
,
vertices
,
normals
,
uvs
)
{
THREE
.
Indexed
TypedGeometry
.
prototype
.
setArrays
=
function
(
indices
,
vertices
,
normals
,
uvs
)
{
this
.
indices
=
indices
;
this
.
vertices
=
vertices
;
...
...
examples/js/wip/Plane
Geometry2
.js
→
examples/js/wip/Plane
TypedGeometry
.js
浏览文件 @
adb27e0c
...
...
@@ -3,7 +3,7 @@
* based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
*/
THREE
.
Plane
Geometry2
=
function
(
width
,
height
,
widthSegments
,
heightSegments
)
{
THREE
.
Plane
TypedGeometry
=
function
(
width
,
height
,
widthSegments
,
heightSegments
)
{
this
.
parameters
=
{
width
:
width
,
...
...
@@ -81,11 +81,11 @@ THREE.PlaneGeometry2 = function ( width, height, widthSegments, heightSegments )
}
THREE
.
Indexed
Geometry2
.
call
(
this
);
THREE
.
Indexed
TypedGeometry
.
call
(
this
);
this
.
setArrays
(
indices
,
vertices
,
normals
,
uvs
);
this
.
computeBoundingSphere
();
};
THREE
.
Plane
Geometry2
.
prototype
=
Object
.
create
(
THREE
.
IndexedGeometry2
.
prototype
);
THREE
.
Plane
TypedGeometry
.
prototype
=
Object
.
create
(
THREE
.
IndexedTypedGeometry
.
prototype
);
examples/js/wip/
Geometry2
.js
→
examples/js/wip/
TypedGeometry
.js
浏览文件 @
adb27e0c
...
...
@@ -2,7 +2,7 @@
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
Geometry2
=
function
(
size
)
{
THREE
.
TypedGeometry
=
function
(
size
)
{
THREE
.
BufferGeometry
.
call
(
this
);
...
...
@@ -20,9 +20,9 @@ THREE.Geometry2 = function ( size ) {
};
THREE
.
Geometry2
.
prototype
=
Object
.
create
(
THREE
.
BufferGeometry
.
prototype
);
THREE
.
TypedGeometry
.
prototype
=
Object
.
create
(
THREE
.
BufferGeometry
.
prototype
);
THREE
.
Geometry2
.
prototype
.
setArrays
=
function
(
vertices
,
normals
,
uvs
)
{
THREE
.
TypedGeometry
.
prototype
.
setArrays
=
function
(
vertices
,
normals
,
uvs
)
{
this
.
vertices
=
vertices
;
this
.
normals
=
normals
;
...
...
@@ -36,7 +36,7 @@ THREE.Geometry2.prototype.setArrays = function ( vertices, normals, uvs ) {
};
THREE
.
Geometry2
.
prototype
.
merge
=
(
function
()
{
THREE
.
TypedGeometry
.
prototype
.
merge
=
(
function
()
{
var
offset
=
0
;
var
normalMatrix
=
new
THREE
.
Matrix3
();
...
...
@@ -52,7 +52,7 @@ THREE.Geometry2.prototype.merge = ( function () {
var
normals
=
this
.
attributes
[
'
normal
'
].
array
;
var
uvs
=
this
.
attributes
[
'
uv
'
].
array
;
if
(
geometry
instanceof
THREE
.
Geometry2
)
{
if
(
geometry
instanceof
THREE
.
TypedGeometry
)
{
var
vertices2
=
geometry
.
attributes
[
'
position
'
].
array
;
var
normals2
=
geometry
.
attributes
[
'
normal
'
].
array
;
...
...
@@ -73,7 +73,7 @@ THREE.Geometry2.prototype.merge = ( function () {
}
}
else
if
(
geometry
instanceof
THREE
.
Indexed
Geometry2
)
{
}
else
if
(
geometry
instanceof
THREE
.
Indexed
TypedGeometry
)
{
var
indices2
=
geometry
.
attributes
[
'
index
'
].
array
;
var
vertices2
=
geometry
.
attributes
[
'
position
'
].
array
;
...
...
examples/webgl_geometry_minecraft.html
浏览文件 @
adb27e0c
...
...
@@ -49,9 +49,9 @@
<script
src=
"js/Detector.js"
></script>
<script
src=
"js/libs/stats.min.js"
></script>
<script
src=
"js/wip/
Geometry2
.js"
></script>
<script
src=
"js/wip/Indexed
Geometry2
.js"
></script>
<script
src=
"js/wip/Plane
Geometry2
.js"
></script>
<script
src=
"js/wip/
TypedGeometry
.js"
></script>
<script
src=
"js/wip/Indexed
TypedGeometry
.js"
></script>
<script
src=
"js/wip/Plane
TypedGeometry
.js"
></script>
<script>
...
...
@@ -96,30 +96,30 @@
var
matrix
=
new
THREE
.
Matrix4
();
var
pxGeometry
=
new
THREE
.
Plane
Geometry2
(
100
,
100
);
var
pxGeometry
=
new
THREE
.
Plane
TypedGeometry
(
100
,
100
);
pxGeometry
.
uvs
[
1
]
=
0.5
;
pxGeometry
.
uvs
[
3
]
=
0.5
;
pxGeometry
.
applyMatrix
(
matrix
.
makeRotationY
(
Math
.
PI
/
2
)
);
pxGeometry
.
applyMatrix
(
matrix
.
makeTranslation
(
50
,
0
,
0
)
);
var
nxGeometry
=
new
THREE
.
Plane
Geometry2
(
100
,
100
);
var
nxGeometry
=
new
THREE
.
Plane
TypedGeometry
(
100
,
100
);
nxGeometry
.
uvs
[
1
]
=
0.5
;
nxGeometry
.
uvs
[
3
]
=
0.5
;
nxGeometry
.
applyMatrix
(
matrix
.
makeRotationY
(
-
Math
.
PI
/
2
)
);
nxGeometry
.
applyMatrix
(
matrix
.
makeTranslation
(
-
50
,
0
,
0
)
);
var
pyGeometry
=
new
THREE
.
Plane
Geometry2
(
100
,
100
);
var
pyGeometry
=
new
THREE
.
Plane
TypedGeometry
(
100
,
100
);
pyGeometry
.
uvs
[
5
]
=
0.5
;
pyGeometry
.
uvs
[
7
]
=
0.5
;
pyGeometry
.
applyMatrix
(
matrix
.
makeRotationX
(
-
Math
.
PI
/
2
)
);
pyGeometry
.
applyMatrix
(
matrix
.
makeTranslation
(
0
,
50
,
0
)
);
var
pzGeometry
=
new
THREE
.
Plane
Geometry2
(
100
,
100
);
var
pzGeometry
=
new
THREE
.
Plane
TypedGeometry
(
100
,
100
);
pzGeometry
.
uvs
[
1
]
=
0.5
;
pzGeometry
.
uvs
[
3
]
=
0.5
;
pzGeometry
.
applyMatrix
(
matrix
.
makeTranslation
(
0
,
0
,
50
)
);
var
nzGeometry
=
new
THREE
.
Plane
Geometry2
(
100
,
100
);
var
nzGeometry
=
new
THREE
.
Plane
TypedGeometry
(
100
,
100
);
nzGeometry
.
uvs
[
1
]
=
0.5
;
nzGeometry
.
uvs
[
3
]
=
0.5
;
nzGeometry
.
applyMatrix
(
matrix
.
makeRotationY
(
Math
.
PI
)
);
...
...
@@ -127,7 +127,7 @@
//
var
geometry
=
new
THREE
.
Geometry2
(
worldWidth
*
worldDepth
*
2
);
// 2 triangles
var
geometry
=
new
THREE
.
TypedGeometry
(
worldWidth
*
worldDepth
*
2
);
// 2 triangles
for
(
var
z
=
0
;
z
<
worldDepth
;
z
++
)
{
...
...
examples/webgl_gpgpu_birds.html
浏览文件 @
adb27e0c
...
...
@@ -381,7 +381,6 @@
var
points
=
triangles
*
3
;
THREE
.
BufferGeometry
.
call
(
this
);
// THREE.Geometry2.call( this, points );
var
vertices
=
new
THREE
.
Float32Attribute
(
points
,
3
);
var
birdColors
=
new
THREE
.
Float32Attribute
(
points
,
3
);
...
...
@@ -457,7 +456,7 @@
}
THREE
.
BirdGeometry
.
prototype
=
Object
.
create
(
THREE
.
BufferGeometry
.
prototype
);
// Geometry2
THREE
.
BirdGeometry
.
prototype
=
Object
.
create
(
THREE
.
BufferGeometry
.
prototype
);
var
container
,
stats
;
...
...
examples/webgl_loader_stl.html
浏览文件 @
adb27e0c
...
...
@@ -45,6 +45,7 @@
<script
src=
"../build/three.min.js"
></script>
<script
src=
"js/loaders/STLLoader.js"
></script>
<script
src=
"js/wip/TypedGeometry.js"
></script>
<script
src=
"js/Detector.js"
></script>
<script
src=
"js/libs/stats.min.js"
></script>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录