TagsA - Z



class SolidParticle


new SolidParticle(particleIndex, positionIndex, model, shapeId, idxInShape, sps, modelBoundingInfo)

Creates a Solid Particle object.

Don't create particles manually, use instead the Solid Particle System internal tools like _addParticle()

particleIndex (integer) is the particle index in the Solid Particle System pool. It's also the particle identifier.

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

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

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

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

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


Name Type Description
particleIndex number
positionIndex number
model ModelShape
shapeId number
idxInShape number
sps SolidParticleSystem


idx : number

color : Color4

position : Vector3

rotation : Vector3

rotationQuaternion : Quaternion

scaling : Vector3

uvs : Vector4

velocity : Vector3

alive : boolean

isVisible : boolean

shapeId : number

idxInShape : number

scale : Vector3

legacy support, changed scale to scaling

quaternion : Quaternion

legacy support, changed quaternion to rotationQuaternion


intersectsMesh(target, SolidParticle) → boolean

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 is the object (solid particle or mesh) what the intersection is computed against.


Name Type Description
target Mesh or SolidParticle