Also:
- renames the main header file to mjrfilament.h.
- moves filament_util under a "support" folder.
PiperOrigin-RevId: 930448415
Change-Id: Iad89756aaf1ddf4c3e67e1afc3a13776f71fa20f
When an mjpResourceProvider's open callback returns 0 (failure), MuJoCo does
not invoke the corresponding close callback. Previously, several resource
provider implementations allocated heap memory or system file handles before
encountering an error, failing to clean them up before returning 0. This change addresses these leaks across the codebase and clarifies the API contract.
PiperOrigin-RevId: 929803942
Change-Id: Ib7344033726895cdf037a8d9356ffc183c78c2d3
Use the jump flood algorithm to render an outline around selected
objects. This requires using custom post-processing shaders and
render passes which is managed by a new "Outliner" class.
PiperOrigin-RevId: 929212147
Change-Id: Ie6f475c7c677df7b0d4fc030a8e9520ff9dd03af
Drag-and-drop uploads go through Module.loadFile and never reached the prefetcher. This is a guard for future provider schemes (e.g., vfs) that shouldn't be passed to fetch().
PiperOrigin-RevId: 926042158
Change-Id: I119d5b1a7512f8e84bb4c752414797593a1e98cd
- C++ Platform UX: Added a "Copy Camera" button to copy XML camera definitions to clipboard.
- C++ Platform UX: Extracted `SetSpeedIndex` and `GetExpectedLabelWidth` into reusable platform helpers.
- C++ Platform UX: Fixed combo box widths and removed auto-hide tab bar flag from dockspace.
- C++ Studio App: Deduplicated label width and speed index logic by adopting platform helpers.
- C++ Studio App: Updated the toolbar layout to use a 2-column table.
- Python Bindings: Added pybind definitions for `set_camera_index`, `set_speed_index`, and `camera_to_string`.
- Python Studio App: Aligned toolbar UI with C++ using a 2-column table and fixed immediate theme switching.
- Python Studio App: Added a Help menu displaying the MuJoCo version and Stats toggle.
- Python Events: Added `-`/`=` shortcuts for simulation speed and `Esc`/`[`/`]` shortcuts for camera selection.
PiperOrigin-RevId: 922097319
Change-Id: Iec74afe37bf5c7a1ebf1cab4141e47fff5fe9274
The prefetcher asks mju_getXMLDependencies for the transitive asset
list, fetches every URL with Promise.all, and primes the bytes into the
WASM-side FetchCache. When the compiler runs, every resource it opens
is already in memory. Cold-load on a typical Menagerie model drops from
~9 s to ~2 s.
Support Ctrl+Option+Left Click Drag (maps to Ctrl+Alt+Left Click Drag in the application) to apply point force perturbations (translation) on the robot in the WebGL live viewer. This matches the Mac experience in the native MuJoCo simulate app and provides a fallback for Mac users where Right Click is difficult to trigger.
PiperOrigin-RevId: 919767954
Change-Id: I4a1d1c05784a8257d13f64f738af5b4841a615b3
This provides visual feedback to the user while loading large models.
PiperOrigin-RevId: 918708877
Change-Id: I77ea475cce6d9718e6cf8b33cb72b3f524a6ee63
This resolves to https://raw.githubusercontent.com/... under the hood.
PiperOrigin-RevId: 916050807
Change-Id: I1630e29a5b5aad0e39cdd8aa4cfc1ff1a71f19d9
Combines the "Solver" and "Performance" chart windows into a single "Profiler" window for better ergonomics and visual layout:
- Unified Dashboard: Groups the Solver block (Counts & Convergence) and the Performance block (Dimensions & CPU Time) in a single viewable window that scales cleanly without vertical scrollbars.
- Adaptive Stacking: Uses ImGui grouping so each block internally stacks its charts vertically, but tiles side-by-side horizontally when the window is stretched wide.
- Default Docking & Width: Integrates the Profiler into the default dockspace layout attached to the right of the main viewable area, with an optimized initial width scaling factor of 0.42.
- Shortcut and Menus: Adds a toggle shortcut bound to `F3`, updates the Help Shortcuts overlay, and replaces old separate entries in the Charts menu.
PiperOrigin-RevId: 912491435
Change-Id: I1f9215e5498866a01ce48b6aeb4a7461191fa01d
- allow reloading of files that failed to load
- clear errors on successful reload
PiperOrigin-RevId: 912458744
Change-Id: Ie6af87508f10e83461bc998c99c9c66e2d58312e
- RHS: Make Inspector be focused by default.
- RHS: Remove Noise pane, put the functionality in the Controls pane.
- Improve Frame and Label dropdowns.
PiperOrigin-RevId: 912434712
Change-Id: I2ee5b647febfc4a90a0cf9387b1d416f5a0dd4a1
Merge shading model, material params, and material textures into a
single "mjrMaterial" type.
Remove redundant decor_line material.
PiperOrigin-RevId: 911960222
Change-Id: Icce3772a8ea48467dfd610799c0c2f2ba752323e
- Remove hard-coded button sizes (48×32) from toolbar icons; buttons now use default ImGui sizing, matching the existing copy-camera button.
- Remove the Unload button (available via menu).
- Add ImGui_ColorButtonEx widget with per-corner rounding via ImDrawFlags, enabling segmented button-group visuals.
- Use segmented rounding for the pause/viscous/play triplet: rounded-left, square, rounded-right.
- Make pause and play buttons 40% wider than the viscous button for emphasis.
- Replace the theme combo dropdown with a cycling button.
- Reduce toolbar height from 48px to 34px and vertically center content via WindowPadding.
- Zero out table CellPadding in the toolbar for precise vertical centering.
- Remove the speed combo's inflated vertical padding.
PiperOrigin-RevId: 906853958
Change-Id: I6e4ec7243adb9e0f1f06f8779fa896a6865c46c7
* **Dynamic Full-Window Scaling**: Charts in the Performance and Solver panels now expand to fill the entire pane, automatically arranging side-by-side or stacked based on window orientation to eliminate scrollbars.
* **Responsive Decorators**: Added reusable C++ ImPlot helper functions that auto-hide titles, legends, and tick labels when the plot surface is small.
* **Cleaner Visualization**: Refined chart titles (e.g., "CPU msec vs frame", "Convergence vs iter") and removed redundant axis labels for improved scannability.
These changes were based on the plot behavior of //third_party/mujoco/src/experimental/py/sample/implot.py This is an incremental improvement, we can make the plots even nicer in future.
PiperOrigin-RevId: 906351914
Change-Id: I8cb19c19bf807f0107c717066250a71bcf7e325f
- Reorder Physics section, move Actuator Groups to end.
- Rename "Physics Settings" → "Physics", "Rendering Settings" → "Rendering".
- Reduce IndentSpacing from 20 to 6.
- Reduce FramePadding Y from 6 to 2 for narrower buttons and popups.
- Remove explicit Unindent/Indent overrides in Rendering and Visibility Groups
sections so buttons are naturally indented under their tree nodes.
- Dynamically adjust convergence and counts plot X-axis limits based on actual
solver iterations instead of hardcoded 20.
PiperOrigin-RevId: 906244477
Change-Id: Ic3e6e6e793395158c8cb6692af885884ca3f7f50
This is a combination of minor tweaks to the existing Studio WASM application, CMake cleanup to make it buildable, and integration with GitHub Actions for deployment.
The new features added are drag-and-drop, model specification through `?model=` URL parameter, HTTP and HTTPS resource provider, and a user-visible loading message while the model is loading.
PiperOrigin-RevId: 904594610
Change-Id: I3a73b1ca0fcd6fc9ba192469942b2dab010a9308
A future CL will implement reflective surfaces and make use of these materials.
PiperOrigin-RevId: 889200524
Change-Id: Icbe5c0c390f89789ed0f5d5c6058a2ef31105608
model_holder.cc modified to disable multi-threaded compilation for WASM builds. index.html `animate()` function modified so the animation rendering loop executes asynchronously with async/await calls. These changes are sufficient to make xml files without references work (e.g., humanoid.xml), more work is needed to make the vfs work so multi-file models can load.
PiperOrigin-RevId: 885537402
Change-Id: I3469cae48e7268073be334b99bf907c5ed8c27a7
The SpecEditor improves spec editing by keeping
track of what's being edited and how it changes
over time.
PiperOrigin-RevId: 878410011
Change-Id: I7c323eeb30178dad31946095a727a21b3955f19a