Attaching aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OmarMtya/engine.js/llms.txt
Use this file to discover all available pages before exploring further.
$g.Rigido to a Figura opts that object into the physics simulation. On every animation frame the engine reads rigido.valor to apply a downward gravity force and checks rigido.sinColision to decide whether overlapping figures should produce a collision response. Physics only runs inside $g.Animar() — a static $g.Dibujar() call does not advance the simulation.
Constructor
new $g.Rigido() with no arguments uses the engine’s internal defaults for gravity and enables collision detection.
The gravity strength applied to this object each frame. Higher values make the object fall faster. The built-in editor exposes this as the Gravedad field. Optional — the engine sets a default when omitted.
When
true, this figure participates in gravity simulation but collision detection is skipped — the object passes through others. Defaults to false (collision is active). Note that the editor’s Colisión checkbox maps to the inverse of this property: checking the box sets sinColision = false.Attaching and Detaching Physics
Assign aRigido instance directly to figura.rigido at any point before or during the animation loop:
Example: Player with gravity, floor without
Adjusting Gravity at Runtime
Becauserigido.valor is a plain number property, you can change it at any time and the physics loop will pick up the new value on the next frame: