Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
e58553d1
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,发现更多精彩内容 >>
提交
e58553d1
编写于
4月 30, 2014
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renamed ParticleSystem to Points and ParticleSystemMaterial to PointsMaterial. See #4726.
上级
3c49906e
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
69 addition
and
27 deletion
+69
-27
src/core/Geometry.js
src/core/Geometry.js
+1
-1
src/extras/core/CurvePath.js
src/extras/core/CurvePath.js
+1
-1
src/extras/renderers/plugins/DepthPassPlugin.js
src/extras/renderers/plugins/DepthPassPlugin.js
+2
-2
src/extras/renderers/plugins/ShadowMapPlugin.js
src/extras/renderers/plugins/ShadowMapPlugin.js
+1
-1
src/materials/PointsMaterial.js
src/materials/PointsMaterial.js
+10
-5
src/objects/Points.js
src/objects/Points.js
+37
-0
src/renderers/CanvasRenderer.js
src/renderers/CanvasRenderer.js
+4
-3
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+8
-8
utils/build/includes/canvas.json
utils/build/includes/canvas.json
+1
-1
utils/build/includes/common.json
utils/build/includes/common.json
+2
-2
utils/build/includes/webgl.json
utils/build/includes/webgl.json
+2
-3
未找到文件。
src/core/Geometry.js
浏览文件 @
e58553d1
...
...
@@ -15,7 +15,7 @@ THREE.Geometry = function () {
this
.
name
=
''
;
this
.
vertices
=
[];
this
.
colors
=
[];
// one-to-one vertex colors, used in P
articleSystem
and Line
this
.
colors
=
[];
// one-to-one vertex colors, used in P
oints
and Line
this
.
faces
=
[];
...
...
src/extras/core/CurvePath.js
浏览文件 @
e58553d1
...
...
@@ -197,7 +197,7 @@ THREE.CurvePath.prototype.getBoundingBox = function () {
* Create Geometries Helpers
**************************************************************/
/// Generate geometry from path points (for Line or P
articleSystem
objects)
/// Generate geometry from path points (for Line or P
oints
objects)
THREE
.
CurvePath
.
prototype
.
createPointsGeometry
=
function
(
divisions
)
{
...
...
src/extras/renderers/plugins/DepthPassPlugin.js
浏览文件 @
e58553d1
...
...
@@ -88,7 +88,7 @@ THREE.DepthPassPlugin = function () {
if
(
object
.
visible
)
{
if
(
!
(
object
instanceof
THREE
.
Mesh
||
object
instanceof
THREE
.
ParticleSystem
)
||
!
(
object
.
frustumCulled
)
||
_frustum
.
intersectsObject
(
object
)
)
{
if
(
object
.
frustumCulled
===
false
||
_frustum
.
intersectsObject
(
object
)
===
true
)
{
object
.
_modelViewMatrix
.
multiplyMatrices
(
camera
.
matrixWorldInverse
,
object
.
matrixWorld
);
...
...
@@ -115,7 +115,7 @@ THREE.DepthPassPlugin = function () {
// todo: create proper depth material for particles
if
(
object
instanceof
THREE
.
P
articleSystem
&&
!
object
.
customDepthMaterial
)
continue
;
if
(
object
instanceof
THREE
.
P
oints
&&
!
object
.
customDepthMaterial
)
continue
;
objectMaterial
=
getObjectMaterial
(
object
);
...
...
src/extras/renderers/plugins/ShadowMapPlugin.js
浏览文件 @
e58553d1
...
...
@@ -241,7 +241,7 @@ THREE.ShadowMapPlugin = function () {
if
(
object
.
visible
&&
object
.
castShadow
)
{
if
(
!
(
object
instanceof
THREE
.
Mesh
||
object
instanceof
THREE
.
ParticleSystem
)
||
!
(
object
.
frustumCulled
)
||
_frustum
.
intersectsObject
(
object
)
)
{
if
(
object
.
frustumCulled
===
false
||
_frustum
.
intersectsObject
(
object
)
===
true
)
{
object
.
_modelViewMatrix
.
multiplyMatrices
(
shadowCamera
.
matrixWorldInverse
,
object
.
matrixWorld
);
...
...
src/materials/P
articleSystem
Material.js
→
src/materials/P
oints
Material.js
浏览文件 @
e58553d1
...
...
@@ -19,7 +19,7 @@
* }
*/
THREE
.
P
articleSystem
Material
=
function
(
parameters
)
{
THREE
.
P
oints
Material
=
function
(
parameters
)
{
THREE
.
Material
.
call
(
this
);
...
...
@@ -38,11 +38,11 @@ THREE.ParticleSystemMaterial = function ( parameters ) {
};
THREE
.
P
articleSystem
Material
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
P
oints
Material
.
prototype
=
Object
.
create
(
THREE
.
Material
.
prototype
);
THREE
.
P
articleSystem
Material
.
prototype
.
clone
=
function
()
{
THREE
.
P
oints
Material
.
prototype
.
clone
=
function
()
{
var
material
=
new
THREE
.
P
article
SystemMaterial
();
var
material
=
new
THREE
.
P
oints
SystemMaterial
();
THREE
.
Material
.
prototype
.
clone
.
call
(
this
,
material
);
...
...
@@ -63,4 +63,9 @@ THREE.ParticleSystemMaterial.prototype.clone = function () {
// backwards compatibility
THREE
.
ParticleBasicMaterial
=
THREE
.
ParticleSystemMaterial
;
THREE
.
ParticleSystemMaterial
=
function
(
parameters
)
{
console
.
warn
(
'
THREE.ParticleSystemMaterial has been DEPRECATED. Use THREE.PointsMaterial instead.
'
);
return
new
THREE
.
PointsMaterial
(
parameters
);
}
\ No newline at end of file
src/objects/P
articleSystem
.js
→
src/objects/P
oints
.js
浏览文件 @
e58553d1
...
...
@@ -2,22 +2,22 @@
* @author alteredq / http://alteredqualia.com/
*/
THREE
.
P
articleSystem
=
function
(
geometry
,
material
)
{
THREE
.
P
oints
=
function
(
geometry
,
material
)
{
THREE
.
Object3D
.
call
(
this
);
this
.
geometry
=
geometry
!==
undefined
?
geometry
:
new
THREE
.
Geometry
();
this
.
material
=
material
!==
undefined
?
material
:
new
THREE
.
P
articleSystem
Material
(
{
color
:
Math
.
random
()
*
0xffffff
}
);
this
.
material
=
material
!==
undefined
?
material
:
new
THREE
.
P
oints
Material
(
{
color
:
Math
.
random
()
*
0xffffff
}
);
this
.
sortParticles
=
false
;
};
THREE
.
P
articleSystem
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
P
oints
.
prototype
=
Object
.
create
(
THREE
.
Object3D
.
prototype
);
THREE
.
P
articleSystem
.
prototype
.
clone
=
function
(
object
)
{
THREE
.
P
oints
.
prototype
.
clone
=
function
(
object
)
{
if
(
object
===
undefined
)
object
=
new
THREE
.
P
articleSystem
(
this
.
geometry
,
this
.
material
);
if
(
object
===
undefined
)
object
=
new
THREE
.
P
oints
(
this
.
geometry
,
this
.
material
);
object
.
sortParticles
=
this
.
sortParticles
;
...
...
@@ -26,3 +26,12 @@ THREE.ParticleSystem.prototype.clone = function ( object ) {
return
object
;
};
// Backwards compatibility
THREE
.
ParticleSystem
=
function
(
geometry
,
material
)
{
console
.
warn
(
'
THREE.ParticleSystem has been DEPRECATED. Use THREE.Points instead.
'
);
return
new
THREE
.
Points
(
geometry
,
material
);
};
\ No newline at end of file
src/renderers/CanvasRenderer.js
浏览文件 @
e58553d1
...
...
@@ -441,8 +441,7 @@ THREE.CanvasRenderer = function ( parameters ) {
_elemBox
.
min
.
set
(
v1
.
x
-
dist
,
v1
.
y
-
dist
);
_elemBox
.
max
.
set
(
v1
.
x
+
dist
,
v1
.
y
+
dist
);
if
(
material
instanceof
THREE
.
SpriteMaterial
||
material
instanceof
THREE
.
ParticleSystemMaterial
)
{
// Backwards compatibility
if
(
material
instanceof
THREE
.
SpriteMaterial
)
{
var
texture
=
material
.
map
;
...
...
@@ -494,7 +493,9 @@ THREE.CanvasRenderer = function ( parameters ) {
_context
.
fillRect
(
ox
,
oy
,
sx
,
sy
);
_context
.
restore
();
}
else
{
// no texture
}
else
{
// no texture
setFillStyle
(
material
.
color
.
getStyle
()
);
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
e58553d1
...
...
@@ -2674,7 +2674,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
else
if
(
object
instanceof
THREE
.
P
articleSystem
)
{
}
else
if
(
object
instanceof
THREE
.
P
oints
)
{
// render particles
...
...
@@ -3006,7 +3006,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// render particles
}
else
if
(
object
instanceof
THREE
.
P
articleSystem
)
{
}
else
if
(
object
instanceof
THREE
.
P
oints
)
{
_gl
.
drawArrays
(
_gl
.
POINTS
,
0
,
geometryGroup
.
__webglParticleCount
);
...
...
@@ -3762,7 +3762,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
else
if
(
object
instanceof
THREE
.
P
articleSystem
)
{
}
else
if
(
object
instanceof
THREE
.
P
oints
)
{
if
(
!
geometry
.
__webglVertexBuffer
)
{
...
...
@@ -3803,7 +3803,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
}
else
if
(
object
instanceof
THREE
.
Line
||
object
instanceof
THREE
.
P
articleSystem
)
{
object
instanceof
THREE
.
P
oints
)
{
geometry
=
object
.
geometry
;
addBuffer
(
scene
.
__webglObjects
,
geometry
,
object
);
...
...
@@ -3927,7 +3927,7 @@ THREE.WebGLRenderer = function ( parameters ) {
material
.
attributes
&&
clearCustomAttributes
(
material
);
}
else
if
(
object
instanceof
THREE
.
P
articleSystem
)
{
}
else
if
(
object
instanceof
THREE
.
P
oints
)
{
material
=
getBufferMaterial
(
object
,
geometry
);
...
...
@@ -3977,7 +3977,7 @@ THREE.WebGLRenderer = function ( parameters ) {
function
removeObject
(
object
,
scene
)
{
if
(
object
instanceof
THREE
.
Mesh
||
object
instanceof
THREE
.
P
articleSystem
||
object
instanceof
THREE
.
P
oints
||
object
instanceof
THREE
.
Line
)
{
removeInstances
(
scene
.
__webglObjects
,
object
);
...
...
@@ -4064,7 +4064,7 @@ THREE.WebGLRenderer = function ( parameters ) {
shaderID
=
'
dashed
'
;
}
else
if
(
material
instanceof
THREE
.
P
articleSystem
Material
)
{
}
else
if
(
material
instanceof
THREE
.
P
oints
Material
)
{
shaderID
=
'
particle_basic
'
;
...
...
@@ -4400,7 +4400,7 @@ THREE.WebGLRenderer = function ( parameters ) {
refreshUniformsLine
(
m_uniforms
,
material
);
refreshUniformsDash
(
m_uniforms
,
material
);
}
else
if
(
material
instanceof
THREE
.
P
articleSystem
Material
)
{
}
else
if
(
material
instanceof
THREE
.
P
oints
Material
)
{
refreshUniformsParticle
(
m_uniforms
,
material
);
...
...
utils/build/includes/canvas.json
浏览文件 @
e58553d1
...
...
@@ -43,7 +43,7 @@
"src/materials/MeshDepthMaterial.js"
,
"src/materials/MeshNormalMaterial.js"
,
"src/materials/MeshFaceMaterial.js"
,
"src/materials/P
articleSystem
Material.js"
,
"src/materials/P
oints
Material.js"
,
"src/materials/SpriteMaterial.js"
,
"src/materials/SpriteCanvasMaterial.js"
,
"src/textures/Texture.js"
,
...
...
utils/build/includes/common.json
浏览文件 @
e58553d1
...
...
@@ -57,7 +57,7 @@
"src/materials/MeshDepthMaterial.js"
,
"src/materials/MeshNormalMaterial.js"
,
"src/materials/MeshFaceMaterial.js"
,
"src/materials/P
articleSystem
Material.js"
,
"src/materials/P
oints
Material.js"
,
"src/materials/ShaderMaterial.js"
,
"src/materials/RawShaderMaterial.js"
,
"src/materials/SpriteMaterial.js"
,
...
...
@@ -65,7 +65,7 @@
"src/textures/Texture.js"
,
"src/textures/CompressedTexture.js"
,
"src/textures/DataTexture.js"
,
"src/objects/P
articleSystem
.js"
,
"src/objects/P
oints
.js"
,
"src/objects/Line.js"
,
"src/objects/Mesh.js"
,
"src/objects/Bone.js"
,
...
...
utils/build/includes/webgl.json
浏览文件 @
e58553d1
...
...
@@ -10,7 +10,6 @@
"src/math/Matrix4.js"
,
"src/math/Frustum.js"
,
"src/math/Math.js"
,
"src/math/Vertex.js"
,
"src/math/Spline.js"
,
"src/math/Box2.js"
,
"src/math/Box3.js"
,
...
...
@@ -50,14 +49,14 @@
"src/materials/MeshDepthMaterial.js"
,
"src/materials/MeshNormalMaterial.js"
,
"src/materials/MeshFaceMaterial.js"
,
"src/materials/P
articleSystem
Material.js"
,
"src/materials/P
oints
Material.js"
,
"src/materials/ShaderMaterial.js"
,
"src/materials/RawShaderMaterial.js"
,
"src/materials/SpriteMaterial.js"
,
"src/textures/Texture.js"
,
"src/textures/CompressedTexture.js"
,
"src/textures/DataTexture.js"
,
"src/objects/P
articleSystem
.js"
,
"src/objects/P
oints
.js"
,
"src/objects/Line.js"
,
"src/objects/Mesh.js"
,
"src/objects/Bone.js"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录