shape-ellipse-object.rst 1.2 KB

12345678910111213141516171819202122232425
  1. .. include:: ../_header.rst
  2. Ellipse
  3. =======
  4. You can create an `Ellipse <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Ellipse.html>`_ by dropping the **Ellipse** block, from the |BlocksView|_, on the scene.
  5. .. image:: ../images/scene-editor-ellipse-1-11092020.webp
  6. :alt: Create an ellipse.
  7. You can change the size of the Ellipse in the **Size section** or you can use the `Size tool <manipulation-tools.html#resize-tool>`_.
  8. .. image:: ../images/scene-editor-ellipse-2-11092020.webp
  9. :alt: Change the ellipse size.
  10. In addition, the Ellipse has the `Smoothness <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Ellipse.html#smoothness__anchor>`_ property (the number of points used when rendering it):
  11. .. image:: ../images/scene-editor-ellipse-3-11092020.webp
  12. :alt: Ellipse's smoothness property.
  13. The `Ellipse <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Ellipse.html>`_ code is generated by the |SceneCompiler|_ using the `ellipse object factory <https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.GameObjectFactory.html#ellipse__anchor>`_:
  14. .. code::
  15. const ellipse = this.add.ellipse(10, 10, 100, 100);