Commit Graph

105 Commits

Author SHA1 Message Date
b217c41d36 Refactor interpolating functions in some classes to use Math class 2022-11-24 20:31:43 +09:00
315c64282b Fix misc formatting issues
Somehow I missed the failing CI report from trailing whitespace.

Fixed a couple typos found by codespell while at it, and misc
trailing semicolons in one of the files.
2022-11-14 19:00:48 +01:00
7658dc6e7e Add optional UV2 logic for lightmapping to primitive shapes 2022-11-13 19:28:10 +11:00
9eb8eb5f7d Merge pull request #67336 from jbcolli2/Normal-of-CylinderMesh
Fix bug in CylinderMesh when computing normals
2022-10-13 15:24:55 +02:00
491ec622f6 Changed normal of CylinderMesh to account for slanted side. 2022-10-13 08:24:31 -04:00
344ed9ec6c Remove leading spaces from enumerator name hints
For `PROPERTY_HINT_ENUM` properties, enumerator names can be provided as
a comma separated list. There're a few properties that add leading
spaces to the names (e.g. `First, Second, Third`).

These spaces are included in the Inspector dropdown, which is
unexpected.

It's better to leave the surrounding spaces untouched because it could
be part of the resulting string value (the variable is a string enum).
And most other enum hints don't contain surrounding whitespaces.

This PR removes the spaces and documents this `PROPERTY_HINT_ENUM`
behavior.
2022-10-08 11:33:50 +08:00
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
b6daad8d4b Rename range_lerp to remap 2022-09-06 07:19:20 +02:00
ae18928748 Rename Curve/Curve2D/Curve3D/Gradient interpolate() to sample()
"sampling" is a more accurate term than "interpolating" for what's
happening when using that function.
2022-08-30 22:08:38 +02:00
6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
354123a207 Merge pull request #64243 from bruvzg/multiline_textmesh 2022-08-26 11:45:25 +02:00
a0113a98e4 Merge pull request #64801 from clayjohn/plane-quad
Remove QuadMesh and add orientation parameter to PlaneMesh
2022-08-25 07:38:30 +02:00
861c5bff0e Remove QuadMesh and add orientation parameter to PlaneMesh 2022-08-24 18:51:18 -07:00
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
8384815365 Add line breaking support to the TextMesh. 2022-08-10 23:53:48 +03:00
21b9b117be Add TorusMesh 2022-08-04 13:45:54 -05:00
344ba0ffaf Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
329923c6ac Use custom key structs, instead of raw hashes for the Label3D and TextMesh, to avoid potential hash collisions. 2022-07-04 09:47:49 +03:00
ad7b3549a5 Fix CapsuleMesh loading issue (radius reset) 2022-06-22 17:34:49 +02:00
141c375581 Clean up Hash Functions
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934
* Clean up usage of murmur3
* Fixed usages of binary murmur3 on floats (this is invalid)
* Changed DJB2 to use xor (which seems to be better)
2022-06-20 12:54:19 +02:00
4678736a39 Add suffixes to all nodes and resources 2022-06-11 09:41:05 -05:00
cc21892fa4 Merge pull request #61355 from bruvzg/text_mesh_fix_fill_align
[TextMesh] Fix incorrectly applied FILL alignment.
2022-05-25 01:16:42 +02:00
ce7099a35a Tweak TextMesh decomposition error message to mention self-intersecting lines 2022-05-24 15:11:39 +02:00
826de9da48 [TextMesh] Fix incorrectly applied FILL alignment. 2022-05-24 11:58:54 +03:00
56dbfcdcba Merge pull request #61203 from Calinou/cylindermesh-add-cap-properties
Add properties to disable top/bottom cap generation in CylinderMesh
2022-05-24 08:21:01 +02:00
9923851370 Fix typos with codespell
Using codespell 2.2-dev from current git.
2022-05-23 21:32:19 +02:00
4e86c13557 [TextMesh] Do not generate meshes for non-visual glyphs. 2022-05-23 20:06:36 +03:00
1f066837e4 [TextMesh] Fix cubic cubic Bezier arc processing. 2022-05-22 18:04:32 +03:00
d23071cae3 Add properties to disable top/bottom cap generation in CylinderMesh 2022-05-21 02:06:53 +02:00
5dc3bfb80e Use suffixes for units in nodes and resources 2022-05-19 14:34:27 -05:00
05963674a7 Implement TextMesh resource.
Apply simulated slant and embolden to the TextServer `gont_get_glyph_contours` results.
2022-05-13 08:20:22 +03:00
f75afaa085 Merge pull request #58777 from Sauermann/fix-capsulemesh-tangent
Reverse tangents of capsule mesh
2022-05-03 08:18:48 +02:00
fcd26b8841 Fix navmesh baking
- improved mesh data calculation from standalone static colliders so that no
  VisualServer calls are performed - and thus no VS mutexes need to
  be locked in case of on-thread baking
- improved the same for GridMap's static colliders
2022-04-08 21:01:59 +02:00
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
c2e9b0c566 Reverse tangents of capsule mesh 2022-03-05 09:23:59 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
7d53755ca7 Fixes the normals of SphereMesh when the radius is different from 1 2021-09-28 00:09:39 +01:00
62f8b0eb91 QuadMesh remove format ARRAY_FORMAT_INDEX 2021-09-27 13:10:34 -04:00
f4ac08a182 Fixes the normals of SphereMesh when the sphere/hemisphere is oblong 2021-08-22 21:45:39 +01:00
f9176a39ce Make radius & height in CapsuleShape3D independent
Also changed CapsuleMesh to make settings consistent between render and
physics.
2021-08-11 14:54:53 -07:00
c4d8eecfe5 added offset for plane mesh and quad mesh 2021-07-11 14:33:08 +02:00
8f7e1b53ff Allow using ORMMaterial3D by using BaseMaterial3D as a resource hint
Previously, only StandardMaterial3D could be defined as an alternative
to ShaderMaterial.

This also reorders the CanvasItemMaterial property hints to follow
alphabetical order (which is enforced by the inspector).
2021-07-04 17:49:36 +02:00
b4ed84ba2b Allow a top and bottom radius equal to 0 in CylinderMesh
The CylinderMesh generation code handles this special case and
avoids generating the top and bottom faces if their radius is equal
to 0. This improves performance by reducing the number of vertices
to draw.

If both values are set to 0, nothing will be visible but the mesh
generation will still succeed.

This also improves the CylinderMesh class documentation.
2021-06-23 18:50:10 +02:00
de3f6699a5 Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
c8e402324e Fix normals of PrismMesh 2021-05-16 23:01:53 +02:00
fcf8071ec9 Fix documentation following implementation of particle trails 2021-05-01 13:12:31 +01:00
90056460ad Implement Particle Trails
-Enable the trails and set the length in seconds
-Provide a mesh with a skeleton and a skin
-Or, alternatively use one of the built-in TubeTrailMesh/RibbonTrailMesh
-Works deterministically
-Fixed particle collisions (were broken)
-Not working in 2D yet (that will happen next)
2021-04-30 17:38:02 -03:00
c2b7c69e2b Merge pull request #42827 from lyuma/rename_bones_blendshapes
Allow renaming bones and blendshapes.
2021-04-01 00:20:07 +02:00
1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
7961a1dea3 Initialize class variables with default values in scene/ [2/2] 2021-02-09 18:24:36 +01:00