shape-object.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .. include:: ../_header.rst
  2. Shape
  3. -----
  4. .. toctree::
  5. shape-rectangle-object
  6. shape-ellipse-object
  7. shape-triangle-object
  8. shape-polygon-object
  9. The Shape objects are geometric-based display objects. You can add them to a Scene, a Container or a Group.
  10. All Shape objects extends the `Phaser.GameObjects.Shape <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html>`_ class and share these common properties:
  11. * `Variable properties <variable-properties.html>`_
  12. * `Lists properties <lists-properties.html>`_
  13. * `Transform properties <transform-properties.html>`_
  14. * `Origin properties <origin-properties.html>`_
  15. * `Size properties <size-properties.html>`_
  16. * `Visible property <visible-property.html>`_
  17. * `Alpha properties <alpha-properties.html>`_
  18. But they have the following properties:
  19. .. image:: ../images/scene-editor-shape-properties-11092020.webp
  20. :alt: Shape properties.
  21. * `Is Filled <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#isFilled__anchor>`_: Controls if this Shape is filled or not. Note that some Shapes do not support being filled (such as Line shapes).
  22. * `Fill Color <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#fillColor__anchor>`_: The fill color used by this Shape.
  23. * `Fill Alpha <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#fillAlpha__anchor>`_: The fill alpha value used by this Shape.
  24. * `Is Stroked <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#isStroked__anchor>`_: Controls if this Shape is stroked or not. Note that some Shapes do not support being stroked (such as Iso Box shapes).
  25. * `Stroke Color <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#strokeColor__anchor>`_: The stroke color used by this Shape.
  26. * `Stroke Alpha <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#strokeAlpha__anchor>`_: The stroke alpha value used by this Shape.
  27. * `Line Width <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Shape.html#lineWidth__anchor>`_: The stroke line width used by this Shape.