Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
车家大少爷
three.js
提交
713cdf94
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,发现更多精彩内容 >>
提交
713cdf94
编写于
7月 23, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed Face4 out of other renderers.
上级
74b9c22d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
126 deletion
+0
-126
examples/js/renderers/SVGRenderer.js
examples/js/renderers/SVGRenderer.js
+0
-88
examples/js/renderers/SoftwareRenderer.js
examples/js/renderers/SoftwareRenderer.js
+0
-16
examples/js/renderers/WebGLRenderer3.js
examples/js/renderers/WebGLRenderer3.js
+0
-22
未找到文件。
examples/js/renderers/SVGRenderer.js
浏览文件 @
713cdf94
...
...
@@ -172,33 +172,6 @@ THREE.SVGRenderer = function () {
}
}
else
if
(
element
instanceof
THREE
.
RenderableFace4
)
{
_v1
=
element
.
v1
;
_v2
=
element
.
v2
;
_v3
=
element
.
v3
;
_v4
=
element
.
v4
;
if
(
_v1
.
positionScreen
.
z
<
-
1
||
_v1
.
positionScreen
.
z
>
1
)
continue
;
if
(
_v2
.
positionScreen
.
z
<
-
1
||
_v2
.
positionScreen
.
z
>
1
)
continue
;
if
(
_v3
.
positionScreen
.
z
<
-
1
||
_v3
.
positionScreen
.
z
>
1
)
continue
;
if
(
_v4
.
positionScreen
.
z
<
-
1
||
_v4
.
positionScreen
.
z
>
1
)
continue
;
_v1
.
positionScreen
.
x
*=
_svgWidthHalf
;
_v1
.
positionScreen
.
y
*=
-
_svgHeightHalf
;
_v2
.
positionScreen
.
x
*=
_svgWidthHalf
;
_v2
.
positionScreen
.
y
*=
-
_svgHeightHalf
;
_v3
.
positionScreen
.
x
*=
_svgWidthHalf
;
_v3
.
positionScreen
.
y
*=
-
_svgHeightHalf
;
_v4
.
positionScreen
.
x
*=
_svgWidthHalf
;
_v4
.
positionScreen
.
y
*=
-
_svgHeightHalf
;
_elemBox
.
setFromPoints
(
[
_v1
.
positionScreen
,
_v2
.
positionScreen
,
_v3
.
positionScreen
,
_v4
.
positionScreen
]
);
if
(
_clipBox
.
isIntersectionBox
(
_elemBox
)
===
true
)
{
renderFace4
(
_v1
,
_v2
,
_v3
,
_v4
,
element
,
material
);
}
}
}
...
...
@@ -394,67 +367,6 @@ THREE.SVGRenderer = function () {
}
function
renderFace4
(
v1
,
v2
,
v3
,
v4
,
element
,
material
)
{
_this
.
info
.
render
.
vertices
+=
4
;
_this
.
info
.
render
.
faces
++
;
_svgNode
=
getPathNode
(
_pathCount
++
);
_svgNode
.
setAttribute
(
'
d
'
,
'
M
'
+
v1
.
positionScreen
.
x
+
'
'
+
v1
.
positionScreen
.
y
+
'
L
'
+
v2
.
positionScreen
.
x
+
'
'
+
v2
.
positionScreen
.
y
+
'
L
'
+
v3
.
positionScreen
.
x
+
'
,
'
+
v3
.
positionScreen
.
y
+
'
L
'
+
v4
.
positionScreen
.
x
+
'
,
'
+
v4
.
positionScreen
.
y
+
'
z
'
);
if
(
material
instanceof
THREE
.
MeshBasicMaterial
)
{
_color
.
copy
(
material
.
color
);
if
(
material
.
vertexColors
===
THREE
.
FaceColors
)
{
_color
.
multiply
(
element
.
color
);
}
}
else
if
(
material
instanceof
THREE
.
MeshLambertMaterial
||
material
instanceof
THREE
.
MeshPhongMaterial
)
{
_diffuseColor
.
copy
(
material
.
color
);
if
(
material
.
vertexColors
===
THREE
.
FaceColors
)
{
_diffuseColor
.
multiply
(
element
.
color
);
}
_color
.
copy
(
_ambientLight
);
calculateLight
(
_lights
,
element
.
centroidModel
,
element
.
normalModel
,
_color
);
_color
.
multiply
(
_diffuseColor
).
add
(
material
.
emissive
);
}
else
if
(
material
instanceof
THREE
.
MeshDepthMaterial
)
{
_w
=
1
-
(
material
.
__2near
/
(
material
.
__farPlusNear
-
element
.
z
*
material
.
__farMinusNear
)
);
_color
.
setRGB
(
_w
,
_w
,
_w
);
}
else
if
(
material
instanceof
THREE
.
MeshNormalMaterial
)
{
var
normal
=
element
.
normalModelView
;
_color
.
setRGB
(
normal
.
x
,
normal
.
y
,
normal
.
z
).
multiplyScalar
(
0.5
).
addScalar
(
0.5
);
}
if
(
material
.
wireframe
)
{
_svgNode
.
setAttribute
(
'
style
'
,
'
fill: none; stroke:
'
+
_color
.
getStyle
()
+
'
; stroke-width:
'
+
material
.
wireframeLinewidth
+
'
; stroke-opacity:
'
+
material
.
opacity
+
'
; stroke-linecap:
'
+
material
.
wireframeLinecap
+
'
; stroke-linejoin:
'
+
material
.
wireframeLinejoin
);
}
else
{
_svgNode
.
setAttribute
(
'
style
'
,
'
fill:
'
+
_color
.
getStyle
()
+
'
; fill-opacity:
'
+
material
.
opacity
);
}
_svg
.
appendChild
(
_svgNode
);
}
function
getLineNode
(
id
)
{
if
(
_svgLinePool
[
id
]
==
null
)
{
...
...
examples/js/renderers/SoftwareRenderer.js
浏览文件 @
713cdf94
...
...
@@ -134,22 +134,6 @@ THREE.SoftwareRenderer = function () {
shader
,
element
,
material
)
}
else
if
(
element
instanceof
THREE
.
RenderableFace4
)
{
drawTriangle
(
element
.
v1
.
positionScreen
,
element
.
v2
.
positionScreen
,
element
.
v4
.
positionScreen
,
shader
,
element
,
material
);
drawTriangle
(
element
.
v2
.
positionScreen
,
element
.
v3
.
positionScreen
,
element
.
v4
.
positionScreen
,
shader
,
element
,
material
);
}
}
...
...
examples/js/renderers/WebGLRenderer3.js
浏览文件 @
713cdf94
...
...
@@ -143,28 +143,6 @@ THREE.WebGLRenderer3 = function ( parameters ) {
}
if
(
face
instanceof
THREE
.
Face4
)
{
addPosition
(
vertices
[
face
.
a
]
);
addPosition
(
vertices
[
face
.
c
]
);
addPosition
(
vertices
[
face
.
d
]
);
if
(
vertexNormals
===
true
)
{
addNormal
(
face
.
vertexNormals
[
0
]
);
addNormal
(
face
.
vertexNormals
[
2
]
);
addNormal
(
face
.
vertexNormals
[
3
]
);
}
else
{
addNormal
(
face
.
normal
);
addNormal
(
face
.
normal
);
addNormal
(
face
.
normal
);
}
}
}
var
buffer
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录