class_meshinstance2d.rst 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. Description
  23. -----------
  24. 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".
  25. Tutorials
  26. ---------
  27. - :doc:`../tutorials/2d/2d_meshes`
  28. Property Descriptions
  29. ---------------------
  30. .. _class_MeshInstance2D_property_mesh:
  31. - :ref:`Mesh<class_Mesh>` **mesh**
  32. +----------+-----------------+
  33. | *Setter* | set_mesh(value) |
  34. +----------+-----------------+
  35. | *Getter* | get_mesh() |
  36. +----------+-----------------+
  37. The :ref:`Mesh<class_Mesh>` that will be drawn by the :ref:`MeshInstance2D<class_MeshInstance2D>`.
  38. ----
  39. .. _class_MeshInstance2D_property_normal_map:
  40. - :ref:`Texture<class_Texture>` **normal_map**
  41. +----------+-----------------------+
  42. | *Setter* | set_normal_map(value) |
  43. +----------+-----------------------+
  44. | *Getter* | get_normal_map() |
  45. +----------+-----------------------+
  46. The normal map that will be used if using the default :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`.
  47. ----
  48. .. _class_MeshInstance2D_property_texture:
  49. - :ref:`Texture<class_Texture>` **texture**
  50. +----------+--------------------+
  51. | *Setter* | set_texture(value) |
  52. +----------+--------------------+
  53. | *Getter* | get_texture() |
  54. +----------+--------------------+
  55. 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.