diff --git a/getting_started/step_by_step/img/instancing_ball_duplicated.png b/getting_started/step_by_step/img/instancing_ball_duplicated.png deleted file mode 100644 index 2bcb77528..000000000 Binary files a/getting_started/step_by_step/img/instancing_ball_duplicated.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_ball_duplicated.webp b/getting_started/step_by_step/img/instancing_ball_duplicated.webp new file mode 100644 index 000000000..6a3acc42f Binary files /dev/null and b/getting_started/step_by_step/img/instancing_ball_duplicated.webp differ diff --git a/getting_started/step_by_step/img/instancing_ball_instanced.png b/getting_started/step_by_step/img/instancing_ball_instanced.png deleted file mode 100644 index 7496a41ac..000000000 Binary files a/getting_started/step_by_step/img/instancing_ball_instanced.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_ball_instanced.webp b/getting_started/step_by_step/img/instancing_ball_instanced.webp new file mode 100644 index 000000000..e2beb8894 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_ball_instanced.webp differ diff --git a/getting_started/step_by_step/img/instancing_ball_instances_example.png b/getting_started/step_by_step/img/instancing_ball_instances_example.png deleted file mode 100644 index 62a67dd9a..000000000 Binary files a/getting_started/step_by_step/img/instancing_ball_instances_example.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_ball_instances_example.webp b/getting_started/step_by_step/img/instancing_ball_instances_example.webp new file mode 100644 index 000000000..820da09ed Binary files /dev/null and b/getting_started/step_by_step/img/instancing_ball_instances_example.webp differ diff --git a/getting_started/step_by_step/img/instancing_ball_moved.png b/getting_started/step_by_step/img/instancing_ball_moved.png deleted file mode 100644 index d34987113..000000000 Binary files a/getting_started/step_by_step/img/instancing_ball_moved.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_ball_moved.webp b/getting_started/step_by_step/img/instancing_ball_moved.webp new file mode 100644 index 000000000..ca84cf482 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_ball_moved.webp differ diff --git a/getting_started/step_by_step/img/instancing_ball_scene.png b/getting_started/step_by_step/img/instancing_ball_scene.png deleted file mode 100644 index 30cc17ec3..000000000 Binary files a/getting_started/step_by_step/img/instancing_ball_scene.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_ball_scene.webp b/getting_started/step_by_step/img/instancing_ball_scene.webp new file mode 100644 index 000000000..a83d43b5c Binary files /dev/null and b/getting_started/step_by_step/img/instancing_ball_scene.webp differ diff --git a/getting_started/step_by_step/img/instancing_import_and_edit_button.png b/getting_started/step_by_step/img/instancing_import_and_edit_button.png deleted file mode 100644 index 5a3079999..000000000 Binary files a/getting_started/step_by_step/img/instancing_import_and_edit_button.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_import_and_edit_button.webp b/getting_started/step_by_step/img/instancing_import_and_edit_button.webp new file mode 100644 index 000000000..e5305309b Binary files /dev/null and b/getting_started/step_by_step/img/instancing_import_and_edit_button.webp differ diff --git a/getting_started/step_by_step/img/instancing_import_browse.png b/getting_started/step_by_step/img/instancing_import_browse.png deleted file mode 100644 index 2b6d8c7d2..000000000 Binary files a/getting_started/step_by_step/img/instancing_import_browse.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_import_button.png b/getting_started/step_by_step/img/instancing_import_button.png deleted file mode 100644 index 54f7e32ca..000000000 Binary files a/getting_started/step_by_step/img/instancing_import_button.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_import_button.webp b/getting_started/step_by_step/img/instancing_import_button.webp new file mode 100644 index 000000000..afabf65bb Binary files /dev/null and b/getting_started/step_by_step/img/instancing_import_button.webp differ diff --git a/getting_started/step_by_step/img/instancing_import_project_file.png b/getting_started/step_by_step/img/instancing_import_project_file.png deleted file mode 100644 index e229bcc4b..000000000 Binary files a/getting_started/step_by_step/img/instancing_import_project_file.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_import_project_file.webp b/getting_started/step_by_step/img/instancing_import_project_file.webp new file mode 100644 index 000000000..b4bed5b8e Binary files /dev/null and b/getting_started/step_by_step/img/instancing_import_project_file.webp differ diff --git a/getting_started/step_by_step/img/instancing_instance_child_window.png b/getting_started/step_by_step/img/instancing_instance_child_window.png deleted file mode 100644 index f1b4fa22c..000000000 Binary files a/getting_started/step_by_step/img/instancing_instance_child_window.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_instance_child_window.webp b/getting_started/step_by_step/img/instancing_instance_child_window.webp new file mode 100644 index 000000000..084a7de31 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_instance_child_window.webp differ diff --git a/getting_started/step_by_step/img/instancing_main_scene.png b/getting_started/step_by_step/img/instancing_main_scene.png deleted file mode 100644 index 480eaba0e..000000000 Binary files a/getting_started/step_by_step/img/instancing_main_scene.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_main_scene.webp b/getting_started/step_by_step/img/instancing_main_scene.webp new file mode 100644 index 000000000..660eb3382 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_main_scene.webp differ diff --git a/getting_started/step_by_step/img/instancing_main_scene_with_balls.png b/getting_started/step_by_step/img/instancing_main_scene_with_balls.png deleted file mode 100644 index bb66c084e..000000000 Binary files a/getting_started/step_by_step/img/instancing_main_scene_with_balls.png and /dev/null differ diff --git a/getting_started/step_by_step/img/instancing_main_scene_with_balls.webp b/getting_started/step_by_step/img/instancing_main_scene_with_balls.webp new file mode 100644 index 000000000..7934c1a88 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_main_scene_with_balls.webp differ diff --git a/getting_started/step_by_step/img/instancing_physics_material_expand.webp b/getting_started/step_by_step/img/instancing_physics_material_expand.webp index e98776922..c6c9ad87a 100644 Binary files a/getting_started/step_by_step/img/instancing_physics_material_expand.webp and b/getting_started/step_by_step/img/instancing_physics_material_expand.webp differ diff --git a/getting_started/step_by_step/img/instancing_scene_link_button.webp b/getting_started/step_by_step/img/instancing_scene_link_button.webp new file mode 100644 index 000000000..23d39295d Binary files /dev/null and b/getting_started/step_by_step/img/instancing_scene_link_button.webp differ diff --git a/getting_started/step_by_step/img/instancing_scene_tabs.webp b/getting_started/step_by_step/img/instancing_scene_tabs.webp new file mode 100644 index 000000000..3ab8691c4 Binary files /dev/null and b/getting_started/step_by_step/img/instancing_scene_tabs.webp differ diff --git a/getting_started/step_by_step/instancing.rst b/getting_started/step_by_step/instancing.rst index b3311355d..6cd856712 100644 --- a/getting_started/step_by_step/instancing.rst +++ b/getting_started/step_by_step/instancing.rst @@ -18,13 +18,13 @@ Here's an example of a ball. It's composed of a :ref:`RigidBody2D and bounce on walls, a :ref:`Sprite2D ` node, and a :ref:`CollisionShape2D `. -.. image:: img/instancing_ball_scene.png +.. image:: img/instancing_ball_scene.webp Once you saved a scene, it works as a blueprint: you can reproduce it in other scenes as many times as you'd like. Replicating an object from a template like this is called **instancing**. -.. image:: img/instancing_ball_instances_example.png +.. image:: img/instancing_ball_instances_example.webp As we mentioned in the previous part, instanced scenes behave like a node: the editor hides their content by default. When you instance the Ball, you only see @@ -47,20 +47,16 @@ The Project Manager is accessed by opening Godot, or if you already have Godot o In the Project Manager, click the *Import* button to import the project. -.. image:: img/instancing_import_button.png - -In the pop-up that appears, click the browse button and navigate to the folder -you extracted. - -.. image:: img/instancing_import_browse.png +.. image:: img/instancing_import_button.webp +In the pop-up that appears navigate to the folder you extracted. Double-click the ``project.godot`` file to open it. -.. image:: img/instancing_import_project_file.png +.. image:: img/instancing_import_project_file.webp Finally, click the Import & Edit button. -.. image:: img/instancing_import_and_edit_button.png +.. image:: img/instancing_import_and_edit_button.webp The project contains two packed scenes: ``main.tscn``, containing walls against which the ball collides, and ``ball.tscn``. The Main scene should open @@ -68,25 +64,25 @@ automatically. If you're seeing an empty 3D scene instead of the main scene, cli .. image:: img/instancing_2d_scene_select.webp -.. image:: img/instancing_main_scene.png +.. image:: img/instancing_main_scene.webp Let's add a ball as a child of the Main node. In the Scene dock, select the Main node. Then, click the link icon at the top of the scene dock. This button allows you to add an instance of a scene as a child of the currently selected node. -.. image:: img/instancing_scene_link_button.png +.. image:: img/instancing_scene_link_button.webp Double-click the ball scene to instance it. -.. image:: img/instancing_instance_child_window.png +.. image:: img/instancing_instance_child_window.webp The ball appears in the top-left corner of the viewport. -.. image:: img/instancing_ball_instanced.png +.. image:: img/instancing_ball_instanced.webp Click on it and drag it towards the center of the view. -.. image:: img/instancing_ball_moved.png +.. image:: img/instancing_ball_moved.webp Play the game by pressing :kbd:`F5` (:kbd:`Cmd + B` on macOS). You should see it fall. @@ -94,11 +90,11 @@ Now, we want to create more instances of the Ball node. With the ball still selected, press :kbd:`Ctrl + D` (:kbd:`Cmd + D` on macOS) to call the duplicate command. Click and drag to move the new ball to a different location. -.. image:: img/instancing_ball_duplicated.png +.. image:: img/instancing_ball_duplicated.webp You can repeat this process until you have several in the scene. -.. image:: img/instancing_main_scene_with_balls.png +.. image:: img/instancing_main_scene_with_balls.webp Play the game again. You should now see every ball fall independently from one another. This is what instances do. Each is an independent reproduction of a @@ -135,7 +131,7 @@ causes all instances to update accordingly. Let's now adjust an individual instance. Head back to the Main scene by clicking on the corresponding tab above the viewport. -.. image:: img/instancing_scene_tabs.png +.. image:: img/instancing_scene_tabs.webp Select one of the instanced Ball nodes and, in the Inspector, set its Gravity Scale value to ``10``.