Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
robinroy03 committed Oct 12, 2024
1 parent 8554f38 commit 0a2a9c9
Show file tree
Hide file tree
Showing 28 changed files with 115 additions and 35 deletions.
5 changes: 4 additions & 1 deletion docs/examples/collision-particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ def collision():
box_directions = np.array([[0, 1, 0]])
box_colors = np.array([[1, 1, 1, 0.2]])
box_actor = actor.box(
box_centers, directions=box_directions, colors=box_colors, scales=(box_lx, box_ly, box_lz)
box_centers,
directions=box_directions,
colors=box_colors,
scales=(box_lx, box_ly, box_lz)
)
scene.add(box_actor)

Expand Down
5 changes: 4 additions & 1 deletion docs/examples/viz_animated_surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,7 @@ def timer_callback(_obj, _event):
if interactive:
showm.start()

fury.window.record(scene=showm.scene, size=(600, 600), out_path="viz_animated_surfaces.png")
fury.window.record(scene=showm.scene,
size=(600, 600),
out_path="viz_animated_surfaces.png"
)
20 changes: 15 additions & 5 deletions docs/examples/viz_billboard_sdf_spheres.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
if interactive:
fury.window.show(scene)
else:
fury.window.record(scene=scene, size=(600, 600), out_path="viz_low_res_wireframe.png")
fury.window.record(scene=scene,
size=(600, 600),
out_path="viz_low_res_wireframe.png")

###############################################################################
# Let's clean the scene and play with the parameters `phi` and `theta`.
Expand All @@ -106,7 +108,9 @@
if interactive:
fury.window.show(scene)
else:
fury.window.record(scene=scene, size=(600, 600), out_path="viz_hi_res_wireframe.png")
fury.window.record(scene=scene,
size=(600, 600),
out_path="viz_hi_res_wireframe.png")

###############################################################################
# As you might have noticed, these parameters control the resolution of the
Expand Down Expand Up @@ -137,7 +141,9 @@
if interactive:
fury.window.show(scene)
else:
fury.window.record(scene=scene, size=(600, 600), out_path="viz_billboards_wireframe.png")
fury.window.record(scene=scene,
size=(600, 600),
out_path="viz_billboards_wireframe.png")

###############################################################################
# If you interacted with this actor, you might have noticed how it always
Expand Down Expand Up @@ -187,7 +193,9 @@
if interactive:
fury.window.show(scene)
else:
fury.window.record(scene=scene, size=(600, 600), out_path="viz_billboards_circles.png")
fury.window.record(scene=scene,
size=(600, 600),
out_path="viz_billboards_circles.png")

###############################################################################
# Hold on, those actors don't look exactly like the ones we created using
Expand Down Expand Up @@ -280,7 +288,9 @@
if interactive:
fury.window.show(scene)
else:
fury.window.record(scene=scene, size=(600, 600), out_path="viz_billboards_spheres.png")
fury.window.record(scene=scene,
size=(600, 600),
out_path="viz_billboards_spheres.png")

###############################################################################
# References
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/viz_brownian_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,6 @@ def timer_callback(_obj, _event):

