import { ClientEvent, VuerProps, TransformProps } from '@vuer-ai/vuer'; import { KeyFrame } from './interfaces'; import { MuJoCoModelProps } from './MuJoCoModel'; import { MuJoCoProviderProps } from './hooks/useMuJoCo'; export interface ON_MUJOCO_FRAME extends ClientEvent { value: { dt: number; keyFrame: KeyFrame; }; } /** * Props for the MuJoCo component. * * @dial */ export type MuJoCoProps = VuerProps<{ /** Include own Provider. When true, wraps the component with MuJoCoModuleProvider and MuJoCoProvider. * @dial General * @dial-cols 2 * @dial-group-order 0 */ selfProvide?: boolean; /** Timeout in seconds before pausing simulation to conserve battery. * @dial General @dial-min 0 @dial-max 300 @dial-step 1 */ timeout?: number; /** Threshold for detecting simulation inactivity. * @dial General @dial-min 0 @dial-max 1 @dial-step 0.001 */ threshold?: number; /** Target frames per second for simulation updates. * @dial Simulation * @dial-cols 2 * @dial-group-order 1 @dial-min 1 @dial-max 120 @dial-step 1 */ fps?: number; /** Speed multiplier for simulation playback. * @dial Simulation @dial-min 0.1 @dial-max 10 @dial-step 0.1 */ speed?: number; /** Whether the simulation is paused. * @dial Simulation */ pause?: boolean; /** Array of visible geometry group indices. * @dial Simulation * @dial-col-span 2 * @dial-dtype array */ visible?: number[]; /** Space-separated list of keyframe fields to include in frame events. * @dial Simulation * @dial-col-span 2 */ frameKeys?: string; /** Enable drag interaction with simulation bodies. * @dial Drag * @dial-cols 2 * @dial-group-order 2 * */ useDrag?: boolean; /** Unpause simulation when user starts dragging. * @dial Drag */ unpauseOnDrag?: boolean; /** Scale factor for drag force applied to bodies. * @dial Drag @dial-min 0.1 @dial-max 10 @dial-step 0.1 */ dragForceScale?: number; /** Show arrow visualization during drag. * @dial Drag */ showDragArrow?: boolean; /** Show force magnitude text during drag. * @dial Drag */ showDragForceText?: boolean; /** Enable MuJoCo lights in the scene. * @dial Mocap * @dial-cols 2 * @dial-group-order 3 */ useLights?: boolean; /** Enable mocap body controls. * @dial Mocap */ useMocap?: boolean; /** Scale factor for mocap gizmo visualization. * @dial Mocap @dial-min 0.1 @dial-max 5 @dial-step 0.1 */ mocapGizmoScale?: number; /** Size of mocap handles. Can be uniform or [x, y, z]. * @dial Mocap */ mocapHandleSize?: number | [number, number, number]; /** Scale factor for mocap marker visualization. * @dial Mocap @dial-min 0.1 @dial-max 5 @dial-step 0.1 */ mocapMarkerScale?: number; /** Render mocap handles as wireframe. * @dial Mocap */ mocapHandleWireframe?: boolean; /** Child components to render within the MuJoCo context. * @dial-ignore */ children?: React.ReactNode; } & Omit>; /** * Represents the MuJoCo component within the Vuer application, facilitating the simulation and visualization of MuJoCo models. * This component is responsible for emitting frame update events (`ON_MUJOCO_FRAME`) to synchronize the simulation state across the application. * * Configures the MuJoCo simulation's behavior based on the playback's interaction state. * * The simulation's pause state and speed are dynamically adjusted to reflect the playback's * current action—recording, playing back, both, or neither. This ensures the simulation * accurately represents the desired scenario, with physics appropriately enabled or disabled. * * * * @param _ref A reference to the component instance, used for direct manipulation or access within the parent component. * @param _key A unique identifier for the MuJoCo simulation instance, defaulting to 'default'. This can be used to distinguish between multiple instances. * @param fps Frames per second for the simulation updates. This controls how often the `ON_MUJOCO_FRAME` events are emitted. * @param keyFrame The current key frame of the simulation. This is used to initialize the simulation state or to synchronize it with an external state. * @param pause A boolean indicating whether the simulation is currently paused. When true, frame updates are suspended. * @param speed The speed multiplier for the simulation. Allows for speeding up or slowing down the simulation playback. * @param selfProvide Each component provides its own Provider * @param timeout in seconds to determine when to stop the simulation to conserve battery. * @param threshold The threshold value to determine when the simulation should be paused due to inactivity. * @param props Additional props passed to the MuJoCo model component for further customization. */ export declare const MuJoCo: ({ _ref, _key, position, rotation, scale, src, assets, workDir, selfProvide, timeout, threshold, fps, speed, pause, frameKeys, visible, useDrag, unpauseOnDrag, dragForceScale, showDragArrow, showDragForceText, useLights, useMocap, mocapGizmoScale, mocapHandleSize, mocapMarkerScale, mocapHandleWireframe, children, ...keyFrame }: MuJoCoProviderProps & MuJoCoProps & TransformProps) => import("react/jsx-runtime").JSX.Element;