import { XY, RGBA, b2Vec2, b2Color } from "@box2d/core"; import type { b2ParticleGroup } from "./b2_particle_group"; /** * The particle type. Can be combined with the | operator. */ export declare enum b2ParticleFlag { /** * Water particle. */ b2_waterParticle = 0, /** * Removed after next simulation step. */ b2_zombieParticle = 2, /** * Zero velocity. */ b2_wallParticle = 4, /** * With restitution from stretching. */ b2_springParticle = 8, /** * With restitution from deformation. */ b2_elasticParticle = 16, /** * With viscosity. */ b2_viscousParticle = 32, /** * Without isotropic pressure. */ b2_powderParticle = 64, /** * With surface tension. */ b2_tensileParticle = 128, /** * Mix color between contacting particles. */ b2_colorMixingParticle = 256, /** * Call b2DestructionListener on destruction. */ b2_destructionListenerParticle = 512, /** * Prevents other particles from leaking. */ b2_barrierParticle = 1024, /** * Less compressibility. */ b2_staticPressureParticle = 2048, /** * Makes pairs or triads with other particles. */ b2_reactiveParticle = 4096, /** * With high repulsive force. */ b2_repulsiveParticle = 8192, /** * Call b2ContactListener when this particle is about to interact with * a rigid body or stops interacting with a rigid body. * This results in an expensive operation compared to using * b2_fixtureContactFilterParticle to detect collisions between * particles. */ b2_fixtureContactListenerParticle = 16384, /** * Call b2ContactListener when this particle is about to interact with * another particle or stops interacting with another particle. * This results in an expensive operation compared to using * b2_particleContactFilterParticle to detect collisions between * particles. */ b2_particleContactListenerParticle = 32768, /** * Call b2ContactFilter when this particle interacts with rigid bodies. */ b2_fixtureContactFilterParticle = 65536, /** * Call b2ContactFilter when this particle interacts with other * particles. */ b2_particleContactFilterParticle = 131072 } export interface b2IParticleDef { flags?: b2ParticleFlag; position?: XY; velocity?: XY; color?: RGBA; lifetime?: number; userData?: any; group?: b2ParticleGroup | null; } export declare class b2ParticleDef implements b2IParticleDef { flags: b2ParticleFlag; readonly position: b2Vec2; readonly velocity: b2Vec2; readonly color: b2Color; lifetime: number; userData: any; group: b2ParticleGroup | null; } export declare function b2CalculateParticleIterations(gravity: number, radius: number, timeStep: number): number; export declare class b2ParticleHandle { m_index: number; GetIndex(): number; SetIndex(index: number): void; } //# sourceMappingURL=b2_particle.d.ts.map