showm.add_timer_callback(True, 30, timer_callback)
showm.start()
fury.window.record(scene=showm.scene, size=(600, 600), out_path="viz_brownian_motion.png")
fury.window.record(scene=showm.scene,
size=(600, 600),
out_path="viz_brownian_motion.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ def change_icon_callback(i_ren, _obj, _button):
if interactive:
show_manager.start()

fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_button.png")
fury.window.record(scene=show_manager.scene,
size=current_size,
out_path="viz_button.png")
8 changes: 6 additions & 2 deletions docs/examples/viz_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
# and radius.
actors = [
fury.actor.sphere(
np.array([[0, 0, 0]]), np.random.random([1, 3]), radii=np.random.random([1, 3])
np.array([[0, 0, 0]]),
np.random.random([1, 3]),
radii=np.random.random([1, 3])
)
]

Expand Down Expand Up @@ -176,4 +178,6 @@
if interactive:
showm.start()

fury.window.record(scene=scene, out_path="viz_keyframe_animation_camera.png", size=(900, 768))
fury.window.record(scene=scene,
out_path="viz_keyframe_animation_camera.png",
size=(900, 768))
4 changes: 3 additions & 1 deletion docs/examples/viz_color_interpolators.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,6 @@
if interactive:
showm.start()

window.record(scene=scene, out_path="viz_keyframe_animation_colors.png", size=(900, 768))
window.record(scene=scene,
out_path="viz_keyframe_animation_colors.png",
size=(900, 768))
4 changes: 3 additions & 1 deletion docs/examples/viz_custom_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,6 @@ def interpolate(t):
if interactive:
showm.start()

window.record(scene=scene, out_path="viz_keyframe_custom_interpolator.png", size=(900, 768))
window.record(scene=scene,
out_path="viz_keyframe_custom_interpolator.png",
size=(900, 768))
4 changes: 3 additions & 1 deletion docs/examples/viz_drawpanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@
drawing_canvas.draw_shape(shape_type="circle", current_position=(275, 275))
drawing_canvas.shape_list[-1].resize((50, 50))

fury.window.record(scene=showm.scene, size=current_size, out_path="viz_drawpanel.png")
fury.window.record(scene=showm.scene,
size=current_size,
out_path="viz_drawpanel.png")
9 changes: 7 additions & 2 deletions docs/examples/viz_earth_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@
# Also creating a text actor to add below the sphere.

text_actor = fury.actor.text_3d(
"Bloomington, Indiana", position=(-0.42, 0.31, 0.03), color=fury.window.colors.white, font_size=0.004
"Bloomington, Indiana",
position=(-0.42, 0.31, 0.03),
color=fury.window.colors.white,
font_size=0.004
)
fury.utils.rotate(text_actor, rotation=(-90, 0, 1, 0))

Expand Down Expand Up @@ -166,4 +169,6 @@ def timer_callback(_obj, _event):

showm.add_timer_callback(True, 35, timer_callback)
showm.start()
fury.window.record(scene=showm.scene, size=(900, 768), out_path="viz_earth_animation.png")
fury.window.record(scene=showm.scene,
size=(900, 768),
out_path="viz_earth_animation.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_earth_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,6 @@ def timer_callback(_obj, _event):
showm.add_timer_callback(True, 25, timer_callback)
showm.start()

fury.window.record(scene=showm.scene, size=(900, 768), out_path="viz_earth_coordinates.png")
fury.window.record(scene=showm.scene,
size=(900, 768),
out_path="viz_earth_coordinates.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_fine_tuning_gl_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,6 @@ def timer_callback(obj, event):
if interactive:
showm.start()

fury.window.record(scene=scene, out_path="viz_fine_tuning_gl_context.png", size=(600, 600))
fury.window.record(scene=scene,
out_path="viz_fine_tuning_gl_context.png",
size=(600, 600))
5 changes: 4 additions & 1 deletion docs/examples/viz_fractals.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def gen_centers(depth, pos, center, side):
# the Scene and ShowManager.

scene = fury.window.Scene()
showmgr = fury.window.ShowManager(scene=scene, title="Fractals", size=(800, 800), reset_camera=True)
showmgr = fury.window.ShowManager(scene=scene,
title="Fractals",
size=(800, 800),
reset_camera=True)

###############################################################################
# These values are what work nicely on my machine without lagging. If you have
Expand Down
4 changes: 3 additions & 1 deletion docs/examples/viz_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,6 @@
stream.cleanup()
stream_interaction.cleanup()

fury.window.record(scene=showm.scene, size=window_size, out_path="viz_interaction.png")
fury.window.record(scene=showm.scene,
size=window_size,
out_path="viz_interaction.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_interpolators.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,6 @@
if interactive:
showm.start()

fury.window.record(scene=scene, out_path="viz_keyframe_interpolator.png", size=(900, 768))
fury.window.record(scene=scene,
out_path="viz_keyframe_interpolator.png",
size=(900, 768))
10 changes: 8 additions & 2 deletions docs/examples/viz_network_animated.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ def _timer(_obj, _event):
# more time.

showm = fury.window.ShowManager(
scene=scene, reset_camera=False, size=(900, 768), order_transparent=True, multi_samples=8
scene=scene,
reset_camera=False,
size=(900, 768),
order_transparent=True,
multi_samples=8
)


Expand All @@ -254,4 +258,6 @@ def _timer(_obj, _event):

showm.start()

fury.window.record(scene=showm.scene, size=(900, 768), out_path="viz_animated_networks.png")
fury.window.record(scene=showm.scene,
size=(900, 768),
out_path="viz_animated_networks.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_no_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,6 @@
stream.stop()
stream.cleanup()

fury.window.record(scene=showm.scene, size=window_size, out_path="viz_no_interaction.png")
fury.window.record(scene=showm.scene,
size=window_size,
out_path="viz_no_interaction.png")
5 changes: 4 additions & 1 deletion docs/examples/viz_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
[0, np.sqrt(2) / 2, np.sqrt(2) / 2],
]
)
fury_actor = fury.actor.cube(centers, directions=directions, colors=colors, scales=radii)
fury_actor = fury.actor.cube(centers,
directions=directions,
colors=colors,
scales=radii)

###############################################################################
# Access the memory of the vertices of all the cubes
Expand Down
5 changes: 4 additions & 1 deletion docs/examples/viz_play_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def __init__(self, video, time=10):
self.initialize_scene()
# Create a Show Manager and Initialize it
self.show_manager = fury.window.ShowManager(
scene=self.scene, size=(900, 768), reset_camera=False, order_transparent=True
scene=self.scene,
size=(900, 768),
reset_camera=False,
order_transparent=True
)

# Initialize the Scene with actors
Expand Down
5 changes: 4 additions & 1 deletion docs/examples/viz_robot_arm_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@

###############################################################################
# Creating animations
main_arm_animation = fury.animation.Animation(actors=[main_arm, joint_1], length=2 * np.pi)
main_arm_animation = fury.animation.Animation(
actors=[main_arm, joint_1],
length=2*np.pi
)
child_arm_animation = fury.animation.Animation(actors=[sub_arm, joint_2])
drill_animation = fury.animation.Animation(actors=end)

Expand Down
4 changes: 3 additions & 1 deletion docs/examples/viz_sdfactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
# manager.

current_size = (1024, 720)
showm = fury.window.ShowManager(scene=scene, size=current_size, title="Visualize SDF Actor")
showm = fury.window.ShowManager(scene=scene,
size=current_size,
title="Visualize SDF Actor")

interactive = False

Expand Down
4 changes: 3 additions & 1 deletion docs/examples/viz_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@
if interactive:
show_manager.start()

fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_shapes.png")
fury.window.record(scene=show_manager.scene,
size=current_size,
out_path="viz_shapes.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_spinbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ def rotate_cone(spinbox):
if interactive:
show_manager.start()

fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_spinbox.png")
fury.window.record(scene=show_manager.scene,
size=current_size,
out_path="viz_spinbox.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_spline_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,6 @@
if interactive:
showm.start()

fury.window.record(scene=scene, out_path="viz_keyframe_animation_spline.png", size=(900, 768))
fury.window.record(scene=scene,
out_path="viz_keyframe_animation_spline.png",
size=(900, 768))
4 changes: 3 additions & 1 deletion docs/examples/viz_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,6 @@ def display_element():
if interactive:
show_manager.start()

fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_fury.ui.png")
fury.window.record(scene=show_manager.scene,
size=current_size,
out_path="viz_fury.ui.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_ui_listbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,6 @@ def display_element():
if interactive:
show_manager.start()

fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_listbox.png")
fury.window.record(scene=show_manager.scene,
size=current_size,
out_path="viz_listbox.png")
4 changes: 3 additions & 1 deletion docs/examples/viz_ui_slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,6 @@ def translate_cube_hor(slider):
if interactive:
show_manager.start()

fury.window.record(scene=show_manager.scene, size=current_size, out_path="viz_slider.png")
fury.window.record(scene=show_manager.scene,
size=current_size,
out_path="viz_slider.png")
5 changes: 4 additions & 1 deletion docs/examples/viz_using_time_equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
)


cube = fury.actor.cube(np.array([[0, 0, 0]]), directions=(0, 0, 0), colors=(1, 0, 1), scales=6)
cube = fury.actor.cube(np.array([[0, 0, 0]]),
directions=(0, 0, 0),
colors=(1, 0, 1),
scales=6)

###############################################################################
# Creating an ``Animation`` to animate the actor and show its motion path.
Expand Down

0 comments on commit 0a2a9c9

Please sign in to comment.