• Public
  • Public/Protected
  • All

Class SolidParticle

Represents one particle of a solid particle system.


  • SolidParticle




  • Creates a Solid Particle object. Don't create particles manually, use instead the Solid Particle System internal tools like _addParticle()


    • particleIndex: number

      (integer) is the particle index in the Solid Particle System pool.

    • particleId: number

      (integer) is the particle identifier. Unless some particles are removed from the SPS, it's the same value than the particle idx.

    • positionIndex: number

      (integer) is the starting index of the particle vertices in the SPS "positions" array.

    • indiceIndex: number

      (integer) is the starting index of the particle indices in the SPS "indices" array.

    • model: Nullable<ModelShape>

      (ModelShape) is a reference to the model shape on what the particle is designed.

    • shapeId: number

      (integer) is the model shape identifier in the SPS.

    • idxInShape: number

      (integer) is the index of the particle in the current model (ex: the 10th box of addShape(box, 30))

    • sps: SolidParticleSystem

      defines the sps it is associated to

    • Optional modelBoundingInfo: Nullable<BoundingInfo>

      is the reference to the model BoundingInfo used for intersection computations.

    • Optional materialIndex: Nullable<number>

      is the particle material identifier (integer) when the MultiMaterials are enabled in the SPS.

    Returns SolidParticle


aliveSearch playground for alive

alive: boolean

Is the particle active or not ?

colorSearch playground for color

The color of the particle

cullingStrategySearch playground for cullingStrategy

cullingStrategy: number

The culling strategy to use to check whether the solid particle must be culled or not when using isInFrustum(). The possible values are :

  • AbstractMesh.CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY The default value for solid particles is AbstractMesh.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY Please read each static variable documentation in the class AbstractMesh to get details about the culling process.

idSearch playground for id

id: number

particle identifier

idxSearch playground for idx

idx: number

particle global index

idxInShapeSearch playground for idxInShape

idxInShape: number

Index of the particle in its shape id

isVisibleSearch playground for isVisible

isVisible: boolean

Is the particle visible or not ?

materialIndexSearch playground for materialIndex

materialIndex: Nullable<number>

The particle material identifier (integer) when MultiMaterials are enabled in the SPS.

parentIdSearch playground for parentId

parentId: Nullable<number>

Parent particle Id, if any. Default null.

pivotSearch playground for pivot

pivot: Vector3

The pivot point in the particle local space.

positionSearch playground for position

position: Vector3

The world space position of the particle.

propsSearch playground for props

props: Nullable<any>

Custom object or properties.

rotationSearch playground for rotation

rotation: Vector3

The world space rotation of the particle. (Not use if rotationQuaternion is set)

rotationQuaternionSearch playground for rotationQuaternion

rotationQuaternion: Nullable<Quaternion>

The world space rotation quaternion of the particle.

scalingSearch playground for scaling

scaling: Vector3

The scaling of the particle.

shapeIdSearch playground for shapeId

shapeId: number

ModelShape id of this particle

translateFromPivotSearch playground for translateFromPivot

translateFromPivot: boolean

Must the particle be translated from its pivot point in its local space ? In this case, the pivot point is set at the origin of the particle local space and the particle is translated. Default : false

uvsSearch playground for uvs

uvs: Vector4

The uvs of the particle.

velocitySearch playground for velocity

velocity: Vector3

The current speed of the particle.



  • Legacy support, changed quaternion to rotationQuaternion

    Returns Nullable<Quaternion>

  • Legacy support, changed quaternion to rotationQuaternion


    Returns any


  • Legacy support, changed scale to scaling

    Returns Vector3

  • Legacy support, changed scale to scaling


    Returns any


copyToRefSearch playground for copyToRef

  • Copies the particle property values into the existing target : position, rotation, scaling, uvs, colors, pivot, parent, visibility, alive


    Returns SolidParticle

    the current particle

intersectsMeshSearch playground for intersectsMesh

  • Returns a boolean. True if the particle intersects another particle or another mesh, else false. The intersection is computed on the particle bounding sphere and Axis Aligned Bounding Box (AABB)


    • target: Mesh | SolidParticle

      is the object (solid particle or mesh) what the intersection is computed against.

    Returns boolean

    true if it intersects

isInFrustumSearch playground for isInFrustum

  • isInFrustum(frustumPlanes: Plane[]): boolean
  • Returns true if the solid particle is within the frustum defined by the passed array of planes. A particle is in the frustum if its bounding box intersects the frustum


    • frustumPlanes: Plane[]

      defines the frustum to test

    Returns boolean

    true if the particle is in the frustum planes


  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method