class_editorexportplatformweb.rst 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  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:`int<class_int>` | :ref:`threads/emscripten_pool_size<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>` |
  62. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`int<class_int>` | :ref:`threads/godot_pool_size<class_EditorExportPlatformWeb_property_threads/godot_pool_size>` |
  64. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`variant/extensions_support<class_EditorExportPlatformWeb_property_variant/extensions_support>` |
  66. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`variant/thread_support<class_EditorExportPlatformWeb_property_variant/thread_support>` |
  68. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`bool<class_bool>` | :ref:`vram_texture_compression/for_desktop<class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop>` |
  70. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`bool<class_bool>` | :ref:`vram_texture_compression/for_mobile<class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile>` |
  72. +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. .. rst-class:: classref-section-separator
  74. ----
  75. .. rst-class:: classref-descriptions-group
  76. Property Descriptions
  77. ---------------------
  78. .. _class_EditorExportPlatformWeb_property_custom_template/debug:
  79. .. rst-class:: classref-property
  80. :ref:`String<class_String>` **custom_template/debug** :ref:`🔗<class_EditorExportPlatformWeb_property_custom_template/debug>`
  81. File path to the custom export template used for debug builds. If left empty, the default template is used.
  82. .. rst-class:: classref-item-separator
  83. ----
  84. .. _class_EditorExportPlatformWeb_property_custom_template/release:
  85. .. rst-class:: classref-property
  86. :ref:`String<class_String>` **custom_template/release** :ref:`🔗<class_EditorExportPlatformWeb_property_custom_template/release>`
  87. File path to the custom export template used for release builds. If left empty, the default template is used.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_EditorExportPlatformWeb_property_html/canvas_resize_policy:
  91. .. rst-class:: classref-property
  92. :ref:`int<class_int>` **html/canvas_resize_policy** :ref:`🔗<class_EditorExportPlatformWeb_property_html/canvas_resize_policy>`
  93. Determines how the canvas should be resized by Godot.
  94. - **None:** The canvas is not automatically resized.
  95. - **Project:** The size of the canvas is dependent on the :ref:`ProjectSettings<class_ProjectSettings>`.
  96. - **Adaptive:** The canvas is automatically resized to fit as much of the web page as possible.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_EditorExportPlatformWeb_property_html/custom_html_shell:
  100. .. rst-class:: classref-property
  101. :ref:`String<class_String>` **html/custom_html_shell** :ref:`🔗<class_EditorExportPlatformWeb_property_html/custom_html_shell>`
  102. The custom HTML page that wraps the exported web build. If left empty, the default HTML shell is used.
  103. For more information, see the :doc:`Customizing HTML5 Shell <../tutorials/platform/web/customizing_html5_shell>` tutorial.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_EditorExportPlatformWeb_property_html/experimental_virtual_keyboard:
  107. .. rst-class:: classref-property
  108. :ref:`bool<class_bool>` **html/experimental_virtual_keyboard** :ref:`🔗<class_EditorExportPlatformWeb_property_html/experimental_virtual_keyboard>`
  109. **Experimental:** This property may be changed or removed in future versions.
  110. If ``true``, embeds support for a virtual keyboard into the web page, which is shown when necessary on touchscreen devices.
  111. .. rst-class:: classref-item-separator
  112. ----
  113. .. _class_EditorExportPlatformWeb_property_html/export_icon:
  114. .. rst-class:: classref-property
  115. :ref:`bool<class_bool>` **html/export_icon** :ref:`🔗<class_EditorExportPlatformWeb_property_html/export_icon>`
  116. If ``true``, the project icon will be used as the favicon for this application's web page.
  117. .. rst-class:: classref-item-separator
  118. ----
  119. .. _class_EditorExportPlatformWeb_property_html/focus_canvas_on_start:
  120. .. rst-class:: classref-property
  121. :ref:`bool<class_bool>` **html/focus_canvas_on_start** :ref:`🔗<class_EditorExportPlatformWeb_property_html/focus_canvas_on_start>`
  122. If ``true``, the canvas will be focused as soon as the application is loaded, if the browser window is already in focus.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _class_EditorExportPlatformWeb_property_html/head_include:
  126. .. rst-class:: classref-property
  127. :ref:`String<class_String>` **html/head_include** :ref:`🔗<class_EditorExportPlatformWeb_property_html/head_include>`
  128. Additional HTML tags to include inside the ``<head>``, such as ``<meta>`` tags.
  129. \ **Note:** You do not need to add a ``<title>`` tag, as it is automatically included based on the project's name.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_EditorExportPlatformWeb_property_progressive_web_app/background_color:
  133. .. rst-class:: classref-property
  134. :ref:`Color<class_Color>` **progressive_web_app/background_color** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/background_color>`
  135. The background color used behind the web application.
  136. .. rst-class:: classref-item-separator
  137. ----
  138. .. _class_EditorExportPlatformWeb_property_progressive_web_app/display:
  139. .. rst-class:: classref-property
  140. :ref:`int<class_int>` **progressive_web_app/display** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/display>`
  141. 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.
  142. - **Fullscreen:** Displays the app in fullscreen and hides all of the browser's UI elements.
  143. - **Standalone:** Displays the app in a separate window and hides all of the browser's UI elements.
  144. - **Minimal UI:** Displays the app in a separate window and only shows the browser's UI elements for navigation.
  145. - **Browser:** Displays the app as a normal web page.
  146. .. rst-class:: classref-item-separator
  147. ----
  148. .. _class_EditorExportPlatformWeb_property_progressive_web_app/enabled:
  149. .. rst-class:: classref-property
  150. :ref:`bool<class_bool>` **progressive_web_app/enabled** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/enabled>`
  151. If ``true``, turns this web build into a `progressive web application <https://en.wikipedia.org/wiki/Progressive_web_app>`__ (PWA).
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers:
  155. .. rst-class:: classref-property
  156. :ref:`bool<class_bool>` **progressive_web_app/ensure_cross_origin_isolation_headers** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers>`
  157. When enabled, the progressive web app will make sure that each request has cross-origin isolation headers (COEP/COOP).
  158. This can simplify the setup to serve the exported game.
  159. .. rst-class:: classref-item-separator
  160. ----
  161. .. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144:
  162. .. rst-class:: classref-property
  163. :ref:`String<class_String>` **progressive_web_app/icon_144x144** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144>`
  164. File path to the smallest icon for this web application. If not defined, defaults to the project icon.
  165. \ **Note:** If the icon is not 144×144, it will be automatically resized for the final build.
  166. .. rst-class:: classref-item-separator
  167. ----
  168. .. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180:
  169. .. rst-class:: classref-property
  170. :ref:`String<class_String>` **progressive_web_app/icon_180x180** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180>`
  171. File path to the small icon for this web application. If not defined, defaults to the project icon.
  172. \ **Note:** If the icon is not 180×180, it will be automatically resized for the final build.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512:
  176. .. rst-class:: classref-property
  177. :ref:`String<class_String>` **progressive_web_app/icon_512x512** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512>`
  178. File path to the largest icon for this web application. If not defined, defaults to the project icon.
  179. \ **Note:** If the icon is not 512×512, it will be automatically resized for the final build.
  180. .. rst-class:: classref-item-separator
  181. ----
  182. .. _class_EditorExportPlatformWeb_property_progressive_web_app/offline_page:
  183. .. rst-class:: classref-property
  184. :ref:`String<class_String>` **progressive_web_app/offline_page** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/offline_page>`
  185. The page to display, should the server hosting the page not be available. This page is saved in the client's machine.
  186. .. rst-class:: classref-item-separator
  187. ----
  188. .. _class_EditorExportPlatformWeb_property_progressive_web_app/orientation:
  189. .. rst-class:: classref-property
  190. :ref:`int<class_int>` **progressive_web_app/orientation** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/orientation>`
  191. The orientation to use when the web application is run through a mobile device.
  192. - **Any:** No orientation is forced.
  193. - **Landscape:** Forces a horizontal layout (wider than it is taller).
  194. - **Portrait:** Forces a vertical layout (taller than it is wider).
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_EditorExportPlatformWeb_property_threads/emscripten_pool_size:
  198. .. rst-class:: classref-property
  199. :ref:`int<class_int>` **threads/emscripten_pool_size** :ref:`🔗<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>`
  200. The number of threads that emscripten will allocate at startup. A smaller value will allocate fewer threads and consume fewer system resources, but you may run the risk of running out of threads in the pool and needing to allocate more threads at run time which may cause a deadlock.
  201. \ **Note:** Some browsers have a hard cap on the number of threads that can be allocated, so it is best to be cautious and keep this number low.
  202. .. rst-class:: classref-item-separator
  203. ----
  204. .. _class_EditorExportPlatformWeb_property_threads/godot_pool_size:
  205. .. rst-class:: classref-property
  206. :ref:`int<class_int>` **threads/godot_pool_size** :ref:`🔗<class_EditorExportPlatformWeb_property_threads/godot_pool_size>`
  207. Override for the default size of the :ref:`WorkerThreadPool<class_WorkerThreadPool>`. This setting is used when :ref:`ProjectSettings.threading/worker_pool/max_threads<class_ProjectSettings_property_threading/worker_pool/max_threads>` size is set to -1 (which it is by default). This size must be smaller than :ref:`threads/emscripten_pool_size<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>` otherwise deadlocks may occur.
  208. When using threads this size needs to be large enough to accommodate features that rely on having a dedicated thread like :ref:`ProjectSettings.physics/2d/run_on_separate_thread<class_ProjectSettings_property_physics/2d/run_on_separate_thread>` or :ref:`ProjectSettings.rendering/driver/threads/thread_model<class_ProjectSettings_property_rendering/driver/threads/thread_model>`. In general, it is best to ensure that this is at least 4 and is at least 2 or 3 less than :ref:`threads/emscripten_pool_size<class_EditorExportPlatformWeb_property_threads/emscripten_pool_size>`.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_EditorExportPlatformWeb_property_variant/extensions_support:
  212. .. rst-class:: classref-property
  213. :ref:`bool<class_bool>` **variant/extensions_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/extensions_support>`
  214. If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web build.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_EditorExportPlatformWeb_property_variant/thread_support:
  218. .. rst-class:: classref-property
  219. :ref:`bool<class_bool>` **variant/thread_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/thread_support>`
  220. 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).
  221. 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.
  222. .. rst-class:: classref-item-separator
  223. ----
  224. .. _class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop:
  225. .. rst-class:: classref-property
  226. :ref:`bool<class_bool>` **vram_texture_compression/for_desktop** :ref:`🔗<class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop>`
  227. If ``true``, allows textures to be optimized for desktop through the S3TC/BPTC algorithm.
  228. .. rst-class:: classref-item-separator
  229. ----
  230. .. _class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile:
  231. .. rst-class:: classref-property
  232. :ref:`bool<class_bool>` **vram_texture_compression/for_mobile** :ref:`🔗<class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile>`
  233. If ``true`` allows textures to be optimized for mobile through the ETC2/ASTC algorithm.
  234. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  235. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  236. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  237. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  238. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  239. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  240. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  241. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  242. .. |void| replace:: :abbr:`void (No return value.)`