Commit Graph

144 Commits

Author SHA1 Message Date
lawnjelly
22d90711da Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-06-11 08:41:42 +02:00
37273d29c9 Ported: Multirect - Fix refining regions for all derived Textures
Fixes allowing all derived texture types to modify region prior to rendering.
- lawnjelly
43b6205887
2023-06-11 00:47:10 +02:00
8642a7c722 Ported: Fix rendering tiles using nested AtlasTextures
- kleonc
12c923cb8b
2023-06-11 00:23:26 +02:00
Ninni Pipping
feb55d26d2 Fix size error in BitMap.opaque_to_polygons
Previous estimate of upper limit on size was incorrect
2023-06-10 23:35:51 +02:00
8b18898609 Backported from godot4: Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
- DarkKilauea
a0715b30f9
2023-06-09 22:03:42 +02:00
6384b9624f Ported from godot4: Make navigation mesh edge connections optional
Makes navigation mesh edge connections optional.
- smix8
f986b52b3c
2023-06-09 20:54:05 +02:00
0438c3cc3f Backported from godot4: Added node for Navigation links .
- DarkKilauea
3dd59013f4
2023-06-08 20:46:09 +02:00
91f365b183 Added CapsuleShape2D support for StaticBody2DNavigationGeometryParser2D. 2023-06-07 00:36:53 +02:00
d344005b8d Don't unref() the NavigationMesh in NavigationPolygon. 2023-06-06 23:44:33 +02:00
c898d9bc51 NAvigationMesh small tweaks. 2023-06-06 10:02:47 +02:00
63892627f7 Ported missing changes to NavigationPolygon from the navigation mesh generator rework pr. 2023-06-06 09:58:44 +02:00
2296bf693a Fix and finally enable PandemoniumNavigationMeshGenerator. 2023-06-05 20:42:35 +02:00
26ff340d47 Reorganized NavigationMesh. 2023-06-05 19:21:59 +02:00
a3aebe8bc5 Ported the improvements to the NavigationMesh from the NavigationMeshGenerator rework pr. 2023-06-05 19:20:28 +02:00
c72a079c49 Removed the Polygon struct from NavigationMesh. 2023-06-05 19:07:04 +02:00
25078b1437 Ported from godot4: Remove / Replace old Navigation Debug Visualization
- removes / replaces leftovers from old navigation debug code
- cleanes SceneTree and ProjectSettings from old navigation debug
- smix8
d7f75fab60
2023-06-05 18:56:41 +02:00
68b9f4c90e Ported from godot4: Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
- smix8
c394ea518e
2023-06-05 18:05:15 +02:00
cfa4384ad4 Backported from godot4: Fix NavigationMesh baking AABB Editor handling and visuals
Fixes handling and visuals for Navigation Mesh baking AABB in the Editor.
- smix8
2023-06-05 14:33:55 +02:00
b7892d6baf Backported from godot4: Implement NavigationMesh bake area.
Adds two new properties to NavigationMesh resources to restrict the navmesh baking to an area enclosed by an AABB with volume.
- smix8
0c4d99f4fd
2023-06-05 14:24:42 +02:00
6589d075bb Ported the improvements to the NavigationPolygon from the aforementioned pull request. 2023-06-05 14:13:02 +02:00
712eb8eb8a Removed the Polygon struct from NavigationPolygon. 2023-06-05 12:48:57 +02:00
0bfa40bb09 Reorganize NavigationPolygon. 2023-06-05 12:44:49 +02:00
8cbb1bb879 Started porting pull request from godot 4: Rework NavigationMeshGenerator
Reworks NavigationMeshGenerator and navigation mesh parse and bake process. Adds navigation mesh baking for 2D.
- smix8
https://github.com/godotengine/godot/pull/70724
38699a8259
2023-06-03 18:22:12 +02:00
2114b2239b Split NavigationPolygon and NavigationPolygonInstance into 2 files. Also renamedNavigationPolygonInstance to NavigationRegion2D. 2023-06-03 16:54:48 +02:00
3a1b2954f1 Ported: [3.x] Don't apply scale to autohide theme property
- AThousandShips
1c66257568
2023-04-20 23:47:14 +02:00
dd5ad408e8 Ported: SurfaceTool - efficiency improvements
Changed to use LocalVector rather than linked lists.
- lawnjelly
ff714fbe02
2023-04-20 23:44:12 +02:00
1263101396 Ported: Batching - Add MultiRect command
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.

Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.

