Hand Wheel
Wheel is a centred rotary wheel without end stops and with continuous turn tracking.
jolt_control_wheel(options=undefined)Call jolt_start() before creation. Every factory accepts one optional options struct and returns JoltControl, or undefined on error. Common options: parent, position/rotation or local_position/local_rotation, mass, resistance and output. Dimensions are full lengths in metres, mass is in kg; this API uses degrees for angles. See Mounting, Size and Rendering for shared configuration.
| Item | Meaning / default |
|---|---|
| size | {radius:0.25, depth:0.08} |
| mass / resistance | 1 kg / 0 N·m |
| periodic_detents / absolute_detents | false / [] |
| speed_motor / position_motor / phase_motor / torque_mode | {enabled:false} |
Origin, pivot and centre of mass coincide. Positive angles follow the right-hand rule around local +Z. The logical angle starts at 0. get_value() is phase in 0..1, wrapping to 0 at a full turn; use get_angle() and get_turns() for multi-turn position.
Wheel and Crank accept periodic_detents, absolute_detents, speed_motor, position_motor, phase_motor and torque_mode. All are disabled by default. They do not accept auto_return, target, drive, detents, min_angle, max_angle, initial_phase or initial_turns. Use the continuous drive methods instead.
Example#
wheel = jolt_control_wheel({
speed_motor: {speed: 90, max_torque: 5},
resistance: 0.1
});
var angle_degrees = wheel.get_angle();
var speed_degrees_per_second = wheel.get_speed();Current project integrations#
New related workflows#
Verified operation contracts#
These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.
| Symbol / owner | Signature | Operation contract |
|---|---|---|
| jolt_control_wheel | jolt_control_wheel(options=undefined) | Requires managed world, optional options, returns owning JoltControl or undefined. Without parent world position/rotation; with parent local_position/local_rotation, do not mix. Wheel: radius.25/depth.08m, mass1kg, free +Z axis; motors/detents disabled. No scalar auto_return/target/min/max. |