Index · Object → RefCounted → EditorExportPlatform → EditorExportPlatformWeb

EditorExportPlatformWeb

Exporter for the Web.

Class Description

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.

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 Window of the application.

Properties

var custom_template/debug: String

File path to the custom export template used for debug builds. If left empty, the default template is used.

var custom_template/release: String

File path to the custom export template used for release builds. If left empty, the default template is used.

var html/canvas_resize_policy: int

Determines how the canvas should be resized by Godot.

- None: The canvas is not automatically resized.

- Project: The size of the canvas is dependent on the ProjectSettings.

- Adaptive: The canvas is automatically resized to fit as much of the web page as possible.

var html/custom_html_shell: String

The custom HTML page that wraps the exported web build. If left empty, the default HTML shell is used.

For more information, see the Customizing HTML5 Shell tutorial.

var html/experimental_virtual_keyboard: bool

If true, embeds support for a virtual keyboard into the web page, which is shown when necessary on touchscreen devices.

var html/export_icon: bool

If true, the project icon will be used as the favicon for this application's web page.

var html/focus_canvas_on_start: bool

If true, the canvas will be focused as soon as the application is loaded, if the browser window is already in focus.

var html/head_include: String

Additional HTML tags to include inside the <head>, such as <meta> tags.

Note: You do not need to add a <title> tag, as it is automatically included based on the project's name.

var progressive_web_app/background_color: Color

The background color used behind the web application.

var progressive_web_app/display: int

The display mode to use for this progressive web application. Different browsers and platforms may not behave the same.

- Fullscreen: Displays the app in fullscreen and hides all of the browser's UI elements.

- Standalone: Displays the app in a separate window and hides all of the browser's UI elements.

- Minimal UI: Displays the app in a separate window and only shows the browser's UI elements for navigation.

- Browser: Displays the app as a normal web page.

var progressive_web_app/enabled: bool

If true, turns this web build into a progressive web application (PWA).

var progressive_web_app/ensure_cross_origin_isolation_headers: bool

When enabled, the progressive web app will make sure that each request has cross-origin isolation headers (COEP/COOP).

This can simplify the setup to serve the exported game.

var progressive_web_app/icon_144x144: String

File path to the smallest icon for this web application. If not defined, defaults to the project icon.

Note: If the icon is not 144×144, it will be automatically resized for the final build.

var progressive_web_app/icon_180x180: String

File path to the small icon for this web application. If not defined, defaults to the project icon.

Note: If the icon is not 180×180, it will be automatically resized for the final build.

var progressive_web_app/icon_512x512: String

File path to the largest icon for this web application. If not defined, defaults to the project icon.

Note: If the icon is not 512×512, it will be automatically resized for the final build.

var progressive_web_app/offline_page: String

The page to display, should the server hosting the page not be available. This page is saved in the client's machine.

var progressive_web_app/orientation: int

The orientation to use when the web application is run through a mobile device.

- Any: No orientation is forced.

- Landscape: Forces a horizontal layout (wider than it is taller).

- Portrait: Forces a vertical layout (taller than it is wider).

var threads/emscripten_pool_size: int

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.

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.

var threads/godot_pool_size: int

Override for the default size of the WorkerThreadPool. This setting is used when ProjectSettings.threading/worker_pool/max_threads size is set to -1 (which it is by default). This size must be smaller than threads/emscripten_pool_size otherwise deadlocks may occur.

When using threads, this size needs to be large enough to accommodate features that rely on having a dedicated thread like ProjectSettings.physics/2d/run_on_separate_thread or ProjectSettings.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 threads/emscripten_pool_size.

var variant/extensions_support: bool

If true enables GDExtension support for this web build.

var variant/thread_support: bool

If true, the exported game will support threads. It requires a "cross-origin isolated" website, which may be difficult to set up and is limited for security reasons (such as not being able to communicate with third-party websites).

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.

var vram_texture_compression/for_desktop: bool

If true, allows textures to be optimized for desktop through the S3TC/BPTC algorithm.

var vram_texture_compression/for_mobile: bool

If true allows textures to be optimized for mobile through the ETC2/ASTC algorithm.

Methods

Inherited from EditorExportPlatform (27)
func add_message(type: EditorExportPlatform.ExportMessageType, category: String, message: String) -> void
func clear_messages() -> void
func export_pack(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags = 0) -> Error
func export_pack_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray = PackedStringArray(), flags: EditorExportPlatform.DebugFlags = 0) -> Error
func export_project(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags = 0, notify: bool = true) -> Error
func export_project_files(preset: EditorExportPreset, debug: bool, save_cb: Callable, shared_cb: Callable = Callable()) -> Error
func export_zip(preset: EditorExportPreset, debug: bool, path: String, flags: EditorExportPlatform.DebugFlags = 0) -> Error
func export_zip_patch(preset: EditorExportPreset, debug: bool, path: String, patches: PackedStringArray = PackedStringArray(), flags: EditorExportPlatform.DebugFlags = 0) -> Error
func find_export_template(template_file_name: String) -> Dictionary
func get_message_text(index: int) -> String
func save_pack(preset: EditorExportPreset, debug: bool, path: String, embed: bool = false) -> Dictionary
func save_pack_patch(preset: EditorExportPreset, debug: bool, path: String) -> Dictionary
func save_zip(preset: EditorExportPreset, debug: bool, path: String) -> Dictionary
func save_zip_patch(preset: EditorExportPreset, debug: bool, path: String) -> Dictionary
func ssh_push_to_remote(host: String, port: String, scp_args: PackedStringArray, src_file: String, dst_file: String) -> Error
func ssh_run_on_remote(host: String, port: String, ssh_arg: PackedStringArray, cmd_args: String, output: Array = [], port_fwd: int = -1) -> Error
func ssh_run_on_remote_no_wait(host: String, port: String, ssh_args: PackedStringArray, cmd_args: String, port_fwd: int = -1) -> int
Inherited from RefCounted (4)
func init_ref() -> bool
func reference() -> bool
func unreference() -> bool
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)