Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
81ef5c3b
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,发现更多精彩内容 >>
提交
81ef5c3b
编写于
9月 11, 2012
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Made Projector.projectObject more open for custom rendererers.
上级
6c0629db
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
63 addition
and
39 deletion
+63
-39
examples/js/renderers/DOMRenderer.js
examples/js/renderers/DOMRenderer.js
+1
-1
examples/js/renderers/SVGRenderer.js
examples/js/renderers/SVGRenderer.js
+1
-1
examples/js/renderers/SoftwareRenderer.js
examples/js/renderers/SoftwareRenderer.js
+1
-1
examples/js/renderers/SoftwareRenderer2.js
examples/js/renderers/SoftwareRenderer2.js
+1
-1
examples/js/renderers/SoftwareRenderer3.js
examples/js/renderers/SoftwareRenderer3.js
+1
-1
src/core/Projector.js
src/core/Projector.js
+54
-30
src/materials/ParticleDOMMaterial.js
src/materials/ParticleDOMMaterial.js
+4
-4
未找到文件。
examples/js/renderers/DOMRenderer.js
浏览文件 @
81ef5c3b
/**
* @author mr
.
doob / http://mrdoob.com/
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
DOMRenderer
=
function
()
{
...
...
examples/js/renderers/SVGRenderer.js
浏览文件 @
81ef5c3b
/**
* @author mr
.
doob / http://mrdoob.com/
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
SVGRenderer
=
function
()
{
...
...
examples/js/renderers/SoftwareRenderer.js
浏览文件 @
81ef5c3b
/**
* @author mr
.
doob / http://mrdoob.com/
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
SoftwareRenderer
=
function
()
{
...
...
examples/js/renderers/SoftwareRenderer2.js
浏览文件 @
81ef5c3b
/**
* @author mr
.
doob / http://mrdoob.com/
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
SoftwareRenderer2
=
function
()
{
...
...
examples/js/renderers/SoftwareRenderer3.js
浏览文件 @
81ef5c3b
/**
* @author mr
.
doob / http://mrdoob.com/
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
SoftwareRenderer3
=
function
()
{
...
...
src/core/Projector.js
浏览文件 @
81ef5c3b
...
...
@@ -76,12 +76,21 @@ THREE.Projector = function() {
_renderData
.
sprites
.
length
=
0
;
_renderData
.
lights
.
length
=
0
;
var
projectObject
=
function
(
objec
t
)
{
var
projectObject
=
function
(
paren
t
)
{
if
(
object
.
visible
===
false
)
return
;
for
(
var
c
=
0
,
cl
=
parent
.
children
.
length
;
c
<
cl
;
c
++
)
{
if
(
(
object
instanceof
THREE
.
Mesh
||
object
instanceof
THREE
.
Line
)
&&
(
object
.
frustumCulled
===
false
||
_frustum
.
contains
(
object
)
===
true
)
)
{
var
object
=
parent
.
children
[
c
];
if
(
object
.
visible
===
false
)
continue
;
if
(
object
instanceof
THREE
.
Light
)
{
_renderData
.
lights
.
push
(
object
);
}
else
if
(
object
instanceof
THREE
.
Mesh
||
object
instanceof
THREE
.
Line
)
{
if
(
object
.
frustumCulled
===
false
||
_frustum
.
contains
(
object
)
===
true
)
{
_object
=
getNextObjectInPool
();
_object
.
object
=
object
;
...
...
@@ -100,6 +109,8 @@ THREE.Projector = function() {
_renderData
.
objects
.
push
(
_object
);
}
}
else
if
(
object
instanceof
THREE
.
Sprite
||
object
instanceof
THREE
.
Particle
)
{
_object
=
getNextObjectInPool
();
...
...
@@ -121,15 +132,28 @@ THREE.Projector = function() {
_renderData
.
sprites
.
push
(
_object
);
}
else
if
(
object
instanceof
THREE
.
Light
)
{
}
else
{
_renderData
.
lights
.
push
(
object
);
_object
=
getNextObjectInPool
();
_object
.
object
=
object
;
if
(
object
.
renderDepth
!==
null
)
{
_object
.
z
=
object
.
renderDepth
;
}
else
{
_vector3
.
copy
(
object
.
matrixWorld
.
getPosition
()
);
_viewProjectionMatrix
.
multiplyVector3
(
_vector3
);
_object
.
z
=
_vector3
.
z
;
}
for
(
var
c
=
0
,
cl
=
object
.
children
.
length
;
c
<
cl
;
c
++
)
{
_renderData
.
objects
.
push
(
_object
);
}
projectObject
(
object
.
children
[
c
]
);
projectObject
(
object
);
}
...
...
src/materials/ParticleDOMMaterial.js
浏览文件 @
81ef5c3b
...
...
@@ -2,14 +2,14 @@
* @author mrdoob / http://mrdoob.com/
*/
THREE
.
ParticleDOMMaterial
=
function
(
domE
lement
)
{
THREE
.
ParticleDOMMaterial
=
function
(
e
lement
)
{
this
.
domElement
=
domE
lement
;
this
.
element
=
e
lement
;
};
THREE
.
ParticleDOMMaterial
.
prototype
.
clone
=
function
(){
return
new
THREE
.
ParticleDOMMaterial
(
this
.
domE
lement
);
return
new
THREE
.
ParticleDOMMaterial
(
this
.
e
lement
);
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录