class_meshinstance2d.rst 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.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>` via a tool in the editor 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. **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
  50. ----
  51. .. _class_MeshInstance2D_property_texture:
  52. - :ref:`Texture<class_Texture>` **texture**
  53. +----------+--------------------+
  54. | *Setter* | set_texture(value) |
  55. +----------+--------------------+
  56. | *Getter* | get_texture() |
  57. +----------+--------------------+
  58. 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.
  59. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  60. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  61. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`