English中文

Particle

new Cesium.Particle(options)

A particle emitted by a ParticleSystem.
名称 Name 类型 Type 说明 Description
options object 具有以下属性的对象: An object with the following properties:
名称 Name 类型 Type 默认值 Default 说明 Description
mass number 1.0 可选 optional 粒子的质量(以千克为单位)。 The mass of the particle in kilograms.
position Cartesian3 Cartesian3.ZERO 可选 optional 粒子在世界坐标中的初始位置。 The initial position of the particle in world coordinates.
velocity Cartesian3 Cartesian3.ZERO 可选 optional 世界坐标中粒子的速度矢量。 The velocity vector of the particle in world coordinates.
life number Number.MAX_VALUE 可选 optional 粒子的寿命(以秒为单位)。 The life of the particle in seconds.
image object 可选 optional 用于广告牌的 URI、HTMLImageElement 或 HTMLCanvasElement。 The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.
startColor Color Color.WHITE 可选 optional 粒子诞生时的颜色。 The color of a particle when it is born.
endColor Color Color.WHITE 可选 optional 粒子死亡时的颜色。 The color of a particle when it dies.
startScale number 1.0 可选 optional 粒子诞生时的尺度。 The scale of the particle when it is born.
endScale number 1.0 可选 optional 粒子死亡时的尺度。 The scale of the particle when it dies.
imageSize Cartesian2 new Cartesian2(1.0, 1.0) 可选 optional 尺寸(宽度乘高度),用于缩放粒子图像(以像素为单位)。 The dimensions, width by height, to scale the particle image in pixels.

成员 Members

获取粒子的年龄(以秒为单位)。 Gets the age of the particle in seconds.
粒子死亡时的颜色。 The color of the particle when it dies.
默认值: Default Value: Color.WHITE
粒子死亡时的尺度。 The scale of the particle when it dies.
默认值: Default Value: 1.0
用于粒子的图像。 The image to use for the particle.
默认值: Default Value: undefined
尺寸(宽度乘高度),用于缩放粒子图像(以像素为单位)。 The dimensions, width by height, to scale the particle image in pixels.
默认值: Default Value: new Cartesian(1.0, 1.0)
粒子的寿命(以秒为单位)。 The life of the particle in seconds.
默认值: Default Value: Number.MAX_VALUE
粒子的质量(以千克为单位)。 The mass of the particle in kilograms.
默认值: Default Value: 1.0

normalizedAge : number

获取标准化为 [0.0, 1.0] 范围内的值的年龄。 Gets the age normalized to a value in the range [0.0, 1.0].
粒子在世界坐标中的位置。 The positon of the particle in world coordinates.
默认值: Default Value: Cartesian3.ZERO
粒子诞生时的颜色。 The color of the particle when it is born.
默认值: Default Value: Color.WHITE
粒子诞生时的尺度。 the scale of the particle when it is born.
默认值: Default Value: 1.0
世界坐标中粒子的速度。 The velocity of the particle in world coordinates.
默认值: Default Value: Cartesian3.ZERO
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.