- lawnjelly

910ddd13c4
2023-04-20 23:09:37 +02:00
Marius Hanl
1be818c478 Fix RichTextLabel: BBCode [color] tags are not counting in font char spacing
Each BBCode tag is drawn individually, so we have to add the character spacing manually.
2023-03-12 13:11:00 +01:00
e42c604bc3 Ported: Switch from recursion to iterative for backfilling colour regions.
- Paulb23
ee4a1c99a7
2023-02-21 13:11:37 +01:00
a79792ee67 Ported: Fix color region end key seach and start key order.
- Paulb23
6cdcdbc242
2023-02-21 13:08:49 +01:00
6ea9b581d7 Ported: Fix colour region continuation over blank lines, issue 41120
- Paulb23
5cf2cf8646
2023-02-21 12:53:41 +01:00
634bdfbb69 Ported: Changed line_edited_from(from) to lines_edit_from(from, to)
- Paulb23
907f9f2a84
2023-02-21 12:37:52 +01:00
0016b64316 Fix inconsistent overrides warning. 2023-02-21 01:34:30 +01:00
c356806ebf Ported: Extract Syntax highlighting from TextEdit and add EditorSyntaxHighlighter
- Extacted all syntax highlighting code from text edit
- Removed enable syntax highlighting from text edit
- Added line_edited_from signal to text_edit
- Renamed get/set_syntax_highlighting to get/set_syntax_highlighter
- Added EditorSyntaxHighligher
- Paulb23
bc4cee4458
2023-02-21 01:30:59 +01:00
0edf8fe956 Ported: Convert syntax highlighters into a resource
- Paulb23
2f1080be9b
2023-02-20 14:51:10 +01:00
db67fa53ea Ported: Add a theme usability setting which updates the touch area of UI elements (e.g: scrollbar) for the editor on touchscreen devices
- m4gr3d
8170b7ae1e
2023-02-07 02:50:11 +01:00
1f20512f8c Ported: Improve error messages and classref for occluders and portals
Misused functions would previously produce no error messages which was confusing for users.
- lawnjelly
5a0cb54b3a
2023-02-07 02:28:29 +01:00
Hugo Locurcio
04338a5018 Tweak particles animation offset property hint to allow more precise values 2023-01-16 13:47:55 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
213f393293 Fix typos with codespell. 2022-12-22 19:51:25 +01:00
8aa456b4c4 Ported: Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- SpatialMaterial.uv1_scale
- SpatialMaterial.uv2_scale
- fire-forge and timothyqiu
0d602ce881
2022-12-22 18:52:47 +01:00
kleonc
12e28bd557 AtlasTexture Fix calculating rects when flipping
(cherry picked from commit c3851b91db7a6dfd7170d6171109255ecb4a3809)
2022-12-22 14:31:21 +01:00
Paweł Fertyk
6ef3d20fb1 Fix BitMap.resize error spam
Fixes #70187.
2022-12-22 14:27:15 +01:00
lawnjelly
25c3232a77 VariantParser make readahead optional
It turns out some areas are independently moving / reading filepointers outside of the VariantParser, which can cause the readahead caching to get out of sync.

This PR makes the VariantParser readahead to be optional to allow for these use cases.
2022-12-22 13:52:51 +01:00
bruvzg
0c95c634bb Fix auto-translation and ignore control chars. 2022-12-11 19:14:14 +01:00
jbcolli2
6812b69c1e Changed normal of CylinderMesh to account for slanted side.
(cherry picked from commit 491ec622f641c28c919c9f8d1b0fbaad014e4714)
2022-11-30 19:23:53 +01:00
bruvzg
4b2281058a Improve font glyph cache packing shelf best height fit heuristic, delay font texture update, until texture is accessed. 2022-11-13 00:35:55 +01:00
Michael Alexsander
b85570c541 Expose various color themes for Button 2022-11-13 00:30:18 +01:00
Haoyu Qiu
177d20aeef Remove leading spaces from enumerator name hints 2022-11-13 00:26:34 +01:00