summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/AnimationPlayer.xml1
-rw-r--r--doc/classes/NavigationMeshGenerator.xml7
-rw-r--r--misc/dist/html/editor.html53
-rw-r--r--scene/2d/animated_sprite_2d.cpp1
4 files changed, 57 insertions, 5 deletions
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index 625cf3c47c..653607610d 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -179,6 +179,7 @@
<argument index="1" name="update" type="bool" default="false" />
<description>
Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped.
+ [b]Note:[/b] Seeking to the end of the animation doesn't emit [signal animation_finished]. If you want to skip animation and emit the signal, use [method advance].
</description>
</method>
<method name="set_blend_time">
diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml
index 1cffb1a627..36588ce2f5 100644
--- a/doc/classes/NavigationMeshGenerator.xml
+++ b/doc/classes/NavigationMeshGenerator.xml
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NavigationMeshGenerator" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
+ Helper class for creating and clearing navigation meshes.
</brief_description>
<description>
+ This class is responsible for creating and clearing 3D navigation meshes used as [NavigationMesh] resources inside [NavigationRegion3D]. The [NavigationMeshGenerator] has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse.
+ The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations.
+ Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the [NavigationMesh] resource. In the first step, starting from a root node and depending on [NavigationMesh] properties all valid 3D source geometry nodes are collected from the [SceneTree]. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal [MeshInstance3D]s to [CSGShape3D]s or various [CollisionObject3D]s, some operations to collect geometry data can trigger [RenderingServer] and [PhysicsServer3D] synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves [Mutex] locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total amount of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to [NavigationMesh] agent properties by creating a voxel world around the meshes bounding area.
+ The finalized navigation mesh is then returned and stored inside the [NavigationMesh] for use as a resource inside [NavigationRegion3D] nodes.
</description>
<tutorials>
</tutorials>
@@ -12,12 +17,14 @@
<argument index="0" name="nav_mesh" type="NavigationMesh" />
<argument index="1" name="root_node" type="Node" />
<description>
+ Bakes navigation data to the provided [code]nav_mesh[/code] by parsing child nodes under the provided [code]root_node[/code] or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [member NavigationMesh.geometry/parsed_geometry_type] and [member NavigationMesh.geometry/source_geometry_mode] properties on the [NavigationMesh] resource.
</description>
</method>
<method name="clear">
<return type="void" />
<argument index="0" name="nav_mesh" type="NavigationMesh" />
<description>
+ Removes all polygons and vertices from the provided [code]nav_mesh[/code] resource.
</description>
</method>
</methods>
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 8d436038c1..7c44dd45a1 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -68,6 +68,11 @@
height: 100%;
overflow: auto;
background-color: hsla(0, 0%, 0%, 0.5);
+ text-align: left;
+ }
+
+ .welcome-modal-title {
+ text-align: center;
}
.welcome-modal-content {
@@ -238,7 +243,7 @@
onclick="if (event.target === this) closeWelcomeModal(false)"
>
<div class="welcome-modal-content">
- <h2 id="welcome-modal-title">Important - Please read before continuing</h2>
+ <h2 id="welcome-modal-title" class="welcome-modal-title">Important - Please read before continuing</h2>
<div id="welcome-modal-description">
<p>
The Godot Web Editor has some limitations compared to the native version.
@@ -254,9 +259,38 @@
>Web editor documentation</a> for usage instructions and limitations.
</p>
</div>
- <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem">
- OK, don't show again
- </button>
+ <div id="welcome-modal-description-no-cross-origin-isolation" style="display: none">
+ <p>
+ The web server does not support cross-origin isolation,
+ which is required for the Godot Web Editor to function.
+ </p>
+ <p>
+ <strong>Reasons for cross-origin isolation being disabled:</strong>
+ <ul>
+ <li id="welcome-modal-reason-not-secure">
+ This page is not served from a secure context (HTTPS <i>or</i> localhost).
+ </li>
+ <li>
+ This page may not be served with cross-origin isolation headers
+ (check with the developer tools' Network tab).
+ </li>
+ </ul>
+ </p>
+ <p>
+ If you are self-hosting the web editor,
+ refer to
+ <a
+ href="https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#threads"
+ target="_blank"
+ rel="noopener"
+ >Exporting for the Web - Threads</a> for more information.
+ </p>
+ </div>
+ <div style="text-align: center">
+ <button id="welcome-modal-dismiss" class="btn" type="button" onclick="closeWelcomeModal(true)" style="margin-top: 1rem">
+ OK, don't show again
+ </button>
+ </div>
</div>
</div>
<div id="tabs-buttons">
@@ -360,7 +394,16 @@
});
}
- if (localStorage.getItem("welcomeModalDismissed") !== 'true') {
+ if (!crossOriginIsolated) {
+ // Display error dialog as threading support is required for the editor.
+ setButtonEnabled('startButton', false);
+ document.getElementById("welcome-modal-description").style.display = "none";
+ document.getElementById("welcome-modal-description-no-cross-origin-isolation").style.display = "block";
+ document.getElementById("welcome-modal-dismiss").style.display = "none";
+ document.getElementById("welcome-modal-reason-not-secure").style.display = window.isSecureContext ? "none" : "list-item";
+ }
+
+ if (!crossOriginIsolated || localStorage.getItem("welcomeModalDismissed") !== 'true') {
document.getElementById("welcome-modal").style.display = "block";
document.getElementById("welcome-modal-dismiss").focus();
}
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index 4734f97e23..b33c2f43d4 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -388,6 +388,7 @@ void AnimatedSprite2D::play(const StringName &p_animation, const bool p_backward
}
}
+ is_over = false;
set_playing(true);
}