MeshInstance2D.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="MeshInstance2D" inherits="Node2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Node used for displaying a [Mesh] in 2D.
  5. </brief_description>
  6. <description>
  7. Node used for displaying a [Mesh] in 2D. A [MeshInstance2D] can be automatically created from an existing [Sprite] via a tool in the editor toolbar. Select the [Sprite] node, then choose [b]Sprite &gt; Convert to MeshInstance2D[/b] at the top of the 2D editor viewport.
  8. </description>
  9. <tutorials>
  10. <link>$DOCS_URL/tutorials/2d/2d_meshes.html</link>
  11. </tutorials>
  12. <methods>
  13. </methods>
  14. <members>
  15. <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
  16. The [Mesh] that will be drawn by the [MeshInstance2D].
  17. </member>
  18. <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
  19. The normal map that will be used if using the default [CanvasItemMaterial].
  20. [b]Note:[/b] Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines.
  21. </member>
  22. <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
  23. The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader.
  24. </member>
  25. </members>
  26. <signals>
  27. <signal name="texture_changed">
  28. <description>
  29. Emitted when the [member texture] is changed.
  30. </description>
  31. </signal>
  32. </signals>
  33. <constants>
  34. </constants>
  35. </class>