Skip to content

Commit 1d53c48

Browse files
Doc: transformation manipulators.
1 parent 1e225cc commit 1d53c48

10 files changed

+76
-12
lines changed

docs/canvas.rst

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -509,18 +509,6 @@ Property Documentation
509509
``renderable`` Whether this object is renderable or not. Often used in Phaser Editor to create hidden layers with physics bodies.
510510
================================= =======================================
511511

512-
Transformation tools
513-
^^^^^^^^^^^^^^^^^^^^
514-
515-
In addition, to set the values directly in the property grid you can change the transformation of an object by selecting it and executing one of the transformation commands. It shows little handlers that you can drag to transform the object. The commands can be executed from the context menu under the ``Transform`` menu, the scene toolbar or by pressing the key shortcuts: Scale (``S``), Angle (``N``), Anchor (``H``) and Pivot (``V``).
516-
517-
.. image:: images/TransformObject.png
518-
:alt: Object transformations.
519-
520-
.. image:: images/TransformObjectTool.png
521-
:alt: Transformation handlers.
522-
523-
524512
Prefab instance properties
525513
~~~~~~~~~~~~~~~~~~~~~~~~~~~
526514

@@ -839,7 +827,83 @@ Parameter Documentation
839827
========================== ======================================================
840828

841829

830+
In-scene object manipulators
831+
----------------------------
832+
833+
Some object properties can be edited directly in the scene, the common case are the transformation properties (translation, scale and rotation), but there are other properties like pivot, anchor and physics body. These special editors or manipulators can be shown by pressing a shortcut key, clicking on a toolbar button or selecting an option in the context menu:
834+
835+
.. image:: images/ManipulatorMenu.png
836+
:alt: Menu of common manipulators.
837+
838+
839+
Translation
840+
~~~~~~~~~~~
841+
842+
The translation manipulators can be used to move the object in all directions or in a specific axis:
843+
844+
.. image:: images/ManipulatorMove.png
845+
:alt: The translation manipulators.
846+
847+
The manipulators are positioned in dependence of the anchor and pivot values.
848+
849+
That black box on the top/right corner is the Shortcuts Pane. That pane shows some properties and buttons. The properties can be edited by clicking on them. The buttons provides some functions like swap from the local to the global coordinates, or the stepping button, to set the stepping on/off. This is common in other transformations.
850+
851+
When you click on a property, it opens a value input dialog. You can write the value directly or an expression that is evaluated. You can use any JavaScript valid expression, including ``Math`` functions.
852+
853+
.. image:: images/ShortcutsPaneFieldValue.png
854+
:alt: Shortcuts pane value dialog.
855+
856+
857+
Scale
858+
~~~~~
859+
860+
The scale manipulators are used to scale an object. If you keep the ``SHIFT`` key pressed, the scale is changed proportionally in the X and Y axis.
861+
862+
.. image:: images/ManipulatorScale.png
863+
:alt: Scale manipulators.
864+
865+
The shortcuts pane contains the following buttons:
866+
867+
1) Flip horizontally. It just multiplies the ``scale.x`` property by ``-1``.
868+
2) Flip vertically. It just multiplies the ``scale.y`` property by ``-1``.
869+
3) Set the scale to ``1``.
870+
4) Lock the scale, it means, change it proportionally or not.
871+
5) Use the local or global coordinates.
872+
873+
Rotation
874+
~~~~~~~~
875+
876+
The rotation manipulators are used to rotate an object:
877+
878+
.. image:: images/ManipulatorRotate.png
879+
:alt: Rotation manipulators.
880+
881+
882+
The shortcuts pane for this transformation contains the following elements:
883+
884+
1) Decrement the angle.
885+
2) Increment the angle.
886+
3) The value of the angle to increment/decrement with the buttons 1 and 2.
887+
4) Use the local or global coordinates.
888+
889+
890+
Anchor
891+
~~~~~~
892+
893+
With the anchor manipulators you can move the anchor point to the desired position:
894+
895+
.. image:: images/ManipulatorAnchor.png
896+
:alt: Anchor manipulators.
897+
898+
The shortcuts pane contains a series of buttons to select one of the anchor presets: ``0``-``0``, ``0.5``-``0``, ``1``-``0`` ...
899+
900+
Pivot
901+
~~~~~
902+
903+
Just like the anchor manipulators: the pivot manipulator and the shortcuts pane.
842904

905+
.. image:: images/ManipulatorPivot.png
906+
:alt: Pivot manipulators.
843907

844908
Scene configuration
845909
-------------------

docs/images/ManipulatorAnchor.png

71.9 KB
Loading

docs/images/ManipulatorMenu.png

69.6 KB
Loading

docs/images/ManipulatorMove.png

81.9 KB
Loading

docs/images/ManipulatorPivot.png

62.5 KB
Loading

docs/images/ManipulatorRotate.png

92.1 KB
Loading

docs/images/ManipulatorScale.png

68.2 KB
Loading
29.6 KB
Loading

docs/images/TransformObject.png

-61.1 KB
Binary file not shown.

docs/images/TransformObjectTool.png

-29.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)