Commit Graph

7173 Commits

Author SHA1 Message Date
lawnjelly efbb28d09a
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.

(cherry picked from commit 50c5ed4876)
2023-05-12 12:31:23 +02:00
Rindbee b91b8fce43
Improve the UX of ViewportTexture in the editor
The associated `ViewportTexture`s will update the `viewport_path`
in time when the `Viewport`'s nodepath is changed (caused by renaming
the node names or moving in the SceneTree dock).

If the target `Viewport` is changed by resetting the `viewport_path`,
the `ViewportTexture`s will be re-setup and emit `changed` signal in
time.

(cherry picked from commit af58f1e854)
2023-05-12 12:31:22 +02:00
kobewi 1146172b30
Prevent errors when using ViewportTexture
(cherry picked from commit 1b9802fa8c)
2023-05-12 12:31:22 +02:00
David Snopek 2a8501e1a2
Add missing documentation for MultiplayerPeerExtension
(cherry picked from commit 4d13be3c5e)
2023-05-12 12:31:22 +02:00
stmSi 25ab61f82a
Added note to used set_deferred while setting scroll values in _ready function.
(cherry picked from commit 83626ab90d)
2023-05-12 12:31:21 +02:00
Hugo Locurcio 35fa05fa51
Document caveats related to exported project binary resource conversion
(cherry picked from commit febc674f48)
2023-05-12 12:31:21 +02:00
Hugo Locurcio 2d7228251d
Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation
This brings the overall class reference completion percentage from 87% to 92%.

(cherry picked from commit 5056c427d3)
2023-05-12 12:31:19 +02:00
Ninni Pipping 9a5af8e793
Clarify that event handling does not affect `Input`
(cherry picked from commit 732ad382a6)
2023-05-12 12:14:45 +02:00
Michael Alexsander b7206e25bf
Improve some descriptions in the OS docs
(cherry picked from commit 6db12c5e50)
2023-05-12 12:11:23 +02:00
Aaron Franke f49c69a1e7
Fix small mistake in docs, "antecedents" -> "ancestors"
(cherry picked from commit 740b0713a2)
2023-05-12 12:07:02 +02:00
VolTer 78c190f4f5
Add an example for how to use AudioStreamGenerator
(cherry picked from commit 9d77caaf95)
2023-05-12 12:07:02 +02:00
VolTer e530168fb8
Document TextServerDummy
(cherry picked from commit c8e06fe838)
2023-05-12 12:07:02 +02:00
UltraBIF 4b63ce83d2
Fixed various typos across the docs
(cherry picked from commit 8106d33d0f)
2023-05-12 12:07:02 +02:00
Bastiaan Olij a5cb7a5eb5
Expose viewports render targer RID
(cherry picked from commit ab60d3b65c)
2023-05-12 12:07:01 +02:00
kobewi 0277f57b6f
Some clarifications on screen-space coordinates
(cherry picked from commit 33b9be27d3)
2023-05-12 12:07:01 +02:00
Pedro J. Estébanez 908325c29e
Fix unsupported sampler filter used for voxel GI
(cherry picked from commit 09aa1bbdb3)
2023-04-27 08:43:30 +02:00
Devin 1b74572377
Updated GDScript example to use clear_surfaces() and C Sharp example to use ClearSurfaces() instead of non-existent surface_remove() and SurfaceRemove()
(cherry picked from commit 3b615ed789)
2023-04-27 08:41:23 +02:00
VolTer 7f09c3d2fc Provide an example on how to use ImmediateMesh
(cherry picked from commit 4eabad6c26)
2023-04-26 14:51:01 +02:00
Winston b9e75e50dc Document automatic center mode using shape origins
(cherry picked from commit 7b30d7da51)
2023-04-26 14:51:01 +02:00
Ninni Pipping 08ec4a82bd Add information about how `Engine.time_scale` affects Timers
(cherry picked from commit 16a1465380)
2023-04-26 14:51:00 +02:00
VolTer 7b59361637 Document why Gradient.reverse() doesn't reverse constant gradients
(cherry picked from commit f21d13600e)
2023-04-26 14:50:59 +02:00
Hugo Locurcio f5721ca61a Document custom mouse cursors larger than 128×128 potentially having issues
(cherry picked from commit 92730fb07d)
2023-04-26 14:29:27 +02:00
Hugo Locurcio 39c0392a64 Document using AnimatableBody when needed in StaticBody description
(cherry picked from commit 68117d2fc7)
2023-04-26 14:14:05 +02:00
Haoyu Qiu 2eb29d0684 Fix various typos in the classref
(cherry picked from commit 766807506c)
2023-04-24 17:08:56 +02:00
Paweł 32dc3b66ab Remove double thes from documentation
(cherry picked from commit 4431cdd154)
2023-04-24 17:08:56 +02:00
David Giardi 75f3ce618e Fix blurry borders on antialiased FlatStyleBox
This is a fix of the antialiasing logic of FlatStyleBox.
It is now possible to have smooth rounded corners while keeping
the edges sharp on the pixels.

The antialiasing gradient positioning is ajusted so that the "hard"
border corresponds to the middle of that gradient instead of one end.
Checked against rendering of rounded rectangles in a vector graphics
software.

