Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
5ce7a10b
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,体验更适合开发者的 AI 搜索 >>
提交
5ce7a10b
编写于
9月 21, 2010
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Added TODO
- Minor tweaks
上级
c88fa50a
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
104 addition
and
63 deletion
+104
-63
README.md
README.md
+2
-1
TODO
TODO
+16
-0
build/Three.js
build/Three.js
+1
-1
build/ThreeDebug.js
build/ThreeDebug.js
+1
-1
src/core/Color.js
src/core/Color.js
+3
-9
src/core/Face3.js
src/core/Face3.js
+7
-3
src/core/Face4.js
src/core/Face4.js
+7
-3
src/core/Geometry.js
src/core/Geometry.js
+12
-2
src/core/Matrix4.js
src/core/Matrix4.js
+43
-39
src/core/Vertex.js
src/core/Vertex.js
+6
-2
src/materials/LineColorMaterial.js
src/materials/LineColorMaterial.js
+6
-2
未找到文件。
README.md
浏览文件 @
5ce7a10b
...
...
@@ -136,10 +136,11 @@ Thanks to the power of the internets (and github <3) these people have kindly he
### Change Log ###
2010 09 17 -
**r17**
(39.
005
kb)
2010 09 17 -
**r17**
(39.
487
kb)
*
Added
`Light`
,
`AmbientLight`
and
`DirectionalLight`
(
[
philogb
](
http://github.com/philogb
)
)
*
`WebGLRenderer`
basic lighting support (
[
philogb
](
http://github.com/philogb
)
)
*
Memory optimisations
2010 08 21 -
**r16**
(35.592 kb)
...
...
TODO
0 → 100644
浏览文件 @
5ce7a10b
- Core
- Simple hierarchy system (look at D1plo1d and tamask branches)
- Interaction, 2D to 3D projection.
- Examples
- DOMRenderer example
- Materials
- MeshBitmapSphereMappingMaterial. http://en.wikipedia.org/wiki/Sphere_mapping
- MeshBitmapCubeMappingMaterial. http://en.wikipedia.org/wiki/Cube_mapping
- MeshShaderMaterial for WebGLRenderer
- Add MeshBitmapUVMappingMaterial to WebGLRenderer
- Renderers
- Add Lights to Renderer (CanvasRenderer and SVGRenderer)
- FrustrumClipping near to Renderer (CanvasRenderer and SVGRenderer)
- Utils
- Blender 2.5b4 plugin system has change considerably :/
build/Three.js
浏览文件 @
5ce7a10b
此差异已折叠。
点击以展开。
build/ThreeDebug.js
浏览文件 @
5ce7a10b
此差异已折叠。
点击以展开。
src/core/Color.js
浏览文件 @
5ce7a10b
...
...
@@ -4,19 +4,13 @@
THREE
.
Color
=
function
(
hex
)
{
/*
this.r; this.g; this.b; this.a;
this.hex;
this.__styleString = 'rgba(0, 0, 0, 1)';
*/
this
.
setHex
(
hex
);
this
.
setHex
(
hex
);
}
THREE
.
Color
.
prototype
=
{
setHex
:
function
(
hex
)
{
setHex
:
function
(
hex
)
{
this
.
hex
=
hex
;
this
.
updateRGBA
();
...
...
src/core/Face3.js
浏览文件 @
5ce7a10b
...
...
@@ -13,10 +13,14 @@ THREE.Face3 = function ( a, b, c, normal, color ) {
this
.
color
=
color
||
new
THREE
.
Color
(
0x000000
);
this
.
toString
=
function
()
{
};
THREE
.
Face3
.
prototype
=
{
toString
:
function
()
{
return
'
THREE.Face3 (
'
+
this
.
a
+
'
,
'
+
this
.
b
+
'
,
'
+
this
.
c
+
'
)
'
;
}
;
}
}
;
}
src/core/Face4.js
浏览文件 @
5ce7a10b
...
...
@@ -14,10 +14,14 @@ THREE.Face4 = function ( a, b, c, d, normal, color ) {
this
.
color
=
color
||
new
THREE
.
Color
(
0x000000
);
this
.
toString
=
function
()
{
};
THREE
.
Face4
.
prototype
=
{
toString
:
function
()
{
return
'
THREE.Face4 (
'
+
this
.
a
+
'
,
'
+
this
.
b
+
'
,
'
+
this
.
c
+
'
'
+
this
.
d
+
'
)
'
;
}
;
}
}
;
}
src/core/Geometry.js
浏览文件 @
5ce7a10b
...
...
@@ -9,7 +9,11 @@ THREE.Geometry = function () {
this
.
faces
=
[];
this
.
uvs
=
[];
this
.
computeNormals
=
function
()
{
};
THREE
.
Geometry
.
prototype
=
{
computeNormals
:
function
()
{
var
v
,
f
,
vA
,
vB
,
vC
,
cb
,
ab
;
...
...
@@ -42,6 +46,12 @@ THREE.Geometry = function () {
}
};
},
toString
:
function
()
{
return
'
THREE.Geometry ( vertices:
'
+
this
.
vertices
+
'
, faces:
'
+
this
.
faces
+
'
)
'
;
}
};
src/core/Matrix4.js
浏览文件 @
5ce7a10b
...
...
@@ -185,24 +185,28 @@ THREE.Matrix4.prototype = {
this
.
n11
*
this
.
n22
*
this
.
n33
*
this
.
n44
);
},
transpose
:
function
()
{
function
swap
(
obj
,
p1
,
p2
)
{
var
aux
=
obj
[
p1
];
obj
[
p1
]
=
obj
[
p2
];
obj
[
p2
]
=
aux
;
}
swap
(
this
,
'
n21
'
,
'
n12
'
);
swap
(
this
,
'
n31
'
,
'
n13
'
);
swap
(
this
,
'
n32
'
,
'
n23
'
);
swap
(
this
,
'
n41
'
,
'
n14
'
);
swap
(
this
,
'
n42
'
,
'
n24
'
);
swap
(
this
,
'
n43
'
,
'
n34
'
);
return
this
;
},
transpose
:
function
()
{
function
swap
(
obj
,
p1
,
p2
)
{
var
aux
=
obj
[
p1
];
obj
[
p1
]
=
obj
[
p2
];
obj
[
p2
]
=
aux
;
}
swap
(
this
,
'
n21
'
,
'
n12
'
);
swap
(
this
,
'
n31
'
,
'
n13
'
);
swap
(
this
,
'
n32
'
,
'
n23
'
);
swap
(
this
,
'
n41
'
,
'
n14
'
);
swap
(
this
,
'
n42
'
,
'
n24
'
);
swap
(
this
,
'
n43
'
,
'
n34
'
);
return
this
;
},
clone
:
function
()
{
var
m
=
new
THREE
.
Matrix4
();
...
...
@@ -213,14 +217,14 @@ THREE.Matrix4.prototype = {
return
m
;
},
flatten
:
function
()
{
return
[
this
.
n11
,
this
.
n21
,
this
.
n31
,
this
.
n41
,
this
.
n12
,
this
.
n22
,
this
.
n32
,
this
.
n42
,
this
.
n13
,
this
.
n23
,
this
.
n33
,
this
.
n43
,
this
.
n14
,
this
.
n24
,
this
.
n34
,
this
.
n44
];
},
toString
:
function
()
{
...
...
@@ -296,25 +300,25 @@ THREE.Matrix4.rotationZMatrix = function ( theta ) {
THREE
.
Matrix4
.
rotationAxisAngleMatrix
=
function
(
axis
,
angle
)
{
//Based on http://www.gamedev.net/reference/articles/article1199.asp
var
rot
=
new
THREE
.
Matrix4
();
var
c
=
Math
.
cos
(
angle
);
var
s
=
Math
.
sin
(
angle
);
var
t
=
1
-
c
;
var
x
=
axis
.
x
,
y
=
axis
.
y
,
z
=
axis
.
z
;
rot
.
n11
=
t
*
x
*
x
+
c
;
rot
.
n12
=
t
*
x
*
y
-
s
*
z
;
rot
.
n13
=
t
*
x
*
z
+
s
*
y
;
rot
.
n21
=
t
*
x
*
y
+
s
*
z
;
rot
.
n22
=
t
*
y
*
y
+
c
;
rot
.
n23
=
t
*
y
*
z
-
s
*
x
;
rot
.
n31
=
t
*
x
*
z
-
s
*
y
;
rot
.
n32
=
t
*
y
*
z
+
s
*
x
;
rot
.
n33
=
t
*
z
*
z
+
c
;
return
rot
;
//Based on http://www.gamedev.net/reference/articles/article1199.asp
var
rot
=
new
THREE
.
Matrix4
(),
c
=
Math
.
cos
(
angle
),
s
=
Math
.
sin
(
angle
),
t
=
1
-
c
,
x
=
axis
.
x
,
y
=
axis
.
y
,
z
=
axis
.
z
;
rot
.
n11
=
t
*
x
*
x
+
c
;
rot
.
n12
=
t
*
x
*
y
-
s
*
z
;
rot
.
n13
=
t
*
x
*
z
+
s
*
y
;
rot
.
n21
=
t
*
x
*
y
+
s
*
z
;
rot
.
n22
=
t
*
y
*
y
+
c
;
rot
.
n23
=
t
*
y
*
z
-
s
*
x
;
rot
.
n31
=
t
*
x
*
z
-
s
*
y
;
rot
.
n32
=
t
*
y
*
z
+
s
*
x
;
rot
.
n33
=
t
*
z
*
z
+
c
;
return
rot
;
};
...
...
src/core/Vertex.js
浏览文件 @
5ce7a10b
...
...
@@ -10,8 +10,12 @@ THREE.Vertex = function ( position, normal ) {
this
.
__visible
=
true
;
this
.
toString
=
function
()
{
}
THREE
.
Vertex
.
prototype
=
{
toString
:
function
()
{
return
'
THREE.Vertex ( position:
'
+
this
.
position
+
'
, normal:
'
+
this
.
normal
+
'
)
'
;
}
;
}
};
src/materials/LineColorMaterial.js
浏览文件 @
5ce7a10b
...
...
@@ -8,10 +8,14 @@ THREE.LineColorMaterial = function ( hex, opacity, lineWidth ) {
this
.
color
=
new
THREE
.
Color
(
(
opacity
>=
0
?
(
opacity
*
0xff
)
<<
24
:
0xff000000
)
|
hex
);
this
.
toString
=
function
()
{
};
THREE
.
LineColorMaterial
.
prototype
=
{
toString
:
function
()
{
return
'
THREE.LineColorMaterial ( color:
'
+
this
.
color
+
'
, lineWidth:
'
+
this
.
lineWidth
+
'
)
'
;
}
;
}
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录