class_meshinstance2d.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the MeshInstance2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_MeshInstance2D:
  6. MeshInstance2D
  7. ==============
  8. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Node used for displaying a :ref:`Mesh<class_Mesh>` in 2D.
  10. Description
  11. -----------
  12. Node used for displaying a :ref:`Mesh<class_Mesh>` in 2D. Can be constructed from an existing :ref:`Sprite<class_Sprite>` use tool in Toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D".
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/2d/2d_meshes`
  16. Properties
  17. ----------
  18. +-------------------------------+-------------------------------------------------------------+
  19. | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_MeshInstance2D_property_mesh>` |
  20. +-------------------------------+-------------------------------------------------------------+
  21. | :ref:`Texture<class_Texture>` | :ref:`normal_map<class_MeshInstance2D_property_normal_map>` |
  22. +-------------------------------+-------------------------------------------------------------+
  23. | :ref:`Texture<class_Texture>` | :ref:`texture<class_MeshInstance2D_property_texture>` |
  24. +-------------------------------+-------------------------------------------------------------+
  25. Signals
  26. -------
  27. .. _class_MeshInstance2D_signal_texture_changed:
  28. - **texture_changed** **(** **)**
  29. Emitted when the :ref:`texture<class_MeshInstance2D_property_texture>` is changed.
  30. Property Descriptions
  31. ---------------------
  32. .. _class_MeshInstance2D_property_mesh:
  33. - :ref:`Mesh<class_Mesh>` **mesh**
  34. +----------+-----------------+
  35. | *Setter* | set_mesh(value) |
  36. +----------+-----------------+
  37. | *Getter* | get_mesh() |
  38. +----------+-----------------+
  39. The :ref:`Mesh<class_Mesh>` that will be drawn by the ``MeshInstance2D``.
  40. ----
  41. .. _class_MeshInstance2D_property_normal_map:
  42. - :ref:`Texture<class_Texture>` **normal_map**
  43. +----------+-----------------------+
  44. | *Setter* | set_normal_map(value) |
  45. +----------+-----------------------+
  46. | *Getter* | get_normal_map() |
  47. +----------+-----------------------+
  48. The normal map that will be used if using the default :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`.
  49. ----
  50. .. _class_MeshInstance2D_property_texture:
  51. - :ref:`Texture<class_Texture>` **texture**
  52. +----------+--------------------+
  53. | *Setter* | set_texture(value) |
  54. +----------+--------------------+
  55. | *Getter* | get_texture() |
  56. +----------+--------------------+
  57. The :ref:`Texture<class_Texture>` that will be used if using the default :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`. Can be accessed as ``TEXTURE`` in CanvasItem shader.