# ABSOLUTE_MIN_PARTICLES
const ABSOLUTE_MIN_PARTICLES = 512Defines the absolute min particles value used by `miniquake.particles`.
src/miniquake/particles.mlminiquake/array_util.ml as arrays → src/miniquake/array_util.mlminiquake/common.ml as common → src/miniquake/common.mlminiquake/mathlib.ml as math → src/miniquake/mathlib.mlminiquake/message.ml as msg → src/miniquake/message.mlminiquake/native.ml as native → src/miniquake/native.mlminiquake/render/alias_normals.ml as aliasNormals → src/miniquake/render/alias_normals.mlminiquake/types.ml as t → src/miniquake/types.mlconst ABSOLUTE_MIN_PARTICLES = 512Defines the absolute min particles value used by `miniquake.particles`.
function appendLimited(target, source)Add state for append limited.
| Parameter | Type | Default | Description |
|---|---|---|---|
target | dynamic | — | The target input consumed by `appendLimited`. |
source | dynamic | — | Source value or collection to read. |
function blobExplosion(origin, currentTime)Implements the `blobExplosion` operation for `miniquake.particles` (blob explosion).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function canonicalEntityNormals()Returns whether `miniquake.particles` can onical entity normals.
canonicalVertexNormalsTracks the module-level canonical vertex normals state owned by `miniquake.particles`.
compatAngularVelocitiesTracks the module-level compat angular velocities state owned by `miniquake.particles`.
function compatibilitySystem()Implements the `compatibilitySystem` operation for `miniquake.particles` (compatibility system).
function compatibilitySystemWithActive(active)Report whether compatibility system with active holds for the active state.
| Parameter | Type | Default | Description |
|---|---|---|---|
active | dynamic | — | The active input consumed by `compatibilitySystemWithActive`. |
function compatRand()Implements the `compatRand` operation for `miniquake.particles` (compat rand).
compatRandomSeedTracks the module-level compat random seed state owned by `miniquake.particles`.
compatTracerCountTracks the module-level compat tracer count state owned by `miniquake.particles`.
function createSystem(capacity)Create and initialize system.
| Parameter | Type | Default | Description |
|---|---|---|---|
capacity | dynamic | — | Maximum number of entries the destination can hold. |
function entityParticlesInto(active, entityOrigin, currentTime)CL_RelinkEntities shares r_part.c's single active/free particle pool with temp entities. These integration helpers operate on that existing pool so saturation stops allocation (and random-number consumption) at the same particle as the original linked-list implementation.
| Parameter | Type | Default | Description |
|---|---|---|---|
active | dynamic | — | The active input consumed by `entityParticlesInto`. |
entityOrigin | dynamic | — | The entity origin input consumed by `entityParticlesInto`. |
currentTime | dynamic | — | Time value used by the operation. |
function explosion(origin, currentTime)Implements the `explosion` operation for `miniquake.particles` (explosion).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function explosion2(origin, colorStart, colorLength, currentTime)Implements the `explosion2` operation for `miniquake.particles` (explosion2).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
colorStart | dynamic | — | The color start input consumed by `explosion2`. |
colorLength | dynamic | — | Length of the requested data in units appropriate to the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function finishCompatibility(system)Finalize state for finish compatibility.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `finishCompatibility`. |
function initializeAngularVelocities(system, count)Initialize state for initialize angular velocities.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `initializeAngularVelocities`. |
count | dynamic | — | Number of entries or units to process. |
function lavaSplash(origin, currentTime)Implements the `lavaSplash` operation for `miniquake.particles` (lava splash).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
const MAX_PARTICLES = 2048Defines the max particles value used by `miniquake.particles`.
const NUM_VERTEX_NORMALS = 162Defines the num vertex normals value used by `miniquake.particles`.
function particleDrawCommand(particle, viewOrigin, viewForward, scaledUp, scaledRight)Implements the `particleDrawCommand` operation for `miniquake.particles` (particle draw command).
| Parameter | Type | Default | Description |
|---|---|---|---|
particle | dynamic | — | The particle input consumed by `particleDrawCommand`. |
viewOrigin | dynamic | — | The view origin input consumed by `particleDrawCommand`. |
viewForward | dynamic | — | The view forward input consumed by `particleDrawCommand`. |
scaledUp | dynamic | — | The scaled up input consumed by `particleDrawCommand`. |
scaledRight | dynamic | — | The scaled right input consumed by `particleDrawCommand`. |
function particleFloat(value)Implements the `particleFloat` operation for `miniquake.particles` (particle float).
| Parameter | Type | Default | Description |
|---|---|---|---|
value | dynamic | — | Value consumed by `particleFloat`. |
miniquake.particles.ParticleSystem struct
function pointEffect(origin, count, color, currentTime)Implements the `pointEffect` operation for `miniquake.particles` (point effect).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
count | dynamic | — | Number of entries or units to process. |
color | dynamic | — | Color value used by the operation. |
currentTime | dynamic | — | Time value used by the operation. |
const PT_BLOB = 6Defines the pt blob value used by `miniquake.particles`.
const PT_BLOB2 = 7Defines the pt blob2 value used by `miniquake.particles`.
const PT_EXPLODE = 4Defines the pt explode value used by `miniquake.particles`.
const PT_EXPLODE2 = 5Defines the pt explode2 value used by `miniquake.particles`.
const PT_FIRE = 3Defines the pt fire value used by `miniquake.particles`.
const PT_GRAVITY = 1Defines the pt gravity value used by `miniquake.particles`.
const PT_SLOW_GRAVITY = 2Defines the pt slow gravity value used by `miniquake.particles`.
const PT_STATIC = 0Defines the pt static value used by `miniquake.particles`.
function R_AllocParticle(system)Apply the Quake-compatible r alloc particle behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_AllocParticle`. |
function R_BlobExplosion(system, origin, currentTime)Apply the Quake-compatible r blob explosion behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_BlobExplosion`. |
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function R_ClearParticles(system)Apply the Quake-compatible r clear particles behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_ClearParticles`. |
function R_DarkFieldParticles(system, entityOrigin, currentTime)Apply the Quake-compatible r dark field particles behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_DarkFieldParticles`. |
entityOrigin | dynamic | — | The entity origin input consumed by `R_DarkFieldParticles`. |
currentTime | dynamic | — | Time value used by the operation. |
function R_DrawParticles(system, currentTime, oldTime, gravity, viewOrigin, viewForward, viewUp, viewRight)Produces the fixed-function MiniQuake command trace and advances particles in the same draw-before-simulate order as R_DrawParticles.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_DrawParticles`. |
currentTime | dynamic | — | Time value used by the operation. |
oldTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `R_DrawParticles`. |
viewOrigin | dynamic | — | The view origin input consumed by `R_DrawParticles`. |
viewForward | dynamic | — | The view forward input consumed by `R_DrawParticles`. |
viewUp | dynamic | — | The view up input consumed by `R_DrawParticles`. |
viewRight | dynamic | — | The view right input consumed by `R_DrawParticles`. |
function R_EntityParticles(system, entityOrigin, currentTime, vertexNormals)r_avertexnormals belongs to the renderer rather than r_part.c, so callers provide that canonical 162-vector table as the explicit dependency.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_EntityParticles`. |
entityOrigin | dynamic | — | The entity origin input consumed by `R_EntityParticles`. |
currentTime | dynamic | — | Time value used by the operation. |
vertexNormals | dynamic | — | The vertex normals input consumed by `R_EntityParticles`. |
function R_InitParticles(arguments)Apply the Quake-compatible r init particles behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
arguments | dynamic | — | Command-line arguments to inspect or execute. |
function R_LavaSplash(system, origin, currentTime)Apply the Quake-compatible r lava splash behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_LavaSplash`. |
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function R_ParseParticleEffect(system, reader, currentTime)Apply the Quake-compatible r parse particle effect behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_ParseParticleEffect`. |
reader | dynamic | — | The reader input consumed by `R_ParseParticleEffect`. |
currentTime | dynamic | — | Time value used by the operation. |
function R_ParticleExplosion(system, origin, currentTime)Apply the Quake-compatible r particle explosion behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_ParticleExplosion`. |
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function R_ParticleExplosion2(system, origin, colorStart, colorLength, currentTime)Apply the Quake-compatible r particle explosion2 behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_ParticleExplosion2`. |
origin | dynamic | — | World-space origin of the operation. |
colorStart | dynamic | — | The color start input consumed by `R_ParticleExplosion2`. |
colorLength | dynamic | — | Length of the requested data in units appropriate to the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function R_Rand(system)MiniQuake's Win32 build uses the Microsoft C runtime rand() sequence.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_Rand`. |
function R_ReadPointFile_f(system, text)Apply the Quake-compatible r read point file f behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_ReadPointFile_f`. |
text | dynamic | — | Text to parse or process. |
function R_RocketTrail(system, start, finish, trailType, currentTime)Apply the Quake-compatible r rocket trail behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_RocketTrail`. |
start | dynamic | — | The start input consumed by `R_RocketTrail`. |
finish | dynamic | — | The finish input consumed by `R_RocketTrail`. |
trailType | dynamic | — | The trail type input consumed by `R_RocketTrail`. |
currentTime | dynamic | — | Time value used by the operation. |
function R_RunParticleEffect(system, origin, direction, color, count, currentTime)Apply the Quake-compatible r run particle effect behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_RunParticleEffect`. |
origin | dynamic | — | World-space origin of the operation. |
direction | dynamic | — | The direction input consumed by `R_RunParticleEffect`. |
color | dynamic | — | Color value used by the operation. |
count | dynamic | — | Number of entries or units to process. |
currentTime | dynamic | — | Time value used by the operation. |
function R_SetRandomSeed(system, seed)Apply the Quake-compatible r set random seed behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_SetRandomSeed`. |
seed | dynamic | — | The seed input consumed by `R_SetRandomSeed`. |
function R_TeleportSplash(system, origin, currentTime)Apply the Quake-compatible r teleport splash behavior.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `R_TeleportSplash`. |
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
ramp1Tracks the module-level ramp1 state owned by `miniquake.particles`.
ramp2Tracks the module-level ramp2 state owned by `miniquake.particles`.
ramp3Tracks the module-level ramp3 state owned by `miniquake.particles`.
function rampColor(values, ramp)Implements the `rampColor` operation for `miniquake.particles` (ramp color).
| Parameter | Type | Default | Description |
|---|---|---|---|
values | dynamic | — | The values input consumed by `rampColor`. |
ramp | dynamic | — | The ramp input consumed by `rampColor`. |
function randomExplosionVector(system, origin, particle)Return random explosion vector derived from the active module state.
| Parameter | Type | Default | Description |
|---|---|---|---|
system | dynamic | — | The system input consumed by `randomExplosionVector`. |
origin | dynamic | — | World-space origin of the operation. |
particle | dynamic | — | The particle input consumed by `randomExplosionVector`. |
function resetRandom(seed)Update module state for random.
| Parameter | Type | Default | Description |
|---|---|---|---|
seed | dynamic | — | The seed input consumed by `resetRandom`. |
function rocketTrail(start, finish, trailType, currentTime)Implements the `rocketTrail` operation for `miniquake.particles` (rocket trail).
| Parameter | Type | Default | Description |
|---|---|---|---|
start | dynamic | — | The start input consumed by `rocketTrail`. |
finish | dynamic | — | The finish input consumed by `rocketTrail`. |
trailType | dynamic | — | The trail type input consumed by `rocketTrail`. |
currentTime | dynamic | — | Time value used by the operation. |
function rocketTrailInto(active, start, finish, trailType, currentTime)Implements the `rocketTrailInto` operation for `miniquake.particles` (rocket trail into).
| Parameter | Type | Default | Description |
|---|---|---|---|
active | dynamic | — | The active input consumed by `rocketTrailInto`. |
start | dynamic | — | The start input consumed by `rocketTrailInto`. |
finish | dynamic | — | The finish input consumed by `rocketTrailInto`. |
trailType | dynamic | — | The trail type input consumed by `rocketTrailInto`. |
currentTime | dynamic | — | Time value used by the operation. |
function runEffect(origin, direction, count, color, currentTime)Execute effect.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
direction | dynamic | — | The direction input consumed by `runEffect`. |
count | dynamic | — | Number of entries or units to process. |
color | dynamic | — | Color value used by the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function spawn(origin, velocity, dieTime, color, type)Implements the `spawn` operation for `miniquake.particles` (spawn).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
velocity | dynamic | — | Velocity applied by the operation. |
dieTime | dynamic | — | Time value used by the operation. |
color | dynamic | — | Color value used by the operation. |
type | dynamic | — | The type input consumed by `spawn`. |
function teleportSplash(origin, currentTime)Implements the `teleportSplash` operation for `miniquake.particles` (teleport splash).
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | World-space origin of the operation. |
currentTime | dynamic | — | Time value used by the operation. |
function update(particles, currentTime, deltaTime)Compatibility wrapper for callers that do not own the server cvar table. The integrated Host_Frame path uses updateWithGravity and passes the current sv_gravity value, matching R_DrawParticles' extern cvar dependency.
| Parameter | Type | Default | Description |
|---|---|---|---|
particles | dynamic | — | The particles input consumed by `update`. |
currentTime | dynamic | — | Time value used by the operation. |
deltaTime | dynamic | — | Time value used by the operation. |
function updateParticlePhysics(particle, frameTime, gravity)Update module state for particle physics.
| Parameter | Type | Default | Description |
|---|---|---|---|
particle | dynamic | — | The particle input consumed by `updateParticlePhysics`. |
frameTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `updateParticlePhysics`. |
function updateWithGravity(particles, currentTime, deltaTime, gravity)Update module state for with gravity.
| Parameter | Type | Default | Description |
|---|---|---|---|
particles | dynamic | — | The particles input consumed by `updateWithGravity`. |
currentTime | dynamic | — | Time value used by the operation. |
deltaTime | dynamic | — | Time value used by the operation. |
gravity | dynamic | — | The gravity input consumed by `updateWithGravity`. |
function zeroVector()Implements the `zeroVector` operation for `miniquake.particles` (zero vector).