Skip to content

Commit

Permalink
add some comments on rendering options
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jun 19, 2024
1 parent 280e756 commit c4287c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/examples/kinematic_loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ plot(sol, idxs=[j2.s]) # Plot the joint coordinate of the prismatic joint (green

```@example kinloop
import CairoMakie
Multibody.render(fourbar2, sol; x=-2, y = 3, z = 5, filename = "fourbar2.gif") # Use "fourbar2.mp4" for a video file
Multibody.render(fourbar2, sol; x=-2, y = 2, z = 3, filename = "fourbar2.gif") # Use "fourbar2.mp4" for a video file
nothing # hide
```

Expand Down
6 changes: 6 additions & 0 deletions docs/src/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ After that, the [`render`](@ref) function is the main entry point to create 3D r
- `render(model, solution)`: this method creates an animation corresponding to the mechanisms evolution in a simulation trajectory.
- `scene, time = render(model, solution, t::Real)`: this method opens an interactive window with the mechanism in the configuration corresponding to the time `t`. Display `scene` to display the interactive window, and change the time by either dragging the slider in the window, or write to the observable `time[] = new_time`.

## Colors
Many components allows the user to select with which color it is rendered. This choice is made by providing a 4-element array with color values in the order (RGBA), where each value is between 0 and 1. The last value is the alpha channel which determines the opacity, i.e., 1 is opaque and 0 is invisible.

## Rendering the world frame
The display of the world frame can be turned off by setting `world.render => false` in the variable map.


## Rendering API

Expand Down

0 comments on commit c4287c2

Please sign in to comment.