diff --git a/legacy/edje/src/examples/physics_3d.edc b/legacy/edje/src/examples/physics_3d.edc index 7e58dcbca5..846f057194 100644 --- a/legacy/edje/src/examples/physics_3d.edc +++ b/legacy/edje/src/examples/physics_3d.edc @@ -1,4 +1,12 @@ -/* It can be tested with edje_player slave mode +/* This example demonstrates the usage of physics faces. + * + * Faces references other groups of the collection. The same group + * can be used for many faces, but to illustrate it we are adding + * a rectangle of different color for each face of a cube. + * It will apply impulses on the cube when receiving messages, so + * it's possible to see the cube rotating and moving. + * + * It can be tested with edje_player slave mode * $ edje_player -S -p -g example_group physics_3d.edj * * message 1 FLOAT_SET 3 80 -100 0 -> apply an impulse on red box with diff --git a/legacy/edje/src/examples/physics_actions.edc b/legacy/edje/src/examples/physics_actions.edc index 945e808775..5863478036 100644 --- a/legacy/edje/src/examples/physics_actions.edc +++ b/legacy/edje/src/examples/physics_actions.edc @@ -1,4 +1,19 @@ -/* It can be tested with edje_player slave mode +/* This example demostrates physics actions, like applying impulses and forces + * to a body. + * + * There are two ways of interacting with bodies. One is using the wanted + * action in a program. E.g.: + * + * action: PHYSICS_VEL_SET 0 -200 0; + * target: "part_name"; + * + * The other way is via script. The same action described above would be + * physics_set_velocity(PART:"part_name", 0, -200, 0); + * + * This a very extensive example, because it illustrate the usage of all + * the possible actions in the both ways. + * + * It can be tested with edje_player slave mode * $ edje_player -S -p physics_actions.edj * * signal up impulse -> will throw both balls up diff --git a/legacy/edje/src/examples/physics_backcull.edc b/legacy/edje/src/examples/physics_backcull.edc index 412d22e7e9..3628e6537d 100644 --- a/legacy/edje/src/examples/physics_backcull.edc +++ b/legacy/edje/src/examples/physics_backcull.edc @@ -1,4 +1,15 @@ -/* It can be tested with edje_player slave mode +/* This example demonstrates how to customize movement freedom and backface + * culling. + * + * By default, bodies only will move on x and y axis, and rotate only + * aroud the z axis. To modify it, the block "movement freedom" should be used. + * This block consists of the "linear" and "angular" attributes, each one + * receiving 3 booleans, to set if movement in each axis is allowed or not. + * + * When a body has backface culling activated, it will be hidden when + * it's not facing the camera. It's deactivated by default. + * + * It can be tested with edje_player slave mode * $ edje_player -S -p physics_backcull.edj * * signal on backcull -> allow movement in all axes, enable backface cull diff --git a/legacy/edje/src/examples/physics_basic.edc b/legacy/edje/src/examples/physics_basic.edc index cdbd11f782..86b065e967 100644 --- a/legacy/edje/src/examples/physics_basic.edc +++ b/legacy/edje/src/examples/physics_basic.edc @@ -1,3 +1,19 @@ +/* This example demonstrates the most basic usage of physics. + * + * To make a part behaves like a body in a physics simulation, + * all that is needed is to set its attribute part.physics_body + * to something different from NONE. For example, RIGID_BOX, + * or CLOTH. It will define the shape of the part, and how it + * will interact with the environment. + * + * The remaining body attributes should be set inside the physics + * block of description. In this example we are customizing + * the restitution, that is how much the body bounces, and friction. + * + * It can be tested with edje_player + * $ edje_player physics_basic.edj + */ + collections { images { diff --git a/legacy/edje/src/examples/physics_soft_bodies.edc b/legacy/edje/src/examples/physics_soft_bodies.edc index 34946bcf1e..41819e302a 100644 --- a/legacy/edje/src/examples/physics_soft_bodies.edc +++ b/legacy/edje/src/examples/physics_soft_bodies.edc @@ -1,3 +1,20 @@ +/* This example shows how to use soft bodies. + * + * Soft bodies have an attribute to change how much it will + * deforms when colliding. It's called "hardness", and can + * be set to any value between 0.0 (soft) and 1.0 (hard). + * By default, all the soft bodies are hard (1.0). + * + * This example will make a box and a sphere collide + * many times against the floor and will be placed at + * top of the screen again. They will have their hardness + * modified each time, going from the default to a very + * soft state. + * + * It can be tested with edje_player + * $ edje_player physics_soft_bodies.edj + */ + collections { images {