class_editorexportplatformweb.rst 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/platform/web/doc_classes/EditorExportPlatformWeb.xml.
  6. .. _class_EditorExportPlatformWeb:
  7. EditorExportPlatformWeb
  8. =======================
  9. **Inherits:** :ref:`EditorExportPlatform<class_EditorExportPlatform>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Exporter for the Web.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. The Web exporter customizes how a web build is handled. In the editor's "Export" window, it is created when adding a new "Web" preset.
  15. \ **Note:** Godot on Web is rendered inside a ``<canvas>`` tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main :ref:`Window<class_Window>` of the application.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Exporting for the Web <../tutorials/export/exporting_for_web>`
  20. - :doc:`Web documentation index <../tutorials/platform/web/index>`
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`String<class_String>` | :ref:`custom_template/debug<class_EditorExportPlatformWeb_property_custom_template/debug>` |
  28. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`String<class_String>` | :ref:`custom_template/release<class_EditorExportPlatformWeb_property_custom_template/release>` |
  30. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`int<class_int>` | :ref:`html/canvas_resize_policy<class_EditorExportPlatformWeb_property_html/canvas_resize_policy>` |
  32. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`String<class_String>` | :ref:`html/custom_html_shell<class_EditorExportPlatformWeb_property_html/custom_html_shell>` |
  34. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`html/experimental_virtual_keyboard<class_EditorExportPlatformWeb_property_html/experimental_virtual_keyboard>` |
  36. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`html/export_icon<class_EditorExportPlatformWeb_property_html/export_icon>` |
  38. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`html/focus_canvas_on_start<class_EditorExportPlatformWeb_property_html/focus_canvas_on_start>` |
  40. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`String<class_String>` | :ref:`html/head_include<class_EditorExportPlatformWeb_property_html/head_include>` |
  42. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Color<class_Color>` | :ref:`progressive_web_app/background_color<class_EditorExportPlatformWeb_property_progressive_web_app/background_color>` |
  44. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`int<class_int>` | :ref:`progressive_web_app/display<class_EditorExportPlatformWeb_property_progressive_web_app/display>` |
  46. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`bool<class_bool>` | :ref:`progressive_web_app/enabled<class_EditorExportPlatformWeb_property_progressive_web_app/enabled>` |
  48. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`progressive_web_app/ensure_cross_origin_isolation_headers<class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers>` |
  50. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`String<class_String>` | :ref:`progressive_web_app/icon_144x144<class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144>` |
  52. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`String<class_String>` | :ref:`progressive_web_app/icon_180x180<class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180>` |
  54. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`String<class_String>` | :ref:`progressive_web_app/icon_512x512<class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512>` |
  56. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`String<class_String>` | :ref:`progressive_web_app/offline_page<class_EditorExportPlatformWeb_property_progressive_web_app/offline_page>` |
  58. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`int<class_int>` | :ref:`progressive_web_app/orientation<class_EditorExportPlatformWeb_property_progressive_web_app/orientation>` |
  60. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`bool<class_bool>` | :ref:`variant/extensions_support<class_EditorExportPlatformWeb_property_variant/extensions_support>` |
  62. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`variant/thread_support<class_EditorExportPlatformWeb_property_variant/thread_support>` |
  64. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`vram_texture_compression/for_desktop<class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop>` |
  66. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`vram_texture_compression/for_mobile<class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile>` |
  68. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Property Descriptions
  73. ---------------------
  74. .. _class_EditorExportPlatformWeb_property_custom_template/debug:
  75. .. rst-class:: classref-property
  76. :ref:`String<class_String>` **custom_template/debug** :ref:`🔗<class_EditorExportPlatformWeb_property_custom_template/debug>`
  77. File path to the custom export template used for debug builds. If left empty, the default template is used.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_EditorExportPlatformWeb_property_custom_template/release:
  81. .. rst-class:: classref-property
  82. :ref:`String<class_String>` **custom_template/release** :ref:`🔗<class_EditorExportPlatformWeb_property_custom_template/release>`
  83. File path to the custom export template used for release builds. If left empty, the default template is used.
  84. .. rst-class:: classref-item-separator
  85. ----
  86. .. _class_EditorExportPlatformWeb_property_html/canvas_resize_policy:
  87. .. rst-class:: classref-property
  88. :ref:`int<class_int>` **html/canvas_resize_policy** :ref:`🔗<class_EditorExportPlatformWeb_property_html/canvas_resize_policy>`
  89. Determines how the canvas should be resized by Godot.
  90. - **None:** The canvas is not automatically resized.
  91. - **Project:** The size of the canvas is dependent on the :ref:`ProjectSettings<class_ProjectSettings>`.
  92. - **Adaptive:** The canvas is automatically resized to fit as much of the web page as possible.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_EditorExportPlatformWeb_property_html/custom_html_shell:
  96. .. rst-class:: classref-property
  97. :ref:`String<class_String>` **html/custom_html_shell** :ref:`🔗<class_EditorExportPlatformWeb_property_html/custom_html_shell>`
  98. The custom HTML page that wraps the exported web build. If left empty, the default HTML shell is used.
  99. For more information, see the :doc:`Customizing HTML5 Shell <../tutorials/platform/web/customizing_html5_shell>` tutorial.
  100. .. rst-class:: classref-item-separator
  101. ----
  102. .. _class_EditorExportPlatformWeb_property_html/experimental_virtual_keyboard:
  103. .. rst-class:: classref-property
  104. :ref:`bool<class_bool>` **html/experimental_virtual_keyboard** :ref:`🔗<class_EditorExportPlatformWeb_property_html/experimental_virtual_keyboard>`
  105. **Experimental:** This property may be changed or removed in future versions.
  106. If ``true``, embeds support for a virtual keyboard into the web page, which is shown when necessary on touchscreen devices.
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_EditorExportPlatformWeb_property_html/export_icon:
  110. .. rst-class:: classref-property
  111. :ref:`bool<class_bool>` **html/export_icon** :ref:`🔗<class_EditorExportPlatformWeb_property_html/export_icon>`
  112. If ``true``, the project icon will be used as the favicon for this application's web page.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_EditorExportPlatformWeb_property_html/focus_canvas_on_start:
  116. .. rst-class:: classref-property
  117. :ref:`bool<class_bool>` **html/focus_canvas_on_start** :ref:`🔗<class_EditorExportPlatformWeb_property_html/focus_canvas_on_start>`
  118. If ``true``, the canvas will be focused as soon as the application is loaded, if the browser window is already in focus.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_EditorExportPlatformWeb_property_html/head_include:
  122. .. rst-class:: classref-property
  123. :ref:`String<class_String>` **html/head_include** :ref:`🔗<class_EditorExportPlatformWeb_property_html/head_include>`
  124. Additional HTML tags to include inside the ``<head>``, such as ``<meta>`` tags.
  125. \ **Note:** You do not need to add a ``<title>`` tag, as it is automatically included based on the project's name.
  126. .. rst-class:: classref-item-separator
  127. ----
  128. .. _class_EditorExportPlatformWeb_property_progressive_web_app/background_color:
  129. .. rst-class:: classref-property
  130. :ref:`Color<class_Color>` **progressive_web_app/background_color** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/background_color>`
  131. The background color used behind the web application.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_EditorExportPlatformWeb_property_progressive_web_app/display:
  135. .. rst-class:: classref-property
  136. :ref:`int<class_int>` **progressive_web_app/display** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/display>`
  137. The `display mode <https://developer.mozilla.org/en-US/docs/Web/Manifest/display/>`__ to use for this progressive web application. Different browsers and platforms may not behave the same.
  138. - **Fullscreen:** Displays the app in fullscreen and hides all of the browser's UI elements.
  139. - **Standalone:** Displays the app in a separate window and hides all of the browser's UI elements.
  140. - **Minimal UI:** Displays the app in a separate window and only shows the browser's UI elements for navigation.
  141. - **Browser:** Displays the app as a normal web page.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _class_EditorExportPlatformWeb_property_progressive_web_app/enabled:
  145. .. rst-class:: classref-property
  146. :ref:`bool<class_bool>` **progressive_web_app/enabled** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/enabled>`
  147. If ``true``, turns this web build into a `progressive web application <https://en.wikipedia.org/wiki/Progressive_web_app>`__ (PWA).
  148. .. rst-class:: classref-item-separator
  149. ----
  150. .. _class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers:
  151. .. rst-class:: classref-property
  152. :ref:`bool<class_bool>` **progressive_web_app/ensure_cross_origin_isolation_headers** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers>`
  153. When enabled, the progressive web app will make sure that each request has cross-origin isolation headers (COEP/COOP).
  154. This can simplify the setup to serve the exported game.
  155. .. rst-class:: classref-item-separator
  156. ----
  157. .. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144:
  158. .. rst-class:: classref-property
  159. :ref:`String<class_String>` **progressive_web_app/icon_144x144** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144>`
  160. File path to the smallest icon for this web application. If not defined, defaults to the project icon.
  161. \ **Note:** If the icon is not 144×144, it will be automatically resized for the final build.
  162. .. rst-class:: classref-item-separator
  163. ----
  164. .. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180:
  165. .. rst-class:: classref-property
  166. :ref:`String<class_String>` **progressive_web_app/icon_180x180** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180>`
  167. File path to the small icon for this web application. If not defined, defaults to the project icon.
  168. \ **Note:** If the icon is not 180×180, it will be automatically resized for the final build.
  169. .. rst-class:: classref-item-separator
  170. ----
  171. .. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512:
  172. .. rst-class:: classref-property
  173. :ref:`String<class_String>` **progressive_web_app/icon_512x512** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512>`
  174. File path to the largest icon for this web application. If not defined, defaults to the project icon.
  175. \ **Note:** If the icon is not 512×512, it will be automatically resized for the final build.
  176. .. rst-class:: classref-item-separator
  177. ----
  178. .. _class_EditorExportPlatformWeb_property_progressive_web_app/offline_page:
  179. .. rst-class:: classref-property
  180. :ref:`String<class_String>` **progressive_web_app/offline_page** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/offline_page>`
  181. The page to display, should the server hosting the page not be available. This page is saved in the client's machine.
  182. .. rst-class:: classref-item-separator
  183. ----
  184. .. _class_EditorExportPlatformWeb_property_progressive_web_app/orientation:
  185. .. rst-class:: classref-property
  186. :ref:`int<class_int>` **progressive_web_app/orientation** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/orientation>`
  187. The orientation to use when the web application is run through a mobile device.
  188. - **Any:** No orientation is forced.
  189. - **Landscape:** Forces a horizontal layout (wider than it is taller).
  190. - **Portrait:** Forces a vertical layout (taller than it is wider).
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_EditorExportPlatformWeb_property_variant/extensions_support:
  194. .. rst-class:: classref-property
  195. :ref:`bool<class_bool>` **variant/extensions_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/extensions_support>`
  196. If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web build.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_EditorExportPlatformWeb_property_variant/thread_support:
  200. .. rst-class:: classref-property
  201. :ref:`bool<class_bool>` **variant/thread_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/thread_support>`
  202. If ``true``, the exported game will support threads. It requires `a "cross-origin isolated" website <https://web.dev/articles/coop-coep>`__, which may be difficult to set up and is limited for security reasons (such as not being able to communicate with third-party websites).
  203. If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on an HTTPS website.
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop:
  207. .. rst-class:: classref-property
  208. :ref:`bool<class_bool>` **vram_texture_compression/for_desktop** :ref:`🔗<class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop>`
  209. If ``true``, allows textures to be optimized for desktop through the S3TC algorithm.
  210. .. rst-class:: classref-item-separator
  211. ----
  212. .. _class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile:
  213. .. rst-class:: classref-property
  214. :ref:`bool<class_bool>` **vram_texture_compression/for_mobile** :ref:`🔗<class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile>`
  215. If ``true`` allows textures to be optimized for mobile through the ETC2 algorithm.
  216. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  217. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  218. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  219. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  220. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  221. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  222. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  223. .. |void| replace:: :abbr:`void (No return value.)`