class_meshinstance2d.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Node used for displaying a :ref:`Mesh<class_Mesh>` in 2D.
  13. Properties
  14. ----------
  15. +-------------------------------+-------------------------------------------------------------+
  16. | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_MeshInstance2D_property_mesh>` |
  17. +-------------------------------+-------------------------------------------------------------+
  18. | :ref:`Texture<class_Texture>` | :ref:`normal_map<class_MeshInstance2D_property_normal_map>` |
  19. +-------------------------------+-------------------------------------------------------------+
  20. | :ref:`Texture<class_Texture>` | :ref:`texture<class_MeshInstance2D_property_texture>` |
  21. +-------------------------------+-------------------------------------------------------------+
  22. Signals
  23. -------
  24. .. _class_MeshInstance2D_signal_texture_changed:
  25. - **texture_changed** **(** **)**
  26. Description
  27. -----------
  28. 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".
  29. Tutorials
  30. ---------
  31. - :doc:`../tutorials/2d/2d_meshes`
  32. Property Descriptions
  33. ---------------------
  34. .. _class_MeshInstance2D_property_mesh:
  35. - :ref:`Mesh<class_Mesh>` **mesh**
  36. +----------+-----------------+
  37. | *Setter* | set_mesh(value) |
  38. +----------+-----------------+
  39. | *Getter* | get_mesh() |
  40. +----------+-----------------+
  41. The :ref:`Mesh<class_Mesh>` that will be drawn by the ``MeshInstance2D``.
  42. .. _class_MeshInstance2D_property_normal_map:
  43. - :ref:`Texture<class_Texture>` **normal_map**
  44. +----------+-----------------------+
  45. | *Setter* | set_normal_map(value) |
  46. +----------+-----------------------+
  47. | *Getter* | get_normal_map() |
  48. +----------+-----------------------+
  49. The normal map that will be used if using the default :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`.
  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.