(cherry picked from commit 2ef20045b1)
2023-04-24 17:08:55 +02:00
Ninni Pipping 13f368067f Improve description of `Callable.bind/unbind`
(cherry picked from commit 0332fd5e8f)
2023-04-24 17:03:58 +02:00
VolTer 10d8a67267 Fix Quaternion's brief description
(cherry picked from commit 5c0e3b26a6)
2023-04-24 17:03:57 +02:00
Hugo Locurcio 83c3963235 Improve `print_rich()` documentation
- List all supported colors.
- Mention URL tag support limitations.
- Fix and tweak code example to do what it says.
- Remove outdated notice about lack of Windows support (but mention
  that only Windows 10 and later support ANSI code conversion).

(cherry picked from commit ec277d804e)
2023-04-24 17:03:57 +02:00
Evgeniy Vasilyev d46cb8e65c Fixed typo in DisplayServer.ScreenOrientation docs
(cherry picked from commit 5ba98e59f0)
2023-04-24 17:03:56 +02:00
Haoyu Qiu c6297f46fe Unify descriptions of vector methods
* is_equal_approx
* normalize
* length_squared
* posmod
* posmodv

(cherry picked from commit 6cd8e706fa)
2023-04-24 17:03:56 +02:00
Rattle22 12da78cf30 Fix Typo in NavigationServer2D
(cherry picked from commit 5c387cbdb3)
2023-04-24 17:03:55 +02:00
Tae Hong Ahn a27b427b1f update set_smooth_group description
fixes https://github.com/godotengine/godot/issues/74452

(cherry picked from commit 5a775ac08c)
2023-04-24 17:03:55 +02:00
Ninni Pipping 3fcaffc96b Fix `Image.compress` description
Description mentioned `mode` instead of `source`

(cherry picked from commit 6312fe2fae)
2023-04-24 16:52:25 +02:00
Ninni Pipping 3445fa7dbc Expose more compression formats in Image and fix compress check
Check for compressing ASTC checked if the function for BPTC was present

(cherry picked from commit cf64e2fa47)
2023-04-24 16:28:30 +02:00
bruvzg e071fb2263 [TextServer] Use dedicated flag for object replacement characters.
(cherry picked from commit d904516e55)
2023-04-24 16:28:28 +02:00
Mallardbro e801fe83d1 Correct the side mentioned with focus_neighbor_right and focus_neighbor_top.
A small typo with the definitions of `focus_neighbor_right` and `focus_neighbor_top`. Both use "bottom" rather than the correct side for each.

(cherry picked from commit c25d015d06)
2023-04-24 16:28:25 +02:00
mara a6e15e2f15 Change to_utf8 to to_utf8_buffer and to_ascii to to_ascii_buffer in remaining docs
The method `to_utf8` doesn't exist in Godot 4, but is still mentioned in
the documentation in some places. Replace it with the new name
`to_utf8_buffer`. Same for ascii. Same for C#.

(cherry picked from commit 57dca93718)
2023-04-24 14:16:36 +02:00
Ninni Pipping 9902d07966 Document how to make custom min/max for Array
(cherry picked from commit 96ab31a711)
2023-04-24 14:04:20 +02:00
Dimitri A ce7fd66896 docs/FileDialog: Use clickable references
This replaces two [code][/code] blocks with clickable refs to [enum Access] and [member file_mode] respectively.

(cherry picked from commit a5778da55b)
2023-04-24 14:04:20 +02:00
Hugo Locurcio 66a8ddf61c Fix CompressedTextureLayered description in the class reference
This also updates the list of compression modes available for textures.

(cherry picked from commit 0d24016db0)
2023-04-07 17:44:40 +02:00
smix8 cc6ce6977d Expose NavigationAgent path postprocessing and pathfinding algorithm options
Exposes the path postprocessing and pathfinding algorithm options of the NavigationAgent internal NavigationPathQueryParameters object.

(cherry picked from commit 6e324bb341)
2023-04-07 17:44:37 +02:00
kleonc a5572ba5a3 C# Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion
(cherry picked from commit f53d3382af)
2023-04-07 17:44:36 +02:00
kobewi ed1eb1e18f Update UndoRedo description
(cherry picked from commit 3a06e6af76)
2023-04-03 18:41:05 +02:00
kobewi 1c66b24325 Fill random docs
(cherry picked from commit eac65fd0a8)
2023-04-03 18:40:24 +02:00
kleonc 103d23539f Improve CanvasItem.self_modulate docs
(cherry picked from commit 4fb9aa2294)
2023-04-03 18:39:37 +02:00
skyace65 c114a7bab4 Remove reference to clipboard in OS class doc
(cherry picked from commit a65d99b541)
2023-04-03 18:38:27 +02:00
kobewi 87929d9ab0 Add _get_configuration_warnings() example
(cherry picked from commit c4e08a4e1a)
2023-04-03 18:37:09 +02:00
Chris Hutchinson 4323c8b78b Replaced operating system alert dialog with a warning log message,
toggled by a project setting.
Fixes #73141

(cherry picked from commit cb8e919243)
2023-03-30 19:28:57 +02:00
Ninni Pipping 1e94881484 Exposing more project settings for documentation
(cherry picked from commit bd30847e59)
2023-03-30 19:26:05 +02:00