API Reference GE Extensions core Rope Visual Test ImGui sandbox for creating, editing, and testing rope visual simulations. Provides a full editor for rope physics parameters, animations, node interaction, performance tracking, and save/load.
ImGui sandbox for creating, editing, and testing rope visual simulations. Provides a full editor for rope physics parameters, animations, node interaction, performance tracking, and save/load.
Function Signature Description M.onUpdate(dt)Main loop: animations, node interaction, debug drawing, ImGui UI M.onSerialize() → tableSaves all UI state and rope parameters M.onExtensionUnloaded()Cleans up rope data, resets state
Parameter Type Default Description nodeCountint 32 Number of simulation nodes lengthScalefloat 1.0 Scale factor for rope length diameterfloat 0.12 Visual/collision diameter dampingfloat 0.995 Velocity damping per step bendStiffnessfloat 0.6 Bending resistance totalMassfloat 1.0 Total rope mass in kg massFallofffloat 0.0 Mass distribution falloff iterationsint 1 Constraint solver iterations gravityvec3 (0, 0, -9.81) Gravity vector youngsModulusfloat 1e7 Material stiffness simFPSint 60 Simulation update rate
Toggle Default Description useXPBDtrue Extended Position-Based Dynamics solver useBendingtrue Bending constraint useWorldCollisionfalse Collision with terrain/objects useSelfCollisionfalse Self-intersection prevention useStrainLimittrue Maximum stretch limit anchorAFixedtrue Pin anchor A in place anchorBFixedtrue Pin anchor B in place
ID Name Description 0 None Static position 1 Wiggle Multi-frequency oscillation 2 Circle Circular orbit 3 Bumpy Ride Bouncing motion 4 Rectangle Rectangular path 5 Random Walk Pseudo-random movement 6 Sin Wave Smooth sinusoidal 7 Dir Sweep Direction vector rotation (anchors only)
Hover : Mouse ray-cast detects nodes within 0.1m spheres
Drag : Click and drag nodes on XY plane at node's Z height
Colors : Fixed=red, Free=green, Calculated=blue, Hovered=yellow, Dragged=orange
Setting Description debugDrawStrain-colored line segments (green→red) debugNodesMass-scaled spheres at node positions debugDirDirection arrows at anchors debugTextNode count, length, strain stats debugMassMass value labels per node
Menu Action Description Rope Create Rope New rope from current UI parameters Rope Focus Camera Moves camera to frame selected rope Rope Rebuild Selected Rebuilds with current parameters Management Delete Selected Removes selected rope Management Clone 10 Creates 10 copies with Y offset Management Clear All Removes everything Management Keep First Deletes all except first rope File Save/Load Parameters JSON file I/O for parameters
Hook Purpose M.onExtensionLoadedInitialize ropes on module load
-- Load the rope sandbox
extensions. load ( "core_ropeVisualTest" )
-- The ImGui window "Rope Visual Sandbox" appears automatically
-- Use the UI to create, configure, and animate ropes
Performance stats track per-rope simulation time, averages, and spike detection.
Clone operations offset each copy by 0.2m in Y, accumulating a 2m offset per batch.
Parameters can be saved/loaded via JSON files or the editor file dialog.
Requires ui_imgui and ffi modules.
This is a development/test tool, not loaded in normal gameplay.
metrics - Performance overlay
globals - debugDrawer, getCameraMouseRay