mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Compare commits
483 Commits
release-bu
...
godot-4.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5222a99f5d | ||
|
|
acc82a1d05 | ||
|
|
138882742a | ||
|
|
5fe254e8f6 | ||
|
|
eced93a3f5 | ||
|
|
589306a9d8 | ||
|
|
238b8357a3 | ||
|
|
7d5d5b7bd1 | ||
|
|
9a88b47cb1 | ||
|
|
7f0d8bcade | ||
|
|
3e8f0b4b75 | ||
|
|
945d669da0 | ||
|
|
1f7a5f6144 | ||
|
|
c37259b181 | ||
|
|
912b3afb96 | ||
|
|
fd8f38c240 | ||
|
|
60e8a06d4e | ||
|
|
2a5d5ef1f9 | ||
|
|
2ac4e3bb30 | ||
|
|
fa8b32cbd4 | ||
|
|
9cd9a07c27 | ||
|
|
576ca44762 | ||
|
|
ab2c3712e2 | ||
|
|
fe126359f0 | ||
|
|
aa23e6fc5e | ||
|
|
4d7336e70f | ||
|
|
9deaac5c60 | ||
|
|
47b3f95874 | ||
|
|
f93a4287cf | ||
|
|
09c5a8fe49 | ||
|
|
7d0af7d10f | ||
|
|
f6ed43b7d3 | ||
|
|
52c314501c | ||
|
|
30b1c7fc1f | ||
|
|
a227de0898 | ||
|
|
dfba9ad739 | ||
|
|
161f389f93 | ||
|
|
9e11b78d1c | ||
|
|
ce0c61b6e3 | ||
|
|
efbb28d09a | ||
|
|
b91b8fce43 | ||
|
|
1146172b30 | ||
|
|
2a8501e1a2 | ||
|
|
07128ccb9d | ||
|
|
9d9b7511a0 | ||
|
|
bb785cfcc0 | ||
|
|
cf0bd389cc | ||
|
|
a37f79124f | ||
|
|
31a37495f3 | ||
|
|
3be6a1b38e | ||
|
|
a42f427465 | ||
|
|
25ab61f82a | ||
|
|
b2364048d2 | ||
|
|
35fa05fa51 | ||
|
|
dcca6485d0 | ||
|
|
2d7228251d | ||
|
|
9a5af8e793 | ||
|
|
28012c40fb | ||
|
|
bab96e71d2 | ||
|
|
07af84689f | ||
|
|
d07d4d90d0 | ||
|
|
4b11fc65f1 | ||
|
|
b7206e25bf | ||
|
|
5d93de88a8 | ||
|
|
813fc0940d | ||
|
|
64b15c8ec1 | ||
|
|
3a90fa677b | ||
|
|
f3b608d331 | ||
|
|
53df7c18e0 | ||
|
|
f49c69a1e7 | ||
|
|
78c190f4f5 | ||
|
|
e530168fb8 | ||
|
|
4b63ce83d2 | ||
|
|
0566ac68de | ||
|
|
0cb1fd3a61 | ||
|
|
d56c4f960c | ||
|
|
19b998396c | ||
|
|
a5cb7a5eb5 | ||
|
|
0277f57b6f | ||
|
|
907b10fb96 | ||
|
|
2435c9426d | ||
|
|
e68e2fad25 | ||
|
|
a07ad181ab | ||
|
|
70f7fcd208 | ||
|
|
b532dd7626 | ||
|
|
e58001bd0d | ||
|
|
9d257f10c0 | ||
|
|
2a0597d0cb | ||
|
|
ebaf3cc9ab | ||
|
|
268b60ddd6 | ||
|
|
0c312c7a08 | ||
|
|
c8d64e8580 | ||
|
|
fdf66b3472 | ||
|
|
2d74ee0e5b | ||
|
|
21bb5b9c0e | ||
|
|
aff0340486 | ||
|
|
908325c29e | ||
|
|
a5779ff281 | ||
|
|
37c89f78ac | ||
|
|
a0a95c7bc7 | ||
|
|
ee9a268fd7 | ||
|
|
1b74572377 | ||
|
|
ba004ea1c3 | ||
|
|
e7f4af0913 | ||
|
|
7f09c3d2fc | ||
|
|
56110a354c | ||
|
|
b9e75e50dc | ||
|
|
08ec4a82bd | ||
|
|
d327bb7a45 | ||
|
|
5120afc236 | ||
|
|
4b4556179e | ||
|
|
b711b45870 | ||
|
|
7b59361637 | ||
|
|
0132c29953 | ||
|
|
389045c691 | ||
|
|
4c8946c080 | ||
|
|
289d551fbb | ||
|
|
112677c39e | ||
|
|
75a33fd647 | ||
|
|
e03ee06d74 | ||
|
|
12969aadbd | ||
|
|
7f1b1e1c1b | ||
|
|
9336866de0 | ||
|
|
01014a7475 | ||
|
|
bceb910f3a | ||
|
|
eae3d61d7f | ||
|
|
82aab2b0ea | ||
|
|
c8ed59ba41 | ||
|
|
f5721ca61a | ||
|
|
c4655010d0 | ||
|
|
4d38529284 | ||
|
|
c893968b33 | ||
|
|
82a17d028d | ||
|
|
f241b17804 | ||
|
|
fcdd7eda26 | ||
|
|
878367b3ac | ||
|
|
a27dd86755 | ||
|
|
46e7f334fb | ||
|
|
cce2ffda1b | ||
|
|
f1505fe98b | ||
|
|
10547deb3d | ||
|
|
357e2ec05d | ||
|
|
769daf79e2 | ||
|
|
39c0392a64 | ||
|
|
6ac70ff5da | ||
|
|
d78691d44f | ||
|
|
b5bd99d9e6 | ||
|
|
e6478f5be3 | ||
|
|
2eb29d0684 | ||
|
|
32dc3b66ab | ||
|
|
75f3ce618e | ||
|
|
f39f354313 | ||
|
|
af0dd6591b | ||
|
|
13f368067f | ||
|
|
10d8a67267 | ||
|
|
83c3963235 | ||
|
|
13cfbe6a25 | ||
|
|
d936cc8b9e | ||
|
|
4a140b61f1 | ||
|
|
d46cb8e65c | ||
|
|
c6297f46fe | ||
|
|
12da78cf30 | ||
|
|
a27b427b1f | ||
|
|
9c1ea28092 | ||
|
|
3a1af9393f | ||
|
|
2c773e12b8 | ||
|
|
d31002cfbe | ||
|
|
3a5bc7455e | ||
|
|
3fcaffc96b | ||
|
|
ebcc7b4b98 | ||
|
|
756d809ef1 | ||
|
|
ad5d7c2030 | ||
|
|
1a85f6398f | ||
|
|
ad582cf0b1 | ||
|
|
410b503aac | ||
|
|
3445fa7dbc | ||
|
|
ccc761dd93 | ||
|
|
2992a99629 | ||
|
|
f3907e2fe0 | ||
|
|
27df8b93aa | ||
|
|
95f5027453 | ||
|
|
e071fb2263 | ||
|
|
d4c9ca3975 | ||
|
|
df80e2ae43 | ||
|
|
c1ec270b44 | ||
|
|
aeca8f07fa | ||
|
|
8a349e4fa9 | ||
|
|
25518aad27 | ||
|
|
9253f415b3 | ||
|
|
214ad50498 | ||
|
|
e801fe83d1 | ||
|
|
5bcff18c76 | ||
|
|
effefe9feb | ||
|
|
7e482f420d | ||
|
|
b5ff677381 | ||
|
|
e7f7de0044 | ||
|
|
a6e15e2f15 | ||
|
|
51fdbf6ac7 | ||
|
|
9902d07966 | ||
|
|
ce7fd66896 | ||
|
|
df5df11916 | ||
|
|
8c372f4109 | ||
|
|
d0c50d820b | ||
|
|
deb22e2381 | ||
|
|
4616de0c5d | ||
|
|
08b825396f | ||
|
|
a37eb88c5b | ||
|
|
90b4ca2e50 | ||
|
|
16a6bdd423 | ||
|
|
177be9bd37 | ||
|
|
967ad04928 | ||
|
|
66633d19a1 | ||
|
|
675547845e | ||
|
|
210879d284 | ||
|
|
66a8ddf61c | ||
|
|
c62f8f9319 | ||
|
|
ba5335f3fb | ||
|
|
7c62d1106e | ||
|
|
05fa6e314a | ||
|
|
233bd4abaa | ||
|
|
a99b046412 | ||
|
|
2805f7b36d | ||
|
|
589c32ec55 | ||
|
|
9598eb9638 | ||
|
|
ba9f2981f1 | ||
|
|
1f51ceddf3 | ||
|
|
eab0386934 | ||
|
|
585f4ed737 | ||
|
|
cacc6c5ed5 | ||
|
|
817da41d55 | ||
|
|
02d0f090c0 | ||
|
|
2b0acb61be | ||
|
|
88d446f6c6 | ||
|
|
87a9d2c87e | ||
|
|
03827485d7 | ||
|
|
99beeb3992 | ||
|
|
cc6ce6977d | ||
|
|
e656a53ed0 | ||
|
|
861399fbe5 | ||
|
|
1aa5fce321 | ||
|
|
7ef4e519f7 | ||
|
|
bcf991d3ec | ||
|
|
62dbd512cc | ||
|
|
4cc8a689ba | ||
|
|
f8517e1c4b | ||
|
|
2c80ded6ce | ||
|
|
a5572ba5a3 | ||
|
|
f645bbaffb | ||
|
|
b17f0f593e | ||
|
|
4762303f18 | ||
|
|
7a0977ce2c | ||
|
|
9099ac39cf | ||
|
|
bd016c8c4d | ||
|
|
0a8fdde924 | ||
|
|
d0e906327d | ||
|
|
ed1eb1e18f | ||
|
|
1c66b24325 | ||
|
|
103d23539f | ||
|
|
0c24ee363f | ||
|
|
c114a7bab4 | ||
|
|
1deda0f003 | ||
|
|
87929d9ab0 | ||
|
|
040b432a12 | ||
|
|
b912905d23 | ||
|
|
e243dfa9f6 | ||
|
|
50f26811b0 | ||
|
|
c9ee508089 | ||
|
|
b8b29c8566 | ||
|
|
4323c8b78b | ||
|
|
1e94881484 | ||
|
|
d6b36e800d | ||
|
|
ae0a98ef9b | ||
|
|
493e39860d | ||
|
|
fe71d33033 | ||
|
|
9f20659c62 | ||
|
|
1056996200 | ||
|
|
74a35c9ca2 | ||
|
|
b39cbe71b4 | ||
|
|
07beae98f0 | ||
|
|
47c4044d03 | ||
|
|
838a82f885 | ||
|
|
dc100cbebb | ||
|
|
5f9990e25d | ||
|
|
ff15e2384a | ||
|
|
bafc6372b2 | ||
|
|
19501f8eb1 | ||
|
|
843f5adbc5 | ||
|
|
6fedc728f6 | ||
|
|
4750b77d2d | ||
|
|
2ea8dd7232 | ||
|
|
5e9e95c34c | ||
|
|
50ea0951fe | ||
|
|
7de181f524 | ||
|
|
a08bee8d10 | ||
|
|
65c52087c2 | ||
|
|
b85cead4b9 | ||
|
|
38595b8470 | ||
|
|
adc7edd907 | ||
|
|
9573574788 | ||
|
|
58d8368481 | ||
|
|
2a52307936 | ||
|
|
9a4a0d042c | ||
|
|
7a827f979e | ||
|
|
b3f121d108 | ||
|
|
fa9f92112c | ||
|
|
9a3b52dc2d | ||
|
|
ce4ab71957 | ||
|
|
989d556f8e | ||
|
|
9ac978190e | ||
|
|
94e90b0593 | ||
|
|
9559bbcb18 | ||
|
|
30a9b5fe9b | ||
|
|
465be40e10 | ||
|
|
47c3f44c0a | ||
|
|
8575010e88 | ||
|
|
9278da6f9b | ||
|
|
b43f847808 | ||
|
|
ac1b26c7c5 | ||
|
|
f089782411 | ||
|
|
dd94380b11 | ||
|
|
22b5f0f608 | ||
|
|
e99b184b6c | ||
|
|
7fe9c48e2b | ||
|
|
fcedf5dfdf | ||
|
|
c0c5bdc510 | ||
|
|
516323f4ab | ||
|
|
597b83aedf | ||
|
|
4da5fc9203 | ||
|
|
636d7905b0 | ||
|
|
e1de9f9fc4 | ||
|
|
b54ff430aa | ||
|
|
6e85d4efea | ||
|
|
60ceecb1ab | ||
|
|
de08766656 | ||
|
|
d91a3985ae | ||
|
|
68e6234595 | ||
|
|
0dab32f317 | ||
|
|
865a0b4507 | ||
|
|
6782cd7291 | ||
|
|
bb5a6e29ab | ||
|
|
c4618bcc1b | ||
|
|
a397474bd0 | ||
|
|
2e37c05fe6 | ||
|
|
46d475b067 | ||
|
|
a94a2062af | ||
|
|
7a3f8a83da | ||
|
|
559d09c140 | ||
|
|
ff125a638a | ||
|
|
149f16b2fa | ||
|
|
bf8ab62ca3 | ||
|
|
6ed9e03449 | ||
|
|
db3fadc560 | ||
|
|
24c4b5e8ad | ||
|
|
3cae980c17 | ||
|
|
34a087cc2c | ||
|
|
74b5a0ca4f | ||
|
|
ca0ba83f03 | ||
|
|
5262fe21de | ||
|
|
d8f0c2bdca | ||
|
|
cacf49999e | ||
|
|
c5aa3bd7d7 | ||
|
|
ac8f97048e | ||
|
|
6970257cff | ||
|
|
c0e5879b41 | ||
|
|
8e8ecf52cf | ||
|
|
bea2da94da | ||
|
|
c6a704af2c | ||
|
|
ef06e5d786 | ||
|
|
ec5f503289 | ||
|
|
ab12edb6c6 | ||
|
|
5faebb712e | ||
|
|
1507bea80c | ||
|
|
1c7bd972e4 | ||
|
|
3bb89a0911 | ||
|
|
5acc7a77fe | ||
|
|
577afedc40 | ||
|
|
d23922ffeb | ||
|
|
fc7adaab7b | ||
|
|
38c0ad7c6c | ||
|
|
0cf5de8f19 | ||
|
|
3176016528 | ||
|
|
c59c68cdec | ||
|
|
5f6a534569 | ||
|
|
59a78ecf5a | ||
|
|
23f2c1234c | ||
|
|
5824967f2f | ||
|
|
7ac80569b3 | ||
|
|
38ad9c52b2 | ||
|
|
9e5e6568b7 | ||
|
|
26ab941507 | ||
|
|
10424abb29 | ||
|
|
006410ae46 | ||
|
|
e79477a4b5 | ||
|
|
0c1abbd79e | ||
|
|
5ae484c138 | ||
|
|
f9bb1d3174 | ||
|
|
b4a1bfd6d5 | ||
|
|
4ff705b37e | ||
|
|
47dc4bc307 | ||
|
|
08845dc3f0 | ||
|
|
d508d0a642 | ||
|
|
18bf2663f9 | ||
|
|
d229ca2f27 | ||
|
|
89a40d317d | ||
|
|
323c3f80c5 | ||
|
|
5a7624e50f | ||
|
|
7e74568709 | ||
|
|
278fc7538d | ||
|
|
258ea41ffa | ||
|
|
84e9a79ace | ||
|
|
a41a813af4 | ||
|
|
e3e117cac5 | ||
|
|
494449f212 | ||
|
|
069c48bfdc | ||
|
|
75e078d885 | ||
|
|
a755ac856a | ||
|
|
34c909b41e | ||
|
|
b1c8a40853 | ||
|
|
90dbf3bd38 | ||
|
|
4cce358241 | ||
|
|
ef3f1d426d | ||
|
|
bc6743c96d | ||
|
|
050ec70ea4 | ||
|
|
20eeb7c66d | ||
|
|
ad6fa1cd25 | ||
|
|
079c8ea719 | ||
|
|
782e1fe84e | ||
|
|
01324f025a | ||
|
|
c6f7675b1f | ||
|
|
c8f64c68a5 | ||
|
|
4e90cc55ec | ||
|
|
925381201b | ||
|
|
48a639f4a5 | ||
|
|
57dc060879 | ||
|
|
7e6bc72f7c | ||
|
|
13b37a50ae | ||
|
|
81f4996683 | ||
|
|
06e2c6ace2 | ||
|
|
9fff0fcbb5 | ||
|
|
f6709a1fda | ||
|
|
6041ad5c70 | ||
|
|
6cd227a35c | ||
|
|
1421838ba7 | ||
|
|
30e81fcc26 | ||
|
|
857cd853de | ||
|
|
1640b1a150 | ||
|
|
093d237138 | ||
|
|
764fe8ac51 | ||
|
|
d929784491 | ||
|
|
94db7f866b | ||
|
|
f4ea9df0f4 | ||
|
|
acdb1bdbd7 | ||
|
|
9e6f0ee9c7 | ||
|
|
3aa3fb8771 | ||
|
|
9997250051 | ||
|
|
e043484d36 | ||
|
|
a026669cc5 | ||
|
|
4bd16e6493 | ||
|
|
ed139593bf | ||
|
|
b880bde10f | ||
|
|
80cde341d4 | ||
|
|
8732a8af47 | ||
|
|
8dca093d97 | ||
|
|
5180116c07 | ||
|
|
0112862e70 | ||
|
|
234c601a61 | ||
|
|
3c2e952889 | ||
|
|
d83245f2f9 | ||
|
|
048c252602 | ||
|
|
7490f89238 | ||
|
|
41f4068a6e | ||
|
|
755a86f502 | ||
|
|
2d0d07f51b | ||
|
|
5662542526 | ||
|
|
1d21652f80 | ||
|
|
f55c61d601 | ||
|
|
466d226a4a | ||
|
|
e290448fe3 | ||
|
|
eb503fb461 | ||
|
|
671f8eb790 | ||
|
|
17a130cbd1 | ||
|
|
47114a77f8 | ||
|
|
284a1b6a6e |
2
.github/actions/godot-deps/action.yml
vendored
2
.github/actions/godot-deps/action.yml
vendored
@@ -23,5 +23,5 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons
|
||||
python -m pip install scons==4.4.0
|
||||
scons --version
|
||||
|
||||
7
.github/workflows/android_builds.yml
vendored
7
.github/workflows/android_builds.yml
vendored
@@ -1,10 +1,11 @@
|
||||
name: 🤖 Android Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: master
|
||||
# Used for the cache key. Add version suffix to force clean build.
|
||||
GODOT_BASE_BRANCH: '4.0'
|
||||
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
|
||||
|
||||
concurrency:
|
||||
|
||||
7
.github/workflows/ios_builds.yml
vendored
7
.github/workflows/ios_builds.yml
vendored
@@ -1,10 +1,11 @@
|
||||
name: 🍏 iOS Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: master
|
||||
# Used for the cache key. Add version suffix to force clean build.
|
||||
GODOT_BASE_BRANCH: '4.0'
|
||||
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
|
||||
|
||||
concurrency:
|
||||
|
||||
8
.github/workflows/linux_builds.yml
vendored
8
.github/workflows/linux_builds.yml
vendored
@@ -1,10 +1,11 @@
|
||||
name: 🐧 Linux Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: master
|
||||
# Used for the cache key, and godot-cpp checkout. Add version suffix to force clean build.
|
||||
GODOT_BASE_BRANCH: '4.0'
|
||||
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
@@ -181,6 +182,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: godotengine/godot-cpp
|
||||
ref: ${{ env.GODOT_BASE_BRANCH }}
|
||||
submodules: 'recursive'
|
||||
path: 'godot-cpp'
|
||||
|
||||
|
||||
7
.github/workflows/macos_builds.yml
vendored
7
.github/workflows/macos_builds.yml
vendored
@@ -1,10 +1,11 @@
|
||||
name: 🍎 macOS Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: master
|
||||
# Used for the cache key. Add version suffix to force clean build.
|
||||
GODOT_BASE_BRANCH: '4.0'
|
||||
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
|
||||
|
||||
concurrency:
|
||||
|
||||
41
.github/workflows/runner.yml
vendored
Normal file
41
.github/workflows/runner.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: 🔗 GHA
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-runner
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
static-checks:
|
||||
name: 📊 Static checks
|
||||
uses: ./.github/workflows/static_checks.yml
|
||||
|
||||
android-build:
|
||||
name: 🤖 Android
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/android_builds.yml
|
||||
|
||||
ios-build:
|
||||
name: 🍏 iOS
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/ios_builds.yml
|
||||
|
||||
linux-build:
|
||||
name: 🐧 Linux
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/linux_builds.yml
|
||||
|
||||
macos-build:
|
||||
name: 🍎 macOS
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/macos_builds.yml
|
||||
|
||||
windows-build:
|
||||
name: 🏁 Windows
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/windows_builds.yml
|
||||
|
||||
web-build:
|
||||
name: 🌐 Web
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/web_builds.yml
|
||||
85
.github/workflows/static_checks.yml
vendored
85
.github/workflows/static_checks.yml
vendored
@@ -1,5 +1,6 @@
|
||||
name: 📊 Static Checks
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
concurrency:
|
||||
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-static
|
||||
@@ -7,37 +8,62 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
static-checks:
|
||||
name: Static Checks (clang-format, black format, file format, documentation checks)
|
||||
runs-on: ubuntu-20.04
|
||||
name: Code style, file formatting, and docs
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install APT dependencies
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: dos2unix libxml2-utils moreutils
|
||||
|
||||
- name: Install Python dependencies and general setup
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
|
||||
sudo apt-get install -qq dos2unix clang-format-15 libxml2-utils python3-pip moreutils
|
||||
sudo update-alternatives --remove-all clang-format || true
|
||||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 100
|
||||
sudo pip3 install black==22.3.0 pygments pytest==7.1.2 mypy==0.971
|
||||
pip3 install black==22.3.0 pytest==7.1.2 mypy==0.971
|
||||
git config diff.wsErrorHighlight all
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only)
|
||||
elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
|
||||
files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
|
||||
fi
|
||||
echo "$files" >> changed.txt
|
||||
cat changed.txt
|
||||
files=$(echo "$files" | grep -v 'thirdparty' | xargs -I {} sh -c 'echo "./{}"' | tr '\n' ' ')
|
||||
echo "CHANGED_FILES=$files" >> $GITHUB_ENV
|
||||
|
||||
- name: File formatting checks (file_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/file_format.sh
|
||||
bash ./misc/scripts/file_format.sh changed.txt
|
||||
|
||||
- name: Header guards formatting checks (header_guards.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/header_guards.sh
|
||||
bash ./misc/scripts/header_guards.sh changed.txt
|
||||
|
||||
- name: Python style checks via black (black_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/black_format.sh
|
||||
if grep -qE '\.py$|SConstruct|SCsub' changed.txt || [ -z "$(cat changed.txt)" ]; then
|
||||
bash ./misc/scripts/black_format.sh
|
||||
else
|
||||
echo "Skipping Python formatting as no Python files were changed."
|
||||
fi
|
||||
|
||||
- name: Python scripts static analysis (mypy_check.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/mypy_check.sh
|
||||
if grep -qE '\.py$|SConstruct|SCsub' changed.txt || [ -z "$(cat changed.txt)" ]; then
|
||||
bash ./misc/scripts/mypy_check.sh
|
||||
else
|
||||
echo "Skipping Python static analysis as no Python files were changed."
|
||||
fi
|
||||
|
||||
- name: Python builders checks via pytest (pytest_builders.sh)
|
||||
run: |
|
||||
@@ -45,10 +71,14 @@ jobs:
|
||||
|
||||
- name: JavaScript style and documentation checks via ESLint and JSDoc
|
||||
run: |
|
||||
cd platform/web
|
||||
npm ci
|
||||
npm run lint
|
||||
npm run docs -- -d dry-run
|
||||
if grep -q "platform/web" changed.txt || [ -z "$(cat changed.txt)" ]; then
|
||||
cd platform/web
|
||||
npm ci
|
||||
npm run lint
|
||||
npm run docs -- -d dry-run
|
||||
else
|
||||
echo "Skipping JavaScript formatting as no Web/JS files were changed."
|
||||
fi
|
||||
|
||||
- name: Class reference schema checks
|
||||
run: |
|
||||
@@ -60,16 +90,21 @@ jobs:
|
||||
|
||||
- name: Style checks via clang-format (clang_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/clang_format.sh
|
||||
clang-format --version
|
||||
bash ./misc/scripts/clang_format.sh changed.txt
|
||||
|
||||
- name: Style checks via dotnet format (dotnet_format.sh)
|
||||
run: |
|
||||
bash ./misc/scripts/dotnet_format.sh
|
||||
if grep -q "modules/mono" changed.txt || [ -z "$(cat changed.txt)" ]; then
|
||||
bash ./misc/scripts/dotnet_format.sh
|
||||
else
|
||||
echo "Skipping dotnet format as no C# files were changed."
|
||||
fi
|
||||
|
||||
- name: Spell checks via codespell
|
||||
if: github.event_name == 'pull_request' && env.CHANGED_FILES != ''
|
||||
uses: codespell-project/actions-codespell@v1
|
||||
with:
|
||||
skip: ./.*,./**/.*,./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh,./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json
|
||||
check_hidden: false
|
||||
ignore_words_list: curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,nd,numer,ot,te
|
||||
only_warn: true
|
||||
skip: "./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh,./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json"
|
||||
ignore_words_list: "curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,nd,numer,ot,te,vai"
|
||||
path: ${{ env.CHANGED_FILES }}
|
||||
|
||||
9
.github/workflows/web_builds.yml
vendored
9
.github/workflows/web_builds.yml
vendored
@@ -1,10 +1,11 @@
|
||||
name: 🌐 Web Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
env:
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: master
|
||||
# Used for the cache key. Add version suffix to force clean build.
|
||||
GODOT_BASE_BRANCH: '4.0'
|
||||
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no
|
||||
EM_VERSION: 3.1.18
|
||||
EM_CACHE_FOLDER: "emsdk-cache"
|
||||
@@ -22,7 +23,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Emscripten latest
|
||||
uses: mymindstorm/setup-emsdk@v11
|
||||
uses: mymindstorm/setup-emsdk@v12
|
||||
with:
|
||||
version: ${{env.EM_VERSION}}
|
||||
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
||||
|
||||
9
.github/workflows/windows_builds.yml
vendored
9
.github/workflows/windows_builds.yml
vendored
@@ -1,11 +1,12 @@
|
||||
name: 🏁 Windows Builds
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
# Global Settings
|
||||
# SCONS_CACHE for windows must be set in the build environment
|
||||
env:
|
||||
# Only used for the cache key. Increment version to force clean build.
|
||||
GODOT_BASE_BRANCH: master
|
||||
# Used for the cache key. Add version suffix to force clean build.
|
||||
GODOT_BASE_BRANCH: '4.0'
|
||||
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
|
||||
SCONS_CACHE_MSVC_CONFIG: true
|
||||
|
||||
@@ -30,7 +31,7 @@ jobs:
|
||||
sconsflags: debug_symbols=no vsproj=yes
|
||||
bin: "./bin/godot.windows.editor.x86_64.exe"
|
||||
|
||||
- name: Template (target=template_release, tools=no)
|
||||
- name: Template (target=template_release)
|
||||
cache-name: windows-template
|
||||
target: template_release
|
||||
tests: false
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -63,6 +63,10 @@ tests/data/*.translation
|
||||
# Binutils tmp linker output of the form "stXXXXXX" where "X" is alphanumeric
|
||||
st[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9]
|
||||
|
||||
# Python development
|
||||
.venv
|
||||
venv
|
||||
|
||||
# Python generated
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
675
CHANGELOG.md
675
CHANGELOG.md
@@ -4,6 +4,672 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [4.0.3] - 2023-05-19
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-3) for details.
|
||||
|
||||
### Added
|
||||
|
||||
#### 2D
|
||||
|
||||
- Add info label to TileMap editor ([GH-68800](https://github.com/godotengine/godot/pull/68800)).
|
||||
|
||||
#### Documentation
|
||||
|
||||
- Create an "Editor-only" section in the online class reference ([GH-76410](https://github.com/godotengine/godot/pull/76410)).
|
||||
- Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation ([GH-76008](https://github.com/godotengine/godot/pull/76008)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Properly remember snapping options per-project ([GH-74682](https://github.com/godotengine/godot/pull/74682)).
|
||||
- Remember directory when installing templates file ([GH-74735](https://github.com/godotengine/godot/pull/74735)).
|
||||
- Improve editor state initialization ([GH-75563](https://github.com/godotengine/godot/pull/75563)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Allow entering named colors in ColorPicker's hex field ([GH-75905](https://github.com/godotengine/godot/pull/75905)).
|
||||
|
||||
#### Navigation
|
||||
|
||||
- Expose NavigationAgent path postprocessing and pathfinding algorithm options ([GH-75326](https://github.com/godotengine/godot/pull/75326)).
|
||||
|
||||
#### Physics
|
||||
|
||||
- Warn when a concave polygon is assigned to ConvexPolygonShape2D ([GH-56671](https://github.com/godotengine/godot/pull/56671)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Expose viewports render target RID ([GH-75517](https://github.com/godotengine/godot/pull/75517)).
|
||||
- Allow creation of rendering buffers at any time ([GH-75937](https://github.com/godotengine/godot/pull/75937)).
|
||||
|
||||
### Changed
|
||||
|
||||
#### 3D
|
||||
|
||||
- Use physical shortcuts for freelook navigation in the editor ([GH-73651](https://github.com/godotengine/godot/pull/73651)).
|
||||
|
||||
#### Buildsystem
|
||||
|
||||
- Err when trying to build the editor without its required modules ([GH-74980](https://github.com/godotengine/godot/pull/74980)).
|
||||
- Enable shadow warnings and fix raised errors ([GH-76946](https://github.com/godotengine/godot/pull/76946)).
|
||||
|
||||
#### C#/.NET
|
||||
|
||||
- Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion ([GH-75477](https://github.com/godotengine/godot/pull/75477)).
|
||||
|
||||
#### Core
|
||||
|
||||
- Lift restriction that resource load thread requester has to be the initiator ([GH-73862](https://github.com/godotengine/godot/pull/73862)).
|
||||
- Rename internal root canvas group to start with underscore ([GH-76149](https://github.com/godotengine/godot/pull/76149)).
|
||||
- Make acos and asin safe ([GH-76906](https://github.com/godotengine/godot/pull/76906)).
|
||||
|
||||
#### Documentation
|
||||
|
||||
- Exclude overridden properties from Property Descriptions section ([GH-77027](https://github.com/godotengine/godot/pull/77027)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Prevent off-screen controls in editor ([GH-73646](https://github.com/godotengine/godot/pull/73646)).
|
||||
- Re-enable script editor File menu shortcuts when the menu is hidden ([GH-74319](https://github.com/godotengine/godot/pull/74319)).
|
||||
- Prevent color conversion of the big Godot logo ([GH-75653](https://github.com/godotengine/godot/pull/75653)).
|
||||
- Set font sizes for various styles in editor output panel ([GH-75780](https://github.com/godotengine/godot/pull/75780)).
|
||||
- Adjust size of some dialogs ([GH-75895](https://github.com/godotengine/godot/pull/75895)).
|
||||
- Change cursor consistently when panning in the 2D Editor ([GH-75997](https://github.com/godotengine/godot/pull/75997)).
|
||||
- Validate renderer selection in project manager and expose default renderer setting as an enum ([GH-76331](https://github.com/godotengine/godot/pull/76331)).
|
||||
- Close built-in shaders when closing scene ([GH-75864](https://github.com/godotengine/godot/pull/75864)).
|
||||
- Command Palette search now also uses original English command names ([GH-76523](https://github.com/godotengine/godot/pull/76523)).
|
||||
- Preserve scene unique names when saving branch as scene ([GH-76609](https://github.com/godotengine/godot/pull/76609)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Ignore invisible children of GraphNode for minimum size ([GH-72240](https://github.com/godotengine/godot/pull/72240)).
|
||||
- Update `TextureProgressBar` upon texture changes ([GH-75532](https://github.com/godotengine/godot/pull/75532)).
|
||||
- Keep a copy of UTF-8 XML source string during the SVG font processing ([GH-75675](https://github.com/godotengine/godot/pull/75675)).
|
||||
- Always cache parent visibility in `CanvasItem` ([GH-75890](https://github.com/godotengine/godot/pull/75890)).
|
||||
- Improve BiDi error handling in TextServer ([GH-75922](https://github.com/godotengine/godot/pull/75922)).
|
||||
- Use dedicated flag for object replacement characters in TextServer ([GH-75974](https://github.com/godotengine/godot/pull/75974)).
|
||||
- Improve line BiDi handling, prevent crash on recursive log updates ([GH-75975](https://github.com/godotengine/godot/pull/75975)).
|
||||
- Don't apply scale to autohide theme property ([GH-75993](https://github.com/godotengine/godot/pull/75993)).
|
||||
|
||||
#### Import
|
||||
|
||||
- gltf: Remove obsolete hack to embed gltf textures in advanced import ([GH-75636](https://github.com/godotengine/godot/pull/75636)).
|
||||
- Expose more compression formats in Image and fix compress check ([GH-76014](https://github.com/godotengine/godot/pull/76014)).
|
||||
- Use DXT1 when compressing PNGs with RGB format ([GH-76516](https://github.com/godotengine/godot/pull/76516)).
|
||||
- gltf: Permit sparse accessors without a bufferView ([GH-76875](https://github.com/godotengine/godot/pull/76875)).
|
||||
|
||||
#### Networking
|
||||
|
||||
- Poll LSP/DAP clients for connection status updates ([GH-75850](https://github.com/godotengine/godot/pull/75850)).
|
||||
|
||||
#### Particles
|
||||
|
||||
- Translate inactive GPUParticles3D particles to -INF ([GH-75162](https://github.com/godotengine/godot/pull/75162)).
|
||||
- Use `angle_rand` to calculate `base_angle` in particles process material ([GH-75999](https://github.com/godotengine/godot/pull/75999)).
|
||||
- Don't store instance transform origin in RD 3D renderer unless requested ([GH-76003](https://github.com/godotengine/godot/pull/76003)).
|
||||
|
||||
#### Physics
|
||||
|
||||
- Modify `contact_max_allowed_penetration` precision to 3 significant digits ([GH-75665](https://github.com/godotengine/godot/pull/75665)).
|
||||
|
||||
#### Porting
|
||||
|
||||
- Android: Downgrade Android gradle plugin to version 7.2.1 ([GH-76325](https://github.com/godotengine/godot/pull/76325)).
|
||||
- Linux: Ensure WindowData minimized/maximized are mutually exclusive ([GH-76868](https://github.com/godotengine/godot/pull/76868)).
|
||||
- Linux: Don't use udev for joypad hotloading when running in a sandbox ([GH-76961](https://github.com/godotengine/godot/pull/76961)).
|
||||
- Windows: Support long path in file access ([GH-76739](https://github.com/godotengine/godot/pull/76739)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Recreate swap chain when suboptimal to avoid error spam ([GH-72859](https://github.com/godotengine/godot/pull/72859)).
|
||||
- Use `MODELVIEW_MATRIX` when on double precision ([GH-75462](https://github.com/godotengine/godot/pull/75462)).
|
||||
- Check for instancing without relying on `instance_count` when drawing 2D meshes ([GH-75954](https://github.com/godotengine/godot/pull/75954)).
|
||||
|
||||
#### Shaders
|
||||
|
||||
- Write out `render_mode` even when mode is set to default in VisualShaders ([GH-75957](https://github.com/godotengine/godot/pull/75957)).
|
||||
|
||||
#### Thirdparty
|
||||
|
||||
- astcenc updated to 4.4.0.
|
||||
- doctest updated to 2.4.11.
|
||||
- mbedtls updated to 2.28.3.
|
||||
- thorvg updated to 0.9.0.
|
||||
- CA root certificates updated to 2023-03-23 bundle from Mozilla.
|
||||
|
||||
### Fixed
|
||||
|
||||
#### 2D
|
||||
|
||||
- Fix RemoteTransform2D could fail to update AnimatableBody2D's position or rotation ([GH-75487](https://github.com/godotengine/godot/pull/75487)).
|
||||
- Fix rendering odd-sized tiles ([GH-74814](https://github.com/godotengine/godot/pull/74814)).
|
||||
- Fix TouchScreenButton not redrawn when texture changes ([GH-75016](https://github.com/godotengine/godot/pull/75016)).
|
||||
|
||||
#### 3D
|
||||
|
||||
- 3D: Fixes to CSG robustness ([GH-74771](https://github.com/godotengine/godot/pull/74771)).
|
||||
- 3D: Fix infinite loop in CSG `Build2DFaces::_find_edge_intersections` ([GH-76521](https://github.com/godotengine/godot/pull/76521)).
|
||||
- 3D: Fix `SurfaceTool::create_from_blend_shape()` ([GH-76669](https://github.com/godotengine/godot/pull/76669)).
|
||||
|
||||
#### Animation
|
||||
|
||||
- Fix `blend_shape` (shapekey) empty name import ([GH-75990](https://github.com/godotengine/godot/pull/75990)).
|
||||
|
||||
#### Audio
|
||||
|
||||
- Fix crash caused by invalid `mix_rate` assignment due to bogus project settings ([GH-69833](https://github.com/godotengine/godot/pull/69833)).
|
||||
- Fix AudioStreamPlayer2D crash when PhysicsServer2D runs on thread ([GH-75728](https://github.com/godotengine/godot/pull/75728)).
|
||||
|
||||
#### Buildsystem
|
||||
|
||||
- Fix the Python type error when creating the `.sln` file ([GH-75309](https://github.com/godotengine/godot/pull/75309)).
|
||||
- Fix forced optimization in `dev_build` ([GH-75909](https://github.com/godotengine/godot/pull/75909)).
|
||||
|
||||
#### Core
|
||||
|
||||
- Fix the UID field of the tscn/res file is lost when the external dependency is updated ([GH-70234](https://github.com/godotengine/godot/pull/70234)).
|
||||
- Fix invalid global position when read outside tree ([GH-75509](https://github.com/godotengine/godot/pull/75509)).
|
||||
- Fix moving position indicator out of bounds in FileAccessMemory ([GH-75641](https://github.com/godotengine/godot/pull/75641)).
|
||||
- Fix expected argument count in Callable call error text ([GH-76259](https://github.com/godotengine/godot/pull/76259)).
|
||||
- Fix lerp error message ([GH-76314](https://github.com/godotengine/godot/pull/76314)).
|
||||
- Make `LocalVector` respect its `tight` template parameter ([GH-64120](https://github.com/godotengine/godot/pull/64120)).
|
||||
- Prevent errors when using ViewportTexture ([GH-75751](https://github.com/godotengine/godot/pull/75751)).
|
||||
- Fix size error in `BitMap.opaque_to_polygons` ([GH-76536](https://github.com/godotengine/godot/pull/76536)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Fix off-by-one issue where "Go to Line" dialog shows the incorrect line number ([GH-75523](https://github.com/godotengine/godot/pull/75523)).
|
||||
- Fix UI responsiveness to touch taps ([GH-75703](https://github.com/godotengine/godot/pull/75703)).
|
||||
- Fix deserializing resource usage debug data ([GH-75782](https://github.com/godotengine/godot/pull/75782)).
|
||||
- Initialize editor values on first launch ([GH-75799](https://github.com/godotengine/godot/pull/75799)).
|
||||
- Fix connect signal dialog not allowing Unicode method name ([GH-75814](https://github.com/godotengine/godot/pull/75814)).
|
||||
- Fix method dialog label ([GH-75844](https://github.com/godotengine/godot/pull/75844)).
|
||||
- Fix editor spin slider remaining editable if set `read_only` while editing ([GH-76122](https://github.com/godotengine/godot/pull/76122)).
|
||||
- Fix layout list not resizing in editor layout dialog ([GH-76364](https://github.com/godotengine/godot/pull/76364)).
|
||||
- Fix `line_spacing` in code editor will not take effect immediately on change ([GH-76396](https://github.com/godotengine/godot/pull/76396)).
|
||||
- Fix inconsistent file dialog settings usage ([GH-76421](https://github.com/godotengine/godot/pull/76421)).
|
||||
- Fix Node arrays appear as Object arrays in the inspector ([GH-76530](https://github.com/godotengine/godot/pull/76530)).
|
||||
- Fix CollisionShape2D editor crashes ([GH-76546](https://github.com/godotengine/godot/pull/76546), [GH-76798](https://github.com/godotengine/godot/pull/76798)).
|
||||
- Fix 2D shader preview draws over uniform ([GH-76555](https://github.com/godotengine/godot/pull/76555)).
|
||||
- Fix crash when trying to create bones from Control ([GH-77160](https://github.com/godotengine/godot/pull/77160)).
|
||||
|
||||
#### Export
|
||||
|
||||
- Fix validation of codesigning certificate password on macOS ([GH-74326](https://github.com/godotengine/godot/pull/74326)).
|
||||
|
||||
#### GDExtension
|
||||
|
||||
- Add missing bindings and documentation for MultiplayerPeerExtension ([GH-75116](https://github.com/godotengine/godot/pull/75116)).
|
||||
|
||||
#### GDScript
|
||||
|
||||
- Add missing member type check when resolving `extends` ([GH-75879](https://github.com/godotengine/godot/pull/75879)).
|
||||
- Fix typo in LSP parse function parameters ([GH-76090](https://github.com/godotengine/godot/pull/76090)).
|
||||
- Fix inner method variable rename in LSP ([GH-76095](https://github.com/godotengine/godot/pull/76095)).
|
||||
- Fix multi-line string highlighting with single quotes ([GH-76170](https://github.com/godotengine/godot/pull/76170)).
|
||||
- Fix mixed tabs and spaces issues ([GH-76286](https://github.com/godotengine/godot/pull/76286)).
|
||||
- Fix wrong file name on function call error ([GH-76404](https://github.com/godotengine/godot/pull/76404)).
|
||||
- Don't fail when freed object is returned ([GH-76483](https://github.com/godotengine/godot/pull/76483)).
|
||||
- Don't send empty LSP completion command ([GH-76790](https://github.com/godotengine/godot/pull/76790)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Fix RichTextLabel wrong selection offset in padded table cell ([GH-71742](https://github.com/godotengine/godot/pull/71742)).
|
||||
- Fix commenting collapsed function issue ([GH-75070](https://github.com/godotengine/godot/pull/75070)).
|
||||
- Fix fill align and trim with enabled dropcap in `RichTextLabel` ([GH-75504](https://github.com/godotengine/godot/pull/75504)).
|
||||
- Fix descriptions not showing for theme properties ([GH-75559](https://github.com/godotengine/godot/pull/75559)).
|
||||
- Fix some theme values affect the editor by setting a default value for them ([GH-75566](https://github.com/godotengine/godot/pull/75566)).
|
||||
- Fix several GraphEdit operations at zoom levels other than 100% ([GH-75595](https://github.com/godotengine/godot/pull/75595)).
|
||||
- Fix offset calculation in Tree when there are hidden items ([GH-75977](https://github.com/godotengine/godot/pull/75977)).
|
||||
- Add missing LineEdit constants in editor theme ([GH-76123](https://github.com/godotengine/godot/pull/76123)).
|
||||
- Fix blurry borders on antialiased StyleBoxFlat ([GH-76132](https://github.com/godotengine/godot/pull/76132)).
|
||||
- Fix fractional ascent for image fonts with odd height ([GH-76136](https://github.com/godotengine/godot/pull/76136)).
|
||||
- Fix right click in selection of additional caret ([GH-76472](https://github.com/godotengine/godot/pull/76472)).
|
||||
|
||||
#### Import
|
||||
|
||||
- SVG: Fix `tvg::Picture->size()` and scale based errors ([GH-75034](https://github.com/godotengine/godot/pull/75034)).
|
||||
- Fix OBJ mesh importer smoothing handling ([GH-75315](https://github.com/godotengine/godot/pull/75315)).
|
||||
- Fix animation silhouette using incorrect index ([GH-76499](https://github.com/godotengine/godot/pull/76499)).
|
||||
|
||||
#### Input
|
||||
|
||||
- Fix guide button detection with XInput and Xbox Series controllers ([GH-73200](https://github.com/godotengine/godot/pull/73200)).
|
||||
- Fix the issue preventing dragging in the 2D editor ([GH-75113](https://github.com/godotengine/godot/pull/75113)).
|
||||
- Fix keycode/physical keycode mix up on web ([GH-75738](https://github.com/godotengine/godot/pull/75738)).
|
||||
- Fix potential null in android text entry system ([GH-75991](https://github.com/godotengine/godot/pull/75991)).
|
||||
|
||||
#### Navigation
|
||||
|
||||
- Fix NavigationObstacles not being added to avoidance simulation ([GH-75756](https://github.com/godotengine/godot/pull/75756)).
|
||||
- Fix NavigationMesh baking for HeightMapShape ([GH-76212](https://github.com/godotengine/godot/pull/76212)).
|
||||
|
||||
#### Networking
|
||||
|
||||
- Fix crashes trying to use TLS when not available ([GH-77011](https://github.com/godotengine/godot/pull/77011)).
|
||||
|
||||
#### Particles
|
||||
|
||||
- Properly calculate lifetime_split for particles ([GH-73313](https://github.com/godotengine/godot/pull/73313)).
|
||||
- Fix "error X3708: continue cannot be used in a switch" in HTML export ([GH-75795](https://github.com/godotengine/godot/pull/75795)).
|
||||
|
||||
#### Physics
|
||||
|
||||
- Fix typo bug in convex-convex separating axis test ([GH-75835](https://github.com/godotengine/godot/pull/75835)).
|
||||
|
||||
#### Porting
|
||||
|
||||
- Android: Fix issue with resizing the display when using the compatibility renderer ([GH-76464](https://github.com/godotengine/godot/pull/76464)).
|
||||
- Android: Allow concurrent buffering and dispatch of input events ([GH-76399](https://github.com/godotengine/godot/pull/76399)).
|
||||
- Android: Fix double tap & drag on Android ([GH-76791](https://github.com/godotengine/godot/pull/76791)).
|
||||
- iOS: Fix splash screen rotation ([GH-76037](https://github.com/godotengine/godot/pull/76037)).
|
||||
- iOS: Fix loading of GDExtension dylibs auto converted to framework ([GH-76510](https://github.com/godotengine/godot/pull/76510)).
|
||||
- Windows: Fix clipboard relying on focused window ([GH-73878](https://github.com/godotengine/godot/pull/73878)).
|
||||
- Windows: Fix queuing utterances in rapid succession ([GH-75880](https://github.com/godotengine/godot/pull/75880)).
|
||||
- Windows: Cleanup COM library initialization/uninitialization ([GH-75881](https://github.com/godotengine/godot/pull/75881)).
|
||||
- Windows: Fix StringFileInfo structure ([GH-76001](https://github.com/godotengine/godot/pull/76001)).
|
||||
- Windows: Add mono audio support to WASAPI ([GH-76541](https://github.com/godotengine/godot/pull/76541)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Fix interpolation of R0 for metallic and calculation of the Fresnel Shlick term in SSR ([GH-75368](https://github.com/godotengine/godot/pull/75368)).
|
||||
- Fix `get_test_texture()` returning an almost fully white texture ([GH-75632](https://github.com/godotengine/godot/pull/75632)).
|
||||
- Ensure that depth write state is updated before transparent pass in OpenGL3 renderer ([GH-75968](https://github.com/godotengine/godot/pull/75968)).
|
||||
- Fix editor lock on SDF collision bake on error ([GH-76257](https://github.com/godotengine/godot/pull/76257)).
|
||||
- Fix issues with Vulkan layout transitions ([GH-76315](https://github.com/godotengine/godot/pull/76315)).
|
||||
- Fix breakages of volumetric fog on voxel GI changes ([GH-76437](https://github.com/godotengine/godot/pull/76437)).
|
||||
- Fix GLES3 rendering on Android studio emulator ([GH-74945](https://github.com/godotengine/godot/pull/74945)).
|
||||
- Fix more voxel GI issues ([GH-76550](https://github.com/godotengine/godot/pull/76550)).
|
||||
- Use proper UV in cubemap downsampler raster (Fixes reflections in mobile renderer) ([GH-76692](https://github.com/godotengine/godot/pull/76692)).
|
||||
|
||||
#### Shaders
|
||||
|
||||
- Fix crashes caused due to missing type specifier on visual shader editor ([GH-75809](https://github.com/godotengine/godot/pull/75809)).
|
||||
- Fix Shader Preprocessor line numbering when disabled ([GH-76479](https://github.com/godotengine/godot/pull/76479)).
|
||||
- Fix rotation issue with `NODE_POSITION_VIEW` shader built-in ([GH-76109](https://github.com/godotengine/godot/pull/76109)).
|
||||
|
||||
#### XR
|
||||
|
||||
- Fix incorrect HTC action map entries ([GH-74930](https://github.com/godotengine/godot/pull/74930)).
|
||||
|
||||
|
||||
## [4.0.2] - 2023-04-04
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-2) for details.
|
||||
|
||||
### Added
|
||||
|
||||
#### Core
|
||||
|
||||
- Add a missing `ImageTextureLayered::_images` setter for the C# bindings ([GH-74668](https://github.com/godotengine/godot/pull/74668)).
|
||||
- Exposing more project settings for documentation ([GH-74727](https://github.com/godotengine/godot/pull/74727)).
|
||||
|
||||
#### Physics
|
||||
|
||||
- Expose the `apply_floor_snap` function to allow manual snap ([GH-73749](https://github.com/godotengine/godot/pull/73749)).
|
||||
|
||||
#### Porting
|
||||
|
||||
- Android: Use the new API for virtual keyboard height detection on Android, bugfix for old API ([GH-74398](https://github.com/godotengine/godot/pull/74398)).
|
||||
- Android: Configure maven central snapshot versions for the Godot Android library ([GH-74470](https://github.com/godotengine/godot/pull/74470)).
|
||||
- Android: Add "filesRoot" path to Android provider paths xml ([GH-74673](https://github.com/godotengine/godot/pull/74673)).
|
||||
- macOS: Re-add support for the `_sc_` inside app bundle ([GH-73429](https://github.com/godotengine/godot/pull/73429)).
|
||||
|
||||
#### Project converter
|
||||
|
||||
- Add conversion for `Vector2` `tangent()` -> `orthogonal()` ([GH-74515](https://github.com/godotengine/godot/pull/74515)).
|
||||
- Add navigation renames to the converter ([GH-75513](https://github.com/godotengine/godot/pull/75513)).
|
||||
|
||||
#### Shaders
|
||||
|
||||
- Add drag and drop support for shader include files in shader editor ([GH-74869](https://github.com/godotengine/godot/pull/74869)).
|
||||
|
||||
#### XR
|
||||
|
||||
- Add `XRServer.world_origin` property ([GH-74151](https://github.com/godotengine/godot/pull/74151)).
|
||||
- Enable access to the Valve Index grip force sensors ([GH-74787](https://github.com/godotengine/godot/pull/74787)).
|
||||
|
||||
### Changed
|
||||
|
||||
#### 2D
|
||||
|
||||
- Use 8×8 default grid size for TextureRegion and 2D polygon editors ([GH-73685](https://github.com/godotengine/godot/pull/73685)).
|
||||
- Don't allow selecting nodes without owner in the editor ([GH-75492](https://github.com/godotengine/godot/pull/75492)).
|
||||
|
||||
#### Animation
|
||||
|
||||
- Update property keying state without a full Inspector rebuild ([GH-74564](https://github.com/godotengine/godot/pull/74564)).
|
||||
|
||||
#### Buildsystem
|
||||
|
||||
- Exit with non-zero status if there are issues with FreeType dependencies ([GH-74645](https://github.com/godotengine/godot/pull/74645)).
|
||||
- SCons: Cleanup `pulseaudio` defines for Linux ([GH-74666](https://github.com/godotengine/godot/pull/74666)).
|
||||
|
||||
#### C#/.NET
|
||||
|
||||
- Encode `GodotProjectDir` as Base64 to prevent issues with special characters ([GH-74312](https://github.com/godotengine/godot/pull/74312)).
|
||||
- Do not print errors about missing references to intentionally ignored members ([GH-75284](https://github.com/godotengine/godot/pull/75284)).
|
||||
|
||||
#### Core
|
||||
|
||||
- Make `Gradient` resort points on `reverse` ([GH-75235](https://github.com/godotengine/godot/pull/75235)).
|
||||
- Port robust signal (dis)connection to `ShapeCast2D` ([GH-75266](https://github.com/godotengine/godot/pull/75266)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Improve POT Generation dialog ([GH-74213](https://github.com/godotengine/godot/pull/74213)).
|
||||
- Hide internal settings from the class reference ([GH-74226](https://github.com/godotengine/godot/pull/74226)).
|
||||
- Remove disabled plugins from active plugins ([GH-75331](https://github.com/godotengine/godot/pull/75331)).
|
||||
- More i18n improvements ([GH-75385](https://github.com/godotengine/godot/pull/75385)).
|
||||
|
||||
#### Export
|
||||
|
||||
- Delete unused compression formats from `.import` files when exporting ([GH-74684](https://github.com/godotengine/godot/pull/74684)).
|
||||
|
||||
#### GDScript
|
||||
|
||||
- Make GDScript number highlighting stricter ([GH-74184](https://github.com/godotengine/godot/pull/74184)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Improve layout direction/locale automatic selection ([GH-73716](https://github.com/godotengine/godot/pull/73716)).
|
||||
- Add mutex for FreeType face creation/deletion operations in TextServer ([GH-73987](https://github.com/godotengine/godot/pull/73987)).
|
||||
|
||||
#### Input
|
||||
|
||||
- Remove `meta_mem` update on keyup/keydown on Windows ([GH-75172](https://github.com/godotengine/godot/pull/75172)).
|
||||
|
||||
#### Physics
|
||||
|
||||
- Revert attempted fix of trimesh CCD ([GH-74861](https://github.com/godotengine/godot/pull/74861)).
|
||||
|
||||
#### Porting
|
||||
|
||||
- Android: Bump the target SDK version to 33 (Android 13) ([GH-75203](https://github.com/godotengine/godot/pull/75203)).
|
||||
|
||||
#### Project converter
|
||||
|
||||
- Remove Tween properties/signals from renames ([GH-75443](https://github.com/godotengine/godot/pull/75443)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Incorporating the availability of screen and depth textures for the GLES3 backend ([GH-72361](https://github.com/godotengine/godot/pull/72361)).
|
||||
|
||||
#### Thirdparty
|
||||
|
||||
- mymindstorm/setup-emsdk updated to 12.
|
||||
|
||||
#### XR
|
||||
|
||||
- Replace OpenXR operating system alert dialog with a warning log message ([GH-73144](https://github.com/godotengine/godot/pull/73144)).
|
||||
- Check hardware sRGB conversion when an sRGB target is used ([GH-74892](https://github.com/godotengine/godot/pull/74892)).
|
||||
|
||||
### Fixed
|
||||
|
||||
#### 2D
|
||||
|
||||
- Fix preview rendering and transform calculations in the tiles editor ([GH-74982](https://github.com/godotengine/godot/pull/74982)).
|
||||
- Fix `ENTER_CANVAS` / `VISIBILITY_CHANGED` notification order when `CanvasItem` enters tree ([GH-75238](https://github.com/godotengine/godot/pull/75238)).
|
||||
- Fix a crash in the tiles editor when merging atlases ([GH-75361](https://github.com/godotengine/godot/pull/75361)).
|
||||
|
||||
#### 3D
|
||||
|
||||
- Fix GridMap signal `cell_size_changed` disconnect error ([GH-74890](https://github.com/godotengine/godot/pull/74890)).
|
||||
|
||||
#### Animation
|
||||
|
||||
- Fix `AnimatedSprite2D` autoplay warning ([GH-75258](https://github.com/godotengine/godot/pull/75258)).
|
||||
|
||||
#### Buildsystem
|
||||
|
||||
- Fix xml namespace in org.godotengine.Godot.xml ([GH-74920](https://github.com/godotengine/godot/pull/74920)).
|
||||
|
||||
#### C#/.NET
|
||||
|
||||
- Fix building projects for MSBuild before 17.3 ([GH-74479](https://github.com/godotengine/godot/pull/74479)).
|
||||
- Fix `Array.AddRange` index out of bounds ([GH-75357](https://github.com/godotengine/godot/pull/75357)).
|
||||
|
||||
#### Core
|
||||
|
||||
- Fix some race conditions that happen during initialization ([GH-73793](https://github.com/godotengine/godot/pull/73793)).
|
||||
- Fix crash in resource load ([GH-74166](https://github.com/godotengine/godot/pull/74166)).
|
||||
- Fix `randfn` to prevent it from generating nan values ([GH-74248](https://github.com/godotengine/godot/pull/74248)).
|
||||
- Fix Variant hashing for floats ([GH-74600](https://github.com/godotengine/godot/pull/74600)).
|
||||
- Fix type check for `max`/`min` ([GH-74770](https://github.com/godotengine/godot/pull/74770)).
|
||||
- Fix `Array.slice()` rounding when step is other than 1 ([GH-74909](https://github.com/godotengine/godot/pull/74909)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Fix cancelling selection while gizmo editing making uncommitted changes ([GH-71156](https://github.com/godotengine/godot/pull/71156)).
|
||||
- Fix `EditorUndoRedoManager`'s handling of `MERGE_ENDS` ([GH-74460](https://github.com/godotengine/godot/pull/74460)).
|
||||
- Fix built-in scripts missing their methods on signal connection ([GH-74495](https://github.com/godotengine/godot/pull/74495)).
|
||||
- Fix "Download Project Source" for the Web Editor ([GH-75194](https://github.com/godotengine/godot/pull/75194)).
|
||||
- Fix incorrect sizes of some editor elements ([GH-75379](https://github.com/godotengine/godot/pull/75379), [GH-75381](https://github.com/godotengine/godot/pull/75381)).
|
||||
|
||||
#### Export
|
||||
|
||||
- Fix GDExtensions library export when multiple architectures are set ([GH-74057](https://github.com/godotengine/godot/pull/74057)).
|
||||
|
||||
#### GDScript
|
||||
|
||||
- Fix "Find in Files" search results not opening built-in script ([GH-74401](https://github.com/godotengine/godot/pull/74401)).
|
||||
- Fix false positive `REDUNDANT_AWAIT` warning ([GH-74949](https://github.com/godotengine/godot/pull/74949)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Fix scrolling behavior with zero/low page value ([GH-67910](https://github.com/godotengine/godot/pull/67910)).
|
||||
- Fix some ways to create inconsistent Viewport size states ([GH-73188](https://github.com/godotengine/godot/pull/73188)).
|
||||
- Fix `GraphNode` resizing when its bottom border is too thin ([GH-73800](https://github.com/godotengine/godot/pull/73800)).
|
||||
- Fix IME position in the single window mode sub-windows ([GH-74472](https://github.com/godotengine/godot/pull/74472)).
|
||||
- Fix gutter set width results in receiving only half of the desired size ([GH-74537](https://github.com/godotengine/godot/pull/74537)).
|
||||
- Fix `get_drag_data` not overridable in some Controls ([GH-75122](https://github.com/godotengine/godot/pull/75122)).
|
||||
- Fix block caret size at the end of the line ([GH-75597](https://github.com/godotengine/godot/pull/75597)).
|
||||
|
||||
#### Import
|
||||
|
||||
- Fix `ResourceImporterLayeredTexture::import()` `high_quality` variable type ([GH-75244](https://github.com/godotengine/godot/pull/75244)).
|
||||
|
||||
#### Input
|
||||
|
||||
- Fix layout bug in `keyboard_get_keycode_from_physical` on Linux/X11 ([GH-75461](https://github.com/godotengine/godot/pull/75461)).
|
||||
|
||||
#### Navigation
|
||||
|
||||
- Fix GridMap free navigation RID error spam ([GH-74889](https://github.com/godotengine/godot/pull/74889)).
|
||||
- Fix agents with disabled avoidance getting added to avoidance simulation ([GH-74893](https://github.com/godotengine/godot/pull/74893)).
|
||||
|
||||
#### Networking
|
||||
|
||||
- Fix list handling in `SceneReplicationConfig` ([GH-74552](https://github.com/godotengine/godot/pull/74552)).
|
||||
|
||||
#### Physics
|
||||
|
||||
- Fix `collide_shape` return type ([GH-75260](https://github.com/godotengine/godot/pull/75260)).
|
||||
- Fix property hint for platform layers on 3D physics body ([GH-75544](https://github.com/godotengine/godot/pull/75544)).
|
||||
|
||||
#### Porting
|
||||
|
||||
- Android: Fix directory access when the running app has the `All files access` permission ([GH-75146](https://github.com/godotengine/godot/pull/75146)).
|
||||
- macOS: Fix infinite loop caused by global menu callbacks which trigger EditorProgress dialog ([GH-75254](https://github.com/godotengine/godot/pull/75254)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Fix spotlight shadows in volumetric fog ([GH-73919](https://github.com/godotengine/godot/pull/73919)).
|
||||
- Fix issues with point size not functioning correctly in GLES3 ([GH-73966](https://github.com/godotengine/godot/pull/73966)).
|
||||
- Update GPUParticles2D/3D speed scale on `ENTER_TREE` ([GH-75398](https://github.com/godotengine/godot/pull/75398)).
|
||||
|
||||
#### Shaders
|
||||
|
||||
- Fix ndc calculation for LinearSceneDepth VS node in GLES3 ([GH-74910](https://github.com/godotengine/godot/pull/74910)).
|
||||
|
||||
#### XR
|
||||
|
||||
- Fix typo in OpenXR pose orientation check ([GH-74928](https://github.com/godotengine/godot/pull/74928)).
|
||||
|
||||
|
||||
## [4.0.1] - 2023-03-20
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-1) for details.
|
||||
|
||||
### Added
|
||||
|
||||
#### Import
|
||||
|
||||
- Set the unlit / unshaded extension when importing / exporting glTF ([GH-74287](https://github.com/godotengine/godot/pull/74287)).
|
||||
|
||||
#### Project converter
|
||||
|
||||
- Add keycode project conversion ([GH-74237](https://github.com/godotengine/godot/pull/74237)).
|
||||
- Add conversion for common Theme Overrides ([GH-74624](https://github.com/godotengine/godot/pull/74624)).
|
||||
- Move tool declarations to top ([GH-74432](https://github.com/godotengine/godot/pull/74432)).
|
||||
|
||||
#### Tilemaps
|
||||
|
||||
- Remember previously selected TileMap tile ([GH-74039](https://github.com/godotengine/godot/pull/74039)).
|
||||
|
||||
### Changed
|
||||
|
||||
#### Animation
|
||||
|
||||
- Check for type mismatch in `PropertyTweener.from()` ([GH-74112](https://github.com/godotengine/godot/pull/74112)).
|
||||
|
||||
#### Buildsystem
|
||||
|
||||
- Safeguard Makefile commands for documentation ([GH-74042](https://github.com/godotengine/godot/pull/74042)).
|
||||
|
||||
#### C#/.NET
|
||||
|
||||
- Always show "Create C# solution" option ([GH-73904](https://github.com/godotengine/godot/pull/73904)).
|
||||
|
||||
#### Core
|
||||
|
||||
- Propagate errors when creating an OpenGL context fails in X11 ([GH-74563](https://github.com/godotengine/godot/pull/74563)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Automatically reparent editor message dialogs to avoid error spam ([GH-73365](https://github.com/godotengine/godot/pull/73365)).
|
||||
- Translate strings which were previously missed ([GH-74211](https://github.com/godotengine/godot/pull/74211), [GH-74637](https://github.com/godotengine/godot/pull/74637)).
|
||||
- Disallow creating a project in the Home or Documents folder ([GH-74964](https://github.com/godotengine/godot/pull/74964)).
|
||||
|
||||
#### GDScript
|
||||
|
||||
- Don't autocomplete numbers ([GH-74466](https://github.com/godotengine/godot/pull/74466)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Assume outline size is 1 if it's not set, but channel for outline is defined in a BitMap font ([GH-74212](https://github.com/godotengine/godot/pull/74212)).
|
||||
- Do not draw virtual spaces (word break / justification points) ([GH-74488](https://github.com/godotengine/godot/pull/74488)).
|
||||
- Generate empty textures for theme icons if the SVG module is disabled ([GH-74551](https://github.com/godotengine/godot/pull/74551)).
|
||||
- Add invalid font scaling check, restrict Linux/BSD system fonts lookup to TrueType/CFF only ([GH-74702](https://github.com/godotengine/godot/pull/74702)).
|
||||
|
||||
#### Input
|
||||
|
||||
- Update modifier key status during IME input on Windows ([GH-74474](https://github.com/godotengine/godot/pull/74474)).
|
||||
|
||||
#### Navigation
|
||||
|
||||
- Allow negative NavigationAgent2D path debug line_width for thin lines ([GH-74800](https://github.com/godotengine/godot/pull/74800)).
|
||||
|
||||
#### Project converter
|
||||
|
||||
- Do not convert lines that start with a comment ([GH-74193](https://github.com/godotengine/godot/pull/74193)).
|
||||
- Don't strip whitespace when converting ([GH-74232](https://github.com/godotengine/godot/pull/74232)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Use MSAA 2D texture in multipass tonemapper ([GH-74150](https://github.com/godotengine/godot/pull/74150)).
|
||||
- Use linear filtering without mipmaps for ProceduralSkyMaterial and PhysicalSkyMaterial ([GH-74740](https://github.com/godotengine/godot/pull/74740)).
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Audio
|
||||
|
||||
- Improve logic related to editing audio buses and prevent crashes ([GH-74560](https://github.com/godotengine/godot/pull/74560)).
|
||||
|
||||
#### C#/.NET
|
||||
|
||||
- Fix crash when errors occur before language initialization ([GH-74127](https://github.com/godotengine/godot/pull/74127)).
|
||||
- Get singleton instances using the Core name ([GH-74280](https://github.com/godotengine/godot/pull/74280)).
|
||||
- Ensure that script names (and therefore class names) are valid identifiers ([GH-74330](https://github.com/godotengine/godot/pull/74330)).
|
||||
- Ignore explicit interface implementations ([GH-74375](https://github.com/godotengine/godot/pull/74375)).
|
||||
|
||||
#### Core
|
||||
|
||||
- Set properties of ImageTexture3D when creating ([GH-74521](https://github.com/godotengine/godot/pull/74521)).
|
||||
- Fix buffer overrun in CPUParticles3D in `precision=double` builds ([GH-74555](https://github.com/godotengine/godot/pull/74555)).
|
||||
- Prevent crashing on startup if project has scripted theme types ([GH-74565](https://github.com/godotengine/godot/pull/74565)).
|
||||
|
||||
#### Editor
|
||||
|
||||
- Disable local space for Blender-style transforms ([GH-59443](https://github.com/godotengine/godot/pull/59443), [GH-74601](https://github.com/godotengine/godot/pull/74601)).
|
||||
- Stop toaster notification circle flickering ([GH-74017](https://github.com/godotengine/godot/pull/74017)).
|
||||
- Fix dock name lost translation after layout change ([GH-74158](https://github.com/godotengine/godot/pull/74158)).
|
||||
- Fix crash when showing file in FileSystem dock ([GH-74591](https://github.com/godotengine/godot/pull/74591)).
|
||||
- Prevent cache corruption when saving resources in the editor ([GH-74615](https://github.com/godotengine/godot/pull/74615)).
|
||||
- Ensure that editor color map is initialized in the project manager ([GH-74750](https://github.com/godotengine/godot/pull/74750)).
|
||||
- Fix MultiNodeEdit not cleared after deleting nodes ([GH-74795](https://github.com/godotengine/godot/pull/74795)).
|
||||
- Fix error when opening Inspector's dots menu ([GH-74974](https://github.com/godotengine/godot/pull/74974)).
|
||||
|
||||
#### Export
|
||||
|
||||
- Fix various issues related to remote deploy and remote execute on Windows ([GH-74030](https://github.com/godotengine/godot/pull/74030)).
|
||||
|
||||
#### GDExtension
|
||||
|
||||
- Fix crash when dumping extension API in a non-writable directory ([GH-74590](https://github.com/godotengine/godot/pull/74590)).
|
||||
- Fix extension bindings for motion collision/result structs ([GH-74671](https://github.com/godotengine/godot/pull/74671)).
|
||||
|
||||
#### GDScript
|
||||
|
||||
- Fix error spam when naming a func at the end of the script ([GH-73410](https://github.com/godotengine/godot/pull/73410)).
|
||||
- Fix checking if a call is awaited in compiler ([GH-74147](https://github.com/godotengine/godot/pull/74147)).
|
||||
- Fix autocomplete inside a block with a type test condition ([GH-74689](https://github.com/godotengine/godot/pull/74689)).
|
||||
|
||||
#### GUI
|
||||
|
||||
- Fix RichTextLabel crash with out of bound exception ([GH-68325](https://github.com/godotengine/godot/pull/68325)).
|
||||
- Fix justification on punctuation characters ([GH-74477](https://github.com/godotengine/godot/pull/74477)).
|
||||
- Add missing handler for removing font sizes in the theme editor ([GH-74547](https://github.com/godotengine/godot/pull/74547)).
|
||||
|
||||
#### Import
|
||||
|
||||
- Fix glTF mesh importer not freeing nodes correctly on import ([GH-74018](https://github.com/godotengine/godot/pull/74018)).
|
||||
- Prevent infinite loop by disabling importer when canceling FBX2glTF setup ([GH-74293](https://github.com/godotengine/godot/pull/74293)).
|
||||
- Fix blend-file import when using custom color management in blender ([GH-74496](https://github.com/godotengine/godot/pull/74496)).
|
||||
|
||||
#### Input
|
||||
|
||||
- Fix InputEventConfigurationDialog modifies original event ([GH-74858](https://github.com/godotengine/godot/pull/74858)).
|
||||
|
||||
#### Navigation
|
||||
|
||||
- Fix NavigationAgent3D debug path duplicated points ([GH-74976](https://github.com/godotengine/godot/pull/74976)).
|
||||
|
||||
#### Porting
|
||||
|
||||
- Android: Fix null-pointer dereference when using `gl_compatibility` renderer ([GH-74781](https://github.com/godotengine/godot/pull/74781)).
|
||||
- Linux/X11: Check if required xkb functions exist before using it ([GH-74222](https://github.com/godotengine/godot/pull/74222)).
|
||||
- Linux/X11: Fix broken shortcut key input ([GH-74535](https://github.com/godotengine/godot/pull/74535)).
|
||||
|
||||
#### Project converter
|
||||
|
||||
- Correct superclass constructors ([GH-74354](https://github.com/godotengine/godot/pull/74354)).
|
||||
- Add parentheses around arguments when converting `xform` ([GH-74693](https://github.com/godotengine/godot/pull/74693)).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- Add proper default texture filter and repeat modes for Canvas shaders in the OpenGL3 renderer ([GH-74315](https://github.com/godotengine/godot/pull/74315)).
|
||||
- Fix instance uniforms breaking when setting a new mesh ([GH-74349](https://github.com/godotengine/godot/pull/74349)).
|
||||
- Fix AABB calculation for meshes using Skeleton2D ([GH-74416](https://github.com/godotengine/godot/pull/74416)).
|
||||
- Avoid overflow when calculating ptr address for 3D textures in RenderingDevice texture update ([GH-74526](https://github.com/godotengine/godot/pull/74526)).
|
||||
- Fixes a canvas item set to clip children being drawn as black if no children are visible ([GH-74533](https://github.com/godotengine/godot/pull/74533)).
|
||||
- Avoid copying CanvasTexture when updating proxy ([GH-74566](https://github.com/godotengine/godot/pull/74566)).
|
||||
|
||||
#### Tilemaps
|
||||
|
||||
- Fix TileSetEditor painting `texture_origin` Vector2i ([GH-73514](https://github.com/godotengine/godot/pull/73514)).
|
||||
|
||||
|
||||
## [4.0] - 2023-03-01
|
||||
|
||||
The Godot 4.0 release was our biggest released to date, spanning 4 years of
|
||||
@@ -791,7 +1457,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-4-is-rele
|
||||
|
||||
#### Thirdparty
|
||||
|
||||
- Bullet uppdated to version 3.17.
|
||||
- Bullet updated to version 3.17.
|
||||
- Embree updated to version 3.13.0.
|
||||
- MbedTLS updated to version 2.16.11 (security update).
|
||||
- NanoSVG updated to 2021-09-03 git snapshot (security update).
|
||||
@@ -932,7 +1598,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-4-is-rele
|
||||
- Fix and clean disabled shapes handling in Godot physics servers ([GH-49845](https://github.com/godotengine/godot/pull/49845)).
|
||||
- Fix `KinematicBody` axis lock ([GH-45176](https://github.com/godotengine/godot/pull/45176)).
|
||||
- Don't override `KinematicCollision` reference when still in use in script ([GH-52955](https://github.com/godotengine/godot/pull/52955)).
|
||||
- Fix ragdoll simulation when parent was readded to scene ([GH-48823](https://github.com/godotengine/godot/pull/48823)).
|
||||
- Fix ragdoll simulation when parent was re-added to scene ([GH-48823](https://github.com/godotengine/godot/pull/48823)).
|
||||
- Ignore disabled shapes for mass property calculations ([GH-49699](https://github.com/godotengine/godot/pull/49699)).
|
||||
|
||||
#### Porting
|
||||
@@ -1333,7 +1999,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
|
||||
- Support for automatically building Android templates before exporting.
|
||||
- This makes 3rd-party SDK integration easier.
|
||||
- Support for [texture atlases in 2D](https://godotengine.org/article/atlas-support-returns-godot-3-2).
|
||||
- Major improvements to the visual shader system. ([News post 1](https://godotengine.org/article/major-update-for-visual-shader-in-godot-3-2), [News post 2](https://godotengine.org/article/major-update-visual-shaders-godot-3-2-part-2))
|
||||
- Major improvements to the visual shader system ([News post 1](https://godotengine.org/article/major-update-for-visual-shader-in-godot-3-2), [News post 2](https://godotengine.org/article/major-update-visual-shaders-godot-3-2-part-2)).
|
||||
- Redesigned visual shader editor with drag-and-drop capability.
|
||||
- Textures can be dragged from the FileSystem dock to be added as nodes.
|
||||
- Most functions available in GLSL are now exposed.
|
||||
@@ -2440,6 +3106,9 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
|
||||
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.
|
||||
|
||||
|
||||
[4.0.3]: https://github.com/godotengine/godot/compare/4.0.2-stable...4.0.3-stable
|
||||
[4.0.2]: https://github.com/godotengine/godot/compare/4.0.1-stable...4.0.2-stable
|
||||
[4.0.1]: https://github.com/godotengine/godot/compare/4.0-stable...4.0.1-stable
|
||||
[4.0]: https://github.com/godotengine/godot/compare/3.2-stable...4.0-stable
|
||||
[3.5]: https://github.com/godotengine/godot/compare/3.4-stable...3.5-stable
|
||||
[3.4]: https://github.com/godotengine/godot/compare/3.3-stable...3.4-stable
|
||||
|
||||
@@ -169,7 +169,7 @@ License: Expat
|
||||
|
||||
Files: ./thirdparty/doctest/
|
||||
Comment: doctest
|
||||
Copyright: 2016-2021, Viktor Kirilov
|
||||
Copyright: 2016-2023, Viktor Kirilov
|
||||
License: Expat
|
||||
|
||||
Files: ./thirdparty/embree/
|
||||
|
||||
21
SConstruct
21
SConstruct
@@ -645,7 +645,7 @@ if selected_platform in platform_list:
|
||||
print(
|
||||
"Detected mingw version is not using posix threads. Only posix "
|
||||
"version of mingw is supported. "
|
||||
'Use "update-alternatives --config <platform>-w64-mingw32-[gcc|g++]" '
|
||||
'Use "update-alternatives --config x86_64-w64-mingw32-g++" '
|
||||
"to switch to posix threads."
|
||||
)
|
||||
Exit(255)
|
||||
@@ -686,7 +686,8 @@ if selected_platform in platform_list:
|
||||
if env["warnings"] == "extra":
|
||||
env.Append(CCFLAGS=["/W4"])
|
||||
elif env["warnings"] == "all":
|
||||
env.Append(CCFLAGS=["/W3"])
|
||||
# C4458 is like -Wshadow. Part of /W4 but let's apply it for the default /W3 too.
|
||||
env.Append(CCFLAGS=["/W3", "/w34458"])
|
||||
elif env["warnings"] == "moderate":
|
||||
env.Append(CCFLAGS=["/W2"])
|
||||
# Disable warnings which we don't plan to fix.
|
||||
@@ -715,7 +716,7 @@ if selected_platform in platform_list:
|
||||
common_warnings = []
|
||||
|
||||
if methods.using_gcc(env):
|
||||
common_warnings += ["-Wshadow-local", "-Wno-misleading-indentation"]
|
||||
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
|
||||
if cc_version_major == 7: # Bogus warning fixed in 8+.
|
||||
common_warnings += ["-Wno-strict-overflow"]
|
||||
if cc_version_major < 11:
|
||||
@@ -725,6 +726,7 @@ if selected_platform in platform_list:
|
||||
if cc_version_major >= 12: # False positives in our error macros, see GH-58747.
|
||||
common_warnings += ["-Wno-return-type"]
|
||||
elif methods.using_clang(env) or methods.using_emcc(env):
|
||||
common_warnings += ["-Wshadow-field-in-constructor", "-Wshadow-uncaptured-local"]
|
||||
# We often implement `operator<` for structs of pointers as a requirement
|
||||
# for putting them in `Set` or `Map`. We don't mind about unreliable ordering.
|
||||
common_warnings += ["-Wno-ordered-compare-function-pointers"]
|
||||
@@ -820,6 +822,15 @@ if selected_platform in platform_list:
|
||||
env.module_list = modules_enabled
|
||||
methods.sort_module_list(env)
|
||||
|
||||
if env.editor_build:
|
||||
# Add editor-specific dependencies to the dependency graph.
|
||||
env.module_add_dependencies("editor", ["freetype", "svg"])
|
||||
|
||||
# And check if they are met.
|
||||
if not env.module_check_dependencies("editor"):
|
||||
print("Not all modules required by editor builds are enabled.")
|
||||
Exit(255)
|
||||
|
||||
methods.generate_version_header(env.module_version_string)
|
||||
|
||||
env["PROGSUFFIX_WRAP"] = suffix + env.module_version_string + ".console" + env["PROGSUFFIX"]
|
||||
@@ -840,7 +851,7 @@ if selected_platform in platform_list:
|
||||
|
||||
if env["disable_3d"]:
|
||||
if env.editor_build:
|
||||
print("Build option 'disable_3d=yes' cannot be used for editor builds, but only for export templates.")
|
||||
print("Build option 'disable_3d=yes' cannot be used for editor builds, only for export template builds.")
|
||||
Exit(255)
|
||||
else:
|
||||
env.Append(CPPDEFINES=["_3D_DISABLED"])
|
||||
@@ -848,7 +859,7 @@ if selected_platform in platform_list:
|
||||
if env.editor_build:
|
||||
print(
|
||||
"Build option 'disable_advanced_gui=yes' cannot be used for editor builds, "
|
||||
"but only for export templates."
|
||||
"only for export template builds."
|
||||
)
|
||||
Exit(255)
|
||||
else:
|
||||
|
||||
@@ -401,6 +401,10 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
vc.flags = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
|
||||
}
|
||||
|
||||
if (v->internal) {
|
||||
vc.flags |= PROPERTY_USAGE_INTERNAL;
|
||||
}
|
||||
|
||||
if (v->basic) {
|
||||
vc.flags |= PROPERTY_USAGE_EDITOR_BASIC_SETTING;
|
||||
}
|
||||
@@ -1242,7 +1246,7 @@ void ProjectSettings::_add_builtin_input_map() {
|
||||
action["events"] = events;
|
||||
|
||||
String action_name = "input/" + E.key;
|
||||
GLOBAL_DEF_INTERNAL(action_name, action);
|
||||
GLOBAL_DEF(action_name, action);
|
||||
input_presets.push_back(action_name);
|
||||
}
|
||||
}
|
||||
@@ -1266,6 +1270,10 @@ ProjectSettings::ProjectSettings() {
|
||||
GLOBAL_DEF("application/config/custom_user_dir_name", "");
|
||||
GLOBAL_DEF("application/config/project_settings_override", "");
|
||||
|
||||
GLOBAL_DEF("application/run/main_loop_type", "SceneTree");
|
||||
GLOBAL_DEF("application/config/auto_accept_quit", true);
|
||||
GLOBAL_DEF("application/config/quit_on_go_back", true);
|
||||
|
||||
// The default window size is tuned to:
|
||||
// - Have a 16:9 aspect ratio,
|
||||
// - Have both dimensions divisible by 8 to better play along with video recording,
|
||||
@@ -1304,26 +1312,23 @@ ProjectSettings::ProjectSettings() {
|
||||
}
|
||||
extensions.push_back("gdshader");
|
||||
|
||||
GLOBAL_DEF("editor/run/main_run_args", "");
|
||||
|
||||
GLOBAL_DEF(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions);
|
||||
|
||||
GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates");
|
||||
|
||||
// For correct doc generation.
|
||||
GLOBAL_DEF("editor/naming/default_signal_callback_name", "_on_{node_name}_{signal_name}");
|
||||
GLOBAL_DEF("editor/naming/default_signal_callback_to_self_name", "_on_{signal_name}");
|
||||
|
||||
_add_builtin_input_map();
|
||||
|
||||
// Keep the enum values in sync with the `DisplayServer::ScreenOrientation` enum.
|
||||
custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::INT, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor");
|
||||
GLOBAL_DEF("display/window/subwindows/embed_subwindows", true);
|
||||
// Keep the enum values in sync with the `DisplayServer::VSyncMode` enum.
|
||||
custom_prop_info["display/window/vsync/vsync_mode"] = PropertyInfo(Variant::INT, "display/window/vsync/vsync_mode", PROPERTY_HINT_ENUM, "Disabled,Enabled,Adaptive,Mailbox");
|
||||
custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
|
||||
GLOBAL_DEF("physics/2d/run_on_separate_thread", false);
|
||||
GLOBAL_DEF("physics/3d/run_on_separate_thread", false);
|
||||
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport"), "disabled");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"), "keep");
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "display/window/stretch/scale", PROPERTY_HINT_RANGE, "0.5,8.0,0.01"), 1.0);
|
||||
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1"), 16384);
|
||||
|
||||
GLOBAL_DEF(PropertyInfo(Variant::BOOL, "compression/formats/zstd/long_distance_matching"), Compression::zstd_long_distance_matching);
|
||||
@@ -1339,18 +1344,26 @@ ProjectSettings::ProjectSettings() {
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/occlusion_culling/bvh_build_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), 2);
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "memory/limits/multithreaded_server/rid_pool_prealloc", PROPERTY_HINT_RANGE, "0,500,1"), 60); // No negative and limit to 500 due to crashes.
|
||||
GLOBAL_DEF_RST("internationalization/rendering/force_right_to_left_layout_direction", false);
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "internationalization/rendering/root_node_layout_direction", PROPERTY_HINT_RANGE, "Based on Locale,Left-to-Right,Right-to-Left"), 0);
|
||||
|
||||
GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000);
|
||||
|
||||
GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true);
|
||||
GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true);
|
||||
|
||||
GLOBAL_DEF("rendering/rendering_device/staging_buffer/block_size_kb", 256);
|
||||
GLOBAL_DEF("rendering/rendering_device/staging_buffer/max_size_mb", 128);
|
||||
GLOBAL_DEF("rendering/rendering_device/staging_buffer/texture_upload_region_size_px", 64);
|
||||
GLOBAL_DEF("rendering/rendering_device/vulkan/max_descriptors_per_pool", 64);
|
||||
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
|
||||
|
||||
// These properties will not show up in the dialog nor in the documentation. If you want to exclude whole groups, see _get_property_list() method.
|
||||
GLOBAL_DEF_INTERNAL("application/config/features", PackedStringArray());
|
||||
GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray());
|
||||
GLOBAL_DEF_INTERNAL("internationalization/locale/translations", PackedStringArray());
|
||||
GLOBAL_DEF_INTERNAL("internationalization/locale/translations_pot_files", PackedStringArray());
|
||||
}
|
||||
|
||||
ProjectSettings::~ProjectSettings() {
|
||||
|
||||
@@ -1052,6 +1052,7 @@ void GDExtensionAPIDump::generate_extension_json_file(const String &p_path) {
|
||||
|
||||
String text = json->stringify(api, "\t", false) + "\n";
|
||||
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
|
||||
ERR_FAIL_COND_MSG(fa.is_null(), vformat("Cannot open file '%s' for writing.", p_path));
|
||||
fa->store_string(text);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ class GDExtensionInterfaceDump {
|
||||
public:
|
||||
static void generate_gdextension_interface_file(const String &p_path) {
|
||||
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
|
||||
ERR_FAIL_COND_MSG(fa.is_null(), vformat("Cannot open file '%s' for writing.", p_path));
|
||||
CharString cs(gdextension_interface_dump);
|
||||
fa->store_buffer((const uint8_t *)cs.ptr(), cs.length());
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Source: https://github.com/godotengine/godot
|
||||
|
||||
# Windows
|
||||
__XINPUT_DEVICE__,XInput Gamepad,a:b12,b:b13,x:b14,y:b15,start:b4,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpdown:b1,dpleft:b2,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Windows,
|
||||
__XINPUT_DEVICE__,XInput Gamepad,a:b12,b:b13,x:b14,y:b15,start:b4,guide:b10,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpdown:b1,dpleft:b2,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Windows,
|
||||
|
||||
# Android
|
||||
Default Android Gamepad,Default Controller,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a4,x:b2,dpup:h0.1,back:b4,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a5,b:b1,platform:Android,
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "core/input/input_map.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
#ifdef DEV_ENABLED
|
||||
#include "core/os/thread.h"
|
||||
#endif
|
||||
|
||||
static const char *_joy_buttons[(size_t)JoyButton::SDL_MAX] = {
|
||||
"a",
|
||||
"b",
|
||||
@@ -486,6 +490,10 @@ Vector3 Input::get_gyroscope() const {
|
||||
}
|
||||
|
||||
void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_emulated) {
|
||||
// This function does the final delivery of the input event to user land.
|
||||
// Regardless where the event came from originally, this has to happen on the main thread.
|
||||
DEV_ASSERT(Thread::get_caller_id() == Thread::get_main_id());
|
||||
|
||||
// Notes on mouse-touch emulation:
|
||||
// - Emulated mouse events are parsed, that is, re-routed to this method, so they make the same effects
|
||||
// as true mouse events. The only difference is the situation is flagged as emulated so they are not
|
||||
@@ -537,7 +545,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
|
||||
touch_event->set_position(mb->get_position());
|
||||
touch_event->set_double_tap(mb->is_double_click());
|
||||
touch_event->set_device(InputEvent::DEVICE_ID_EMULATION);
|
||||
_THREAD_SAFE_UNLOCK_
|
||||
event_dispatch_function(touch_event);
|
||||
_THREAD_SAFE_LOCK_
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,7 +573,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
|
||||
drag_event->set_velocity(get_last_mouse_velocity());
|
||||
drag_event->set_device(InputEvent::DEVICE_ID_EMULATION);
|
||||
|
||||
_THREAD_SAFE_UNLOCK_
|
||||
event_dispatch_function(drag_event);
|
||||
_THREAD_SAFE_LOCK_
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,7 +676,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
|
||||
|
||||
if (ge.is_valid()) {
|
||||
if (event_dispatch_function) {
|
||||
_THREAD_SAFE_UNLOCK_
|
||||
event_dispatch_function(ge);
|
||||
_THREAD_SAFE_LOCK_
|
||||
}
|
||||
}
|
||||
|
||||
@@ -687,7 +701,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
|
||||
}
|
||||
|
||||
if (event_dispatch_function) {
|
||||
_THREAD_SAFE_UNLOCK_
|
||||
event_dispatch_function(p_event);
|
||||
_THREAD_SAFE_LOCK_
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,6 +847,7 @@ bool Input::is_emulating_touch_from_mouse() const {
|
||||
// Calling this whenever the game window is focused helps unsticking the "touch mouse"
|
||||
// if the OS or its abstraction class hasn't properly reported that touch pointers raised
|
||||
void Input::ensure_touch_mouse_raised() {
|
||||
_THREAD_SAFE_METHOD_
|
||||
if (mouse_from_touch_index != -1) {
|
||||
mouse_from_touch_index = -1;
|
||||
|
||||
@@ -937,8 +954,15 @@ void Input::flush_buffered_events() {
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
||||
while (buffered_events.front()) {
|
||||
_parse_input_event_impl(buffered_events.front()->get(), false);
|
||||
// The final delivery of the input event involves releasing the lock.
|
||||
// While the lock is released, another thread may lock it and add new events to the back.
|
||||
// Therefore, we get each event and pop it while we still have the lock,
|
||||
// to ensure the list is in a consistent state.
|
||||
List<Ref<InputEvent>>::Element *E = buffered_events.front();
|
||||
Ref<InputEvent> e = E->get();
|
||||
buffered_events.pop_front();
|
||||
|
||||
_parse_input_event_impl(e, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -474,10 +474,15 @@ String InputEventKey::to_string() {
|
||||
return vformat("InputEventKey: keycode=%s, mods=%s, physical=%s, pressed=%s, echo=%s", kc, mods, physical, p, e);
|
||||
}
|
||||
|
||||
Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode) {
|
||||
Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode, bool p_physical) {
|
||||
Ref<InputEventKey> ie;
|
||||
ie.instantiate();
|
||||
ie->set_keycode(p_keycode & KeyModifierMask::CODE_MASK);
|
||||
if (p_physical) {
|
||||
ie->set_physical_keycode(p_keycode & KeyModifierMask::CODE_MASK);
|
||||
} else {
|
||||
ie->set_keycode(p_keycode & KeyModifierMask::CODE_MASK);
|
||||
}
|
||||
|
||||
ie->set_unicode(char32_t(p_keycode & KeyModifierMask::CODE_MASK));
|
||||
|
||||
if ((p_keycode & KeyModifierMask::SHIFT) != Key::NONE) {
|
||||
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
virtual String as_text() const override;
|
||||
virtual String to_string() override;
|
||||
|
||||
static Ref<InputEventKey> create_reference(Key p_keycode_with_modifier_masks);
|
||||
static Ref<InputEventKey> create_reference(Key p_keycode_with_modifier_masks, bool p_physical = false);
|
||||
|
||||
InputEventKey() {}
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ protected:
|
||||
virtual String _get_root_string() const;
|
||||
|
||||
AccessType get_access_type() const;
|
||||
String fix_path(String p_path) const;
|
||||
virtual String fix_path(String p_path) const;
|
||||
|
||||
template <class T>
|
||||
static Ref<DirAccess> _create_builtin() {
|
||||
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
static void _bind_methods();
|
||||
|
||||
AccessType get_access_type() const;
|
||||
String fix_path(const String &p_path) const;
|
||||
virtual String fix_path(const String &p_path) const;
|
||||
virtual Error open_internal(const String &p_path, int p_mode_flags) = 0; ///< open a file
|
||||
virtual uint64_t _get_modified_time(const String &p_file) = 0;
|
||||
virtual void _set_access_type(AccessType p_access);
|
||||
|
||||
@@ -144,7 +144,7 @@ uint64_t FileAccessMemory::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
|
||||
}
|
||||
|
||||
memcpy(p_dst, &data[pos], read);
|
||||
pos += p_length;
|
||||
pos += read;
|
||||
|
||||
return read;
|
||||
}
|
||||
@@ -172,5 +172,5 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, uint64_t p_length) {
|
||||
}
|
||||
|
||||
memcpy(&data[pos], p_src, write);
|
||||
pos += p_length;
|
||||
pos += write;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ Error HTTPClientTCP::connect_to_host(const String &p_host, int p_port, Ref<TLSOp
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(tls_options.is_valid() && tls_options->is_server(), ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V_MSG(tls_options.is_valid() && !StreamPeerTLS::is_available(), ERR_UNAVAILABLE, "HTTPS is not available in this build.");
|
||||
ERR_FAIL_COND_V(conn_host.length() < HOST_MIN_LEN, ERR_INVALID_PARAMETER);
|
||||
|
||||
if (conn_port < 0) {
|
||||
|
||||
@@ -2649,7 +2649,7 @@ Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels
|
||||
_image_compress_bptc_func(this, p_channels);
|
||||
} break;
|
||||
case COMPRESS_ASTC: {
|
||||
ERR_FAIL_COND_V(!_image_compress_bptc_func, ERR_UNAVAILABLE);
|
||||
ERR_FAIL_COND_V(!_image_compress_astc_func, ERR_UNAVAILABLE);
|
||||
_image_compress_astc_func(this, p_astc_format);
|
||||
} break;
|
||||
case COMPRESS_MAX: {
|
||||
@@ -3535,6 +3535,8 @@ void Image::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(COMPRESS_ETC);
|
||||
BIND_ENUM_CONSTANT(COMPRESS_ETC2);
|
||||
BIND_ENUM_CONSTANT(COMPRESS_BPTC);
|
||||
BIND_ENUM_CONSTANT(COMPRESS_ASTC);
|
||||
BIND_ENUM_CONSTANT(COMPRESS_MAX);
|
||||
|
||||
BIND_ENUM_CONSTANT(USED_CHANNELS_L);
|
||||
BIND_ENUM_CONSTANT(USED_CHANNELS_LA);
|
||||
|
||||
@@ -75,7 +75,7 @@ struct _IP_ResolverPrivate {
|
||||
Semaphore sem;
|
||||
|
||||
Thread thread;
|
||||
bool thread_abort = false;
|
||||
SafeFlag thread_abort;
|
||||
|
||||
void resolve_queues() {
|
||||
for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) {
|
||||
@@ -111,7 +111,7 @@ struct _IP_ResolverPrivate {
|
||||
static void _thread_function(void *self) {
|
||||
_IP_ResolverPrivate *ipr = static_cast<_IP_ResolverPrivate *>(self);
|
||||
|
||||
while (!ipr->thread_abort) {
|
||||
while (!ipr->thread_abort.is_set()) {
|
||||
ipr->sem.wait();
|
||||
ipr->resolve_queues();
|
||||
}
|
||||
@@ -343,12 +343,12 @@ IP::IP() {
|
||||
singleton = this;
|
||||
resolver = memnew(_IP_ResolverPrivate);
|
||||
|
||||
resolver->thread_abort = false;
|
||||
resolver->thread_abort.clear();
|
||||
resolver->thread.start(_IP_ResolverPrivate::_thread_function, resolver);
|
||||
}
|
||||
|
||||
IP::~IP() {
|
||||
resolver->thread_abort = true;
|
||||
resolver->thread_abort.set();
|
||||
resolver->sem.post();
|
||||
resolver->thread.wait_to_finish();
|
||||
|
||||
|
||||
@@ -91,9 +91,12 @@ String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_
|
||||
case Variant::PACKED_FLOAT64_ARRAY:
|
||||
case Variant::PACKED_STRING_ARRAY:
|
||||
case Variant::ARRAY: {
|
||||
Array a = p_var;
|
||||
if (a.size() == 0) {
|
||||
return "[]";
|
||||
}
|
||||
String s = "[";
|
||||
s += end_statement;
|
||||
Array a = p_var;
|
||||
|
||||
ERR_FAIL_COND_V_MSG(p_markers.has(a.id()), "\"[...]\"", "Converting circular structure to JSON.");
|
||||
p_markers.insert(a.id());
|
||||
|
||||
@@ -310,12 +310,6 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
|
||||
thread_load_mutex->unlock();
|
||||
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "There is no thread loading source resource '" + p_source_resource + "'.");
|
||||
}
|
||||
//must be loading from this thread
|
||||
if (thread_load_tasks[p_source_resource].loader_id != Thread::get_caller_id()) {
|
||||
thread_load_mutex->unlock();
|
||||
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Threading loading resource'" + local_path + " failed: Source specified: '" + p_source_resource + "' but was not called by it.");
|
||||
}
|
||||
|
||||
//must not be already added as s sub tasks
|
||||
if (thread_load_tasks[p_source_resource].sub_tasks.has(local_path)) {
|
||||
thread_load_mutex->unlock();
|
||||
@@ -492,13 +486,21 @@ Ref<Resource> ResourceLoader::load_threaded_get(const String &p_path, Error *r_e
|
||||
print_lt("GET: load count: " + itos(thread_loading_count) + " / wait count: " + itos(thread_waiting_count) + " / suspended count: " + itos(thread_suspended_count) + " / active: " + itos(thread_loading_count - thread_suspended_count));
|
||||
}
|
||||
|
||||
bool still_valid = true;
|
||||
bool was_thread = load_task.thread;
|
||||
do {
|
||||
load_task.cond_var->wait(thread_load_lock);
|
||||
if (!thread_load_tasks.has(local_path)) { //may have been erased during unlock and this was always an invalid call
|
||||
still_valid = false;
|
||||
break;
|
||||
}
|
||||
} while (load_task.cond_var); // In case of spurious wakeup.
|
||||
|
||||
thread_suspended_count--;
|
||||
if (was_thread) {
|
||||
thread_suspended_count--;
|
||||
}
|
||||
|
||||
if (!thread_load_tasks.has(local_path)) { //may have been erased during unlock and this was always an invalid call
|
||||
if (!still_valid) {
|
||||
if (r_error) {
|
||||
*r_error = ERR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -807,8 +807,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
|
||||
z = (rows[1][0] - rows[0][1]) / s;
|
||||
|
||||
r_axis = Vector3(x, y, z);
|
||||
// CLAMP to avoid NaN if the value passed to acos is not in [0,1].
|
||||
r_angle = Math::acos(CLAMP((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2, (real_t)0.0, (real_t)1.0));
|
||||
// acos does clamping.
|
||||
r_angle = Math::acos((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2);
|
||||
}
|
||||
|
||||
void Basis::set_quaternion(const Quaternion &p_quaternion) {
|
||||
|
||||
@@ -596,9 +596,9 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
enum Orientation { NONE,
|
||||
CLOCKWISE,
|
||||
COUNTER_CLOCKWISE };
|
||||
enum Orientation { ORIENTATION_NONE,
|
||||
ORIENTATION_CLOCKWISE,
|
||||
ORIENTATION_COUNTER_CLOCKWISE };
|
||||
|
||||
Vector3 scaling;
|
||||
Vector3 center;
|
||||
@@ -1140,13 +1140,13 @@ ConvexHullInternal::Orientation ConvexHullInternal::get_orientation(const Edge *
|
||||
CHULL_ASSERT(!m.is_zero());
|
||||
int64_t dot = n.dot(m);
|
||||
CHULL_ASSERT(dot != 0);
|
||||
return (dot > 0) ? COUNTER_CLOCKWISE : CLOCKWISE;
|
||||
return (dot > 0) ? ORIENTATION_COUNTER_CLOCKWISE : ORIENTATION_CLOCKWISE;
|
||||
}
|
||||
return COUNTER_CLOCKWISE;
|
||||
return ORIENTATION_COUNTER_CLOCKWISE;
|
||||
} else if (p_prev->prev == p_next) {
|
||||
return CLOCKWISE;
|
||||
return ORIENTATION_CLOCKWISE;
|
||||
} else {
|
||||
return NONE;
|
||||
return ORIENTATION_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1176,7 +1176,7 @@ ConvexHullInternal::Edge *ConvexHullInternal::find_max_angle(bool p_ccw, const V
|
||||
} else if ((cmp = cot.compare(p_min_cot)) < 0) {
|
||||
p_min_cot = cot;
|
||||
min_edge = e;
|
||||
} else if ((cmp == 0) && (p_ccw == (get_orientation(min_edge, e, p_s, t) == COUNTER_CLOCKWISE))) {
|
||||
} else if ((cmp == 0) && (p_ccw == (get_orientation(min_edge, e, p_s, t) == ORIENTATION_COUNTER_CLOCKWISE))) {
|
||||
min_edge = e;
|
||||
}
|
||||
}
|
||||
@@ -1375,7 +1375,7 @@ void ConvexHullInternal::merge(IntermediateHull &p_h0, IntermediateHull &p_h1) {
|
||||
int64_t dot = (*e->target - *c0).dot(normal);
|
||||
CHULL_ASSERT(dot <= 0);
|
||||
if ((dot == 0) && ((*e->target - *c0).dot(t) > 0)) {
|
||||
if (!start0 || (get_orientation(start0, e, s, Point32(0, 0, -1)) == CLOCKWISE)) {
|
||||
if (!start0 || (get_orientation(start0, e, s, Point32(0, 0, -1)) == ORIENTATION_CLOCKWISE)) {
|
||||
start0 = e;
|
||||
}
|
||||
}
|
||||
@@ -1390,7 +1390,7 @@ void ConvexHullInternal::merge(IntermediateHull &p_h0, IntermediateHull &p_h1) {
|
||||
int64_t dot = (*e->target - *c1).dot(normal);
|
||||
CHULL_ASSERT(dot <= 0);
|
||||
if ((dot == 0) && ((*e->target - *c1).dot(t) > 0)) {
|
||||
if (!start1 || (get_orientation(start1, e, s, Point32(0, 0, -1)) == COUNTER_CLOCKWISE)) {
|
||||
if (!start1 || (get_orientation(start1, e, s, Point32(0, 0, -1)) == ORIENTATION_COUNTER_CLOCKWISE)) {
|
||||
start1 = e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,11 +74,13 @@ public:
|
||||
static _ALWAYS_INLINE_ double tanh(double p_x) { return ::tanh(p_x); }
|
||||
static _ALWAYS_INLINE_ float tanh(float p_x) { return ::tanhf(p_x); }
|
||||
|
||||
static _ALWAYS_INLINE_ double asin(double p_x) { return ::asin(p_x); }
|
||||
static _ALWAYS_INLINE_ float asin(float p_x) { return ::asinf(p_x); }
|
||||
// Always does clamping so always safe to use.
|
||||
static _ALWAYS_INLINE_ double asin(double p_x) { return p_x < -1 ? (-Math_PI / 2) : (p_x > 1 ? (Math_PI / 2) : ::asin(p_x)); }
|
||||
static _ALWAYS_INLINE_ float asin(float p_x) { return p_x < -1 ? (-Math_PI / 2) : (p_x > 1 ? (Math_PI / 2) : ::asinf(p_x)); }
|
||||
|
||||
static _ALWAYS_INLINE_ double acos(double p_x) { return ::acos(p_x); }
|
||||
static _ALWAYS_INLINE_ float acos(float p_x) { return ::acosf(p_x); }
|
||||
// Always does clamping so always safe to use.
|
||||
static _ALWAYS_INLINE_ double acos(double p_x) { return p_x < -1 ? Math_PI : (p_x > 1 ? 0 : ::acos(p_x)); }
|
||||
static _ALWAYS_INLINE_ float acos(float p_x) { return p_x < -1 ? Math_PI : (p_x > 1 ? 0 : ::acosf(p_x)); }
|
||||
|
||||
static _ALWAYS_INLINE_ double atan(double p_x) { return ::atan(p_x); }
|
||||
static _ALWAYS_INLINE_ float atan(float p_x) { return ::atanf(p_x); }
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
|
||||
real_t Quaternion::angle_to(const Quaternion &p_to) const {
|
||||
real_t d = dot(p_to);
|
||||
return Math::acos(CLAMP(d * d * 2 - 1, -1, 1));
|
||||
// acos does clamping.
|
||||
return Math::acos(d * d * 2 - 1);
|
||||
}
|
||||
|
||||
Vector3 Quaternion::get_euler(EulerOrder p_order) const {
|
||||
|
||||
@@ -126,10 +126,18 @@ public:
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ double randfn(double p_mean, double p_deviation) {
|
||||
return p_mean + p_deviation * (cos(Math_TAU * randd()) * sqrt(-2.0 * log(randd()))); // Box-Muller transform
|
||||
double temp = randd();
|
||||
if (temp < CMP_EPSILON) {
|
||||
temp += CMP_EPSILON; // To prevent generating of INF value in log function, resulting to return NaN value from this function.
|
||||
}
|
||||
return p_mean + p_deviation * (cos(Math_TAU * randd()) * sqrt(-2.0 * log(temp))); // Box-Muller transform.
|
||||
}
|
||||
_FORCE_INLINE_ float randfn(float p_mean, float p_deviation) {
|
||||
return p_mean + p_deviation * (cos((float)Math_TAU * randf()) * sqrt(-2.0 * log(randf()))); // Box-Muller transform
|
||||
float temp = randf();
|
||||
if (temp < CMP_EPSILON) {
|
||||
temp += CMP_EPSILON; // To prevent generating of INF value in log function, resulting to return NaN value from this function.
|
||||
}
|
||||
return p_mean + p_deviation * (cos((float)Math_TAU * randf()) * sqrt(-2.0 * log(temp))); // Box-Muller transform.
|
||||
}
|
||||
|
||||
double random(double p_from, double p_to);
|
||||
|
||||
@@ -59,15 +59,15 @@ public:
|
||||
|
||||
/*! Constructs a ray from origin, direction, and ray segment. Near
|
||||
* has to be smaller than far. */
|
||||
_FORCE_INLINE_ Ray(const Vector3 &org,
|
||||
const Vector3 &dir,
|
||||
float tnear = 0.0f,
|
||||
float tfar = INFINITY) :
|
||||
org(org),
|
||||
tnear(tnear),
|
||||
dir(dir),
|
||||
_FORCE_INLINE_ Ray(const Vector3 &p_org,
|
||||
const Vector3 &p_dir,
|
||||
float p_tnear = 0.0f,
|
||||
float p_tfar = INFINITY) :
|
||||
org(p_org),
|
||||
tnear(p_tnear),
|
||||
dir(p_dir),
|
||||
time(0.0f),
|
||||
tfar(tfar),
|
||||
tfar(p_tfar),
|
||||
mask(-1),
|
||||
u(0.0),
|
||||
v(0.0),
|
||||
|
||||
@@ -50,8 +50,8 @@ void Thread::_set_platform_functions(const PlatformFunctions &p_functions) {
|
||||
platform_functions = p_functions;
|
||||
}
|
||||
|
||||
void Thread::callback(Thread *p_self, const Settings &p_settings, Callback p_callback, void *p_userdata) {
|
||||
Thread::caller_id = _thread_id_hash(p_self->thread.get_id());
|
||||
void Thread::callback(ID p_caller_id, const Settings &p_settings, Callback p_callback, void *p_userdata) {
|
||||
Thread::caller_id = p_caller_id;
|
||||
if (platform_functions.set_priority) {
|
||||
platform_functions.set_priority(p_settings.priority);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void Thread::start(Thread::Callback p_callback, void *p_user, const Settings &p_
|
||||
std::thread empty_thread;
|
||||
thread.swap(empty_thread);
|
||||
}
|
||||
std::thread new_thread(&Thread::callback, this, p_settings, p_callback, p_user);
|
||||
std::thread new_thread(&Thread::callback, _thread_id_hash(thread.get_id()), p_settings, p_callback, p_user);
|
||||
thread.swap(new_thread);
|
||||
id = _thread_id_hash(thread.get_id());
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
static thread_local ID caller_id;
|
||||
std::thread thread;
|
||||
|
||||
static void callback(Thread *p_self, const Settings &p_settings, Thread::Callback p_callback, void *p_userdata);
|
||||
static void callback(ID p_caller_id, const Settings &p_settings, Thread::Callback p_callback, void *p_userdata);
|
||||
|
||||
static PlatformFunctions platform_functions;
|
||||
|
||||
|
||||
@@ -382,10 +382,10 @@ String Time::get_time_string_from_system(bool p_utc) const {
|
||||
|
||||
Dictionary Time::get_time_zone_from_system() const {
|
||||
OS::TimeZoneInfo info = OS::get_singleton()->get_time_zone_info();
|
||||
Dictionary timezone;
|
||||
timezone["bias"] = info.bias;
|
||||
timezone["name"] = info.name;
|
||||
return timezone;
|
||||
Dictionary ret_timezone;
|
||||
ret_timezone["bias"] = info.bias;
|
||||
ret_timezone["name"] = info.name;
|
||||
return ret_timezone;
|
||||
}
|
||||
|
||||
double Time::get_unix_time_from_system() const {
|
||||
|
||||
@@ -712,7 +712,25 @@ String TranslationServer::get_tool_locale() {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
return get_locale();
|
||||
// Look for best matching loaded translation.
|
||||
String best_locale = "en";
|
||||
int best_score = 0;
|
||||
|
||||
for (const Ref<Translation> &E : translations) {
|
||||
const Ref<Translation> &t = E;
|
||||
ERR_FAIL_COND_V(t.is_null(), best_locale);
|
||||
String l = t->get_locale();
|
||||
|
||||
int score = compare_locales(locale, l);
|
||||
if (score > 0 && score >= best_score) {
|
||||
best_locale = l;
|
||||
best_score = score;
|
||||
if (score == 10) {
|
||||
break; // Exact match, skip the rest.
|
||||
}
|
||||
}
|
||||
}
|
||||
return best_locale;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,11 +59,7 @@ public:
|
||||
|
||||
_FORCE_INLINE_ void push_back(T p_elem) {
|
||||
if (unlikely(count == capacity)) {
|
||||
if (capacity == 0) {
|
||||
capacity = 1;
|
||||
} else {
|
||||
capacity <<= 1;
|
||||
}
|
||||
capacity = tight ? (capacity + 1) : MAX((U)1, capacity << 1);
|
||||
data = (T *)memrealloc(data, capacity * sizeof(T));
|
||||
CRASH_COND_MSG(!data, "Out of memory");
|
||||
}
|
||||
@@ -87,7 +83,7 @@ public:
|
||||
}
|
||||
|
||||
/// Removes the item copying the last value into the position of the one to
|
||||
/// remove. It's generally faster than `remove`.
|
||||
/// remove. It's generally faster than `remove_at`.
|
||||
void remove_at_unordered(U p_index) {
|
||||
ERR_FAIL_INDEX(p_index, count);
|
||||
count--;
|
||||
@@ -143,12 +139,7 @@ public:
|
||||
count = p_size;
|
||||
} else if (p_size > count) {
|
||||
if (unlikely(p_size > capacity)) {
|
||||
if (capacity == 0) {
|
||||
capacity = 1;
|
||||
}
|
||||
while (capacity < p_size) {
|
||||
capacity <<= 1;
|
||||
}
|
||||
capacity = tight ? p_size : nearest_power_of_2_templated(p_size);
|
||||
data = (T *)memrealloc(data, capacity * sizeof(T));
|
||||
CRASH_COND_MSG(!data, "Out of memory");
|
||||
}
|
||||
|
||||
@@ -305,9 +305,9 @@ struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
|
||||
#endif
|
||||
|
||||
// Macro GD_IS_DEFINED() allows to check if a macro is defined. It needs to be defined to anything (say 1) to work.
|
||||
#define __GDARG_PLACEHOLDER_1 0,
|
||||
#define __GDARG_PLACEHOLDER_1 false,
|
||||
#define __gd_take_second_arg(__ignored, val, ...) val
|
||||
#define ____gd_is_defined(arg1_or_junk) __gd_take_second_arg(arg1_or_junk 1, 0)
|
||||
#define ____gd_is_defined(arg1_or_junk) __gd_take_second_arg(arg1_or_junk true, false)
|
||||
#define ___gd_is_defined(val) ____gd_is_defined(__GDARG_PLACEHOLDER_##val)
|
||||
#define GD_IS_DEFINED(x) ___gd_is_defined(x)
|
||||
|
||||
|
||||
@@ -466,7 +466,7 @@ Array Array::slice(int p_begin, int p_end, int p_step, bool p_deep) const {
|
||||
ERR_FAIL_COND_V_MSG(p_step > 0 && begin > end, result, "Slice is positive, but bounds is decreasing.");
|
||||
ERR_FAIL_COND_V_MSG(p_step < 0 && begin < end, result, "Slice is negative, but bounds is increasing.");
|
||||
|
||||
int result_size = (end - begin) / p_step;
|
||||
int result_size = (end - begin) / p_step + (((end - begin) % p_step != 0) ? 1 : 0);
|
||||
result.resize(result_size);
|
||||
|
||||
for (int src_idx = begin, dest_idx = 0; dest_idx < result_size; ++dest_idx) {
|
||||
|
||||
@@ -2941,7 +2941,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const {
|
||||
return hash_one_uint64((uint64_t)_data._int);
|
||||
} break;
|
||||
case FLOAT: {
|
||||
return hash_murmur3_one_float(_data._float);
|
||||
return hash_murmur3_one_double(_data._float);
|
||||
} break;
|
||||
case STRING: {
|
||||
return reinterpret_cast<const String *>(_data._mem)->hash();
|
||||
@@ -3158,7 +3158,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const {
|
||||
}
|
||||
return hash_fmix32(h);
|
||||
} else {
|
||||
return hash_murmur3_one_float(0.0);
|
||||
return hash_murmur3_one_double(0.0);
|
||||
}
|
||||
|
||||
} break;
|
||||
@@ -3659,9 +3659,9 @@ String Variant::get_call_error_text(Object *p_base, const StringName &p_method,
|
||||
err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected));
|
||||
}
|
||||
} else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
|
||||
err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount);
|
||||
err_text = "Method expected " + itos(ce.expected) + " arguments, but called with " + itos(p_argcount);
|
||||
} else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
|
||||
err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount);
|
||||
err_text = "Method expected " + itos(ce.expected) + " arguments, but called with " + itos(p_argcount);
|
||||
} else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
|
||||
err_text = "Method not found";
|
||||
} else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
|
||||
|
||||
@@ -1906,7 +1906,7 @@ static void _register_variant_builtin_methods() {
|
||||
bind_method(Vector4, distance_squared_to, sarray("to"), varray());
|
||||
bind_method(Vector4, dot, sarray("with"), varray());
|
||||
bind_method(Vector4, inverse, sarray(), varray());
|
||||
bind_method(Vector4, is_equal_approx, sarray("with"), varray());
|
||||
bind_method(Vector4, is_equal_approx, sarray("to"), varray());
|
||||
bind_method(Vector4, is_zero_approx, sarray(), varray());
|
||||
bind_method(Vector4, is_finite, sarray(), varray());
|
||||
|
||||
|
||||
@@ -374,6 +374,7 @@ struct VariantUtilityFunctions {
|
||||
r_error.error = Callable::CallError::CALL_OK;
|
||||
if (from.get_type() != to.get_type()) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.expected = from.get_type();
|
||||
r_error.argument = 1;
|
||||
return Variant();
|
||||
}
|
||||
@@ -542,7 +543,8 @@ struct VariantUtilityFunctions {
|
||||
}
|
||||
Variant base = *p_args[0];
|
||||
Variant ret;
|
||||
for (int i = 1; i < p_argcount; i++) {
|
||||
|
||||
for (int i = 0; i < p_argcount; i++) {
|
||||
Variant::Type arg_type = p_args[i]->get_type();
|
||||
if (arg_type != Variant::INT && arg_type != Variant::FLOAT) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
@@ -550,6 +552,9 @@ struct VariantUtilityFunctions {
|
||||
r_error.argument = i;
|
||||
return Variant();
|
||||
}
|
||||
if (i == 0) {
|
||||
continue;
|
||||
}
|
||||
bool valid;
|
||||
Variant::evaluate(Variant::OP_LESS, base, *p_args[i], ret, valid);
|
||||
if (!valid) {
|
||||
@@ -582,7 +587,8 @@ struct VariantUtilityFunctions {
|
||||
}
|
||||
Variant base = *p_args[0];
|
||||
Variant ret;
|
||||
for (int i = 1; i < p_argcount; i++) {
|
||||
|
||||
for (int i = 0; i < p_argcount; i++) {
|
||||
Variant::Type arg_type = p_args[i]->get_type();
|
||||
if (arg_type != Variant::INT && arg_type != Variant::FLOAT) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
@@ -590,6 +596,9 @@ struct VariantUtilityFunctions {
|
||||
r_error.argument = i;
|
||||
return Variant();
|
||||
}
|
||||
if (i == 0) {
|
||||
continue;
|
||||
}
|
||||
bool valid;
|
||||
Variant::evaluate(Variant::OP_GREATER, base, *p_args[i], ret, valid);
|
||||
if (!valid) {
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
// Defines the main "branch" version. Patch versions in this branch should be
|
||||
// forward-compatible.
|
||||
// Example: "3.1"
|
||||
#define VERSION_BRANCH "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR)
|
||||
#define VERSION_BRANCH _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR)
|
||||
#if VERSION_PATCH
|
||||
// Example: "3.1.4"
|
||||
#define VERSION_NUMBER "" VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
|
||||
#define VERSION_NUMBER VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
|
||||
#else // patch is 0, we don't include it in the "pretty" version number.
|
||||
// Example: "3.1" instead of "3.1.0"
|
||||
#define VERSION_NUMBER "" VERSION_BRANCH
|
||||
#define VERSION_NUMBER VERSION_BRANCH
|
||||
#endif // VERSION_PATCH
|
||||
|
||||
// Version number encoded as hexadecimal int with one byte for each number,
|
||||
@@ -57,16 +57,16 @@
|
||||
// Describes the full configuration of that Godot version, including the version number,
|
||||
// the status (beta, stable, etc.) and potential module-specific features (e.g. mono).
|
||||
// Example: "3.1.4.stable.mono"
|
||||
#define VERSION_FULL_CONFIG "" VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
|
||||
#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
|
||||
|
||||
// Similar to VERSION_FULL_CONFIG, but also includes the (potentially custom) VERSION_BUILD
|
||||
// description (e.g. official, custom_build, etc.).
|
||||
// Example: "3.1.4.stable.mono.official"
|
||||
#define VERSION_FULL_BUILD "" VERSION_FULL_CONFIG "." VERSION_BUILD
|
||||
#define VERSION_FULL_BUILD VERSION_FULL_CONFIG "." VERSION_BUILD
|
||||
|
||||
// Same as above, but prepended with Godot's name and a cosmetic "v" for "version".
|
||||
// Example: "Godot v3.1.4.stable.official.mono"
|
||||
#define VERSION_FULL_NAME "" VERSION_NAME " v" VERSION_FULL_BUILD
|
||||
#define VERSION_FULL_NAME VERSION_NAME " v" VERSION_FULL_BUILD
|
||||
|
||||
// Git commit hash, generated at build time in `core/version_hash.gen.cpp`.
|
||||
extern const char *const VERSION_HASH;
|
||||
|
||||
24
doc/Makefile
24
doc/Makefile
@@ -1,28 +1,28 @@
|
||||
BASEDIR = .
|
||||
CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/
|
||||
CLASSES = "$(BASEDIR)/classes/" "$(BASEDIR)/../modules/"
|
||||
OUTPUTDIR = $(BASEDIR)/_build
|
||||
TOOLSDIR = $(BASEDIR)/tools
|
||||
JSDIR = $(BASEDIR)/../platform/web
|
||||
JSDIR = "$(BASEDIR)/../platform/web"
|
||||
LANGARG ?= en
|
||||
LANGCMD = -l $(LANGARG)
|
||||
|
||||
.ONESHELL:
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUTDIR)
|
||||
rm -rf "$(OUTPUTDIR)"
|
||||
|
||||
doxygen:
|
||||
rm -rf $(OUTPUTDIR)/doxygen
|
||||
mkdir -p $(OUTPUTDIR)/doxygen
|
||||
rm -rf "$(OUTPUTDIR)/doxygen"
|
||||
mkdir -p "$(OUTPUTDIR)/doxygen"
|
||||
doxygen Doxyfile
|
||||
|
||||
rst:
|
||||
rm -rf $(OUTPUTDIR)/rst
|
||||
mkdir -p $(OUTPUTDIR)/rst
|
||||
python3 $(TOOLSDIR)/make_rst.py -o $(OUTPUTDIR)/rst $(LANGCMD) $(CLASSES)
|
||||
rm -rf "$(OUTPUTDIR)/rst"
|
||||
mkdir -p "$(OUTPUTDIR)/rst"
|
||||
python3 "$(TOOLSDIR)/make_rst.py" -o "$(OUTPUTDIR)/rst" "$(LANGCMD)" $(CLASSES)
|
||||
|
||||
rstjs:
|
||||
rm -rf $(OUTPUTDIR)/rstjs
|
||||
mkdir -p $(OUTPUTDIR)/rstjs
|
||||
npm --prefix $(JSDIR) ci
|
||||
npm --prefix $(JSDIR) run docs -- --destination $(OUTPUTDIR)/rstjs/html5_shell_classref.rst
|
||||
rm -rf "$(OUTPUTDIR)/rstjs"
|
||||
mkdir -p "$(OUTPUTDIR)/rstjs"
|
||||
npm --prefix "$(JSDIR)" ci
|
||||
npm --prefix "$(JSDIR)" run docs -- --destination "$(OUTPUTDIR)/rstjs/html5_shell_classref.rst"
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<return type="float" />
|
||||
<param index="0" name="x" type="float" />
|
||||
<description>
|
||||
Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
|
||||
Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method acos] from returning [constant @GDScript.NAN].
|
||||
[codeblock]
|
||||
# c is 0.523599 or 30 degrees if converted with rad_to_deg(c)
|
||||
var c = acos(0.866025)
|
||||
@@ -76,7 +76,7 @@
|
||||
<return type="float" />
|
||||
<param index="0" name="x" type="float" />
|
||||
<description>
|
||||
Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
|
||||
Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method asin] from returning [constant @GDScript.NAN].
|
||||
[codeblock]
|
||||
# s is 0.523599 or 30 degrees if converted with rad_to_deg(s)
|
||||
var s = asin(0.5)
|
||||
@@ -622,7 +622,7 @@
|
||||
<description>
|
||||
Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.
|
||||
[codeblock]
|
||||
lerp(0, 4, 0.75) # Returns 3.0
|
||||
lerpf(0, 4, 0.75) # Returns 3.0
|
||||
[/codeblock]
|
||||
See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].
|
||||
</description>
|
||||
@@ -645,8 +645,8 @@
|
||||
<return type="float" />
|
||||
<param index="0" name="x" type="float" />
|
||||
<description>
|
||||
Returns the natural logarithm of [param x]. This is the amount of time needed to reach a certain level of continuous growth.
|
||||
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
|
||||
Returns the [url=https://en.wikipedia.org/wiki/Natural_logarithm]natural logarithm[/url] of [param x] (base [url=https://en.wikipedia.org/wiki/E_(mathematical_constant)][i]e[/i][/url], with [i]e[/i] being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.
|
||||
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use [code]log(x) / log(10)[/code].
|
||||
[codeblock]
|
||||
log(10) # Returns 2.302585
|
||||
[/codeblock]
|
||||
@@ -826,17 +826,21 @@
|
||||
</method>
|
||||
<method name="print_rich" qualifiers="vararg">
|
||||
<description>
|
||||
Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as [code]red[/code], [i]not[/i] hexadecimal color codes. Unsupported tags will be left as-is in standard output.
|
||||
When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough.
|
||||
Converts one or more arguments of any type to string in the best way possible and prints them to the console.
|
||||
The following BBCode tags are supported: [code]b[/code], [code]i[/code], [code]u[/code], [code]s[/code], [code]indent[/code], [code]code[/code], [code]url[/code], [code]center[/code], [code]right[/code], [code]color[/code], [code]bgcolor[/code], [code]fgcolor[/code].
|
||||
Color tags only support the following named colors: [code]black[/code], [code]red[/code], [code]green[/code], [code]yellow[/code], [code]blue[/code], [code]magenta[/code], [code]pink[/code], [code]purple[/code], [code]cyan[/code], [code]white[/code], [code]orange[/code], [code]gray[/code]. Hexadecimal color codes are not supported.
|
||||
URL tags only support URLs wrapped by an URL tag, not URLs with a different title.
|
||||
When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, [code]code[/code] is represented with faint text but without any font change. Unsupported tags are left as-is in standard output.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b]
|
||||
print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
GD.PrintRich("[code][b]Hello world![/b][/code]"); // Prints out: [b]Hello world![/b]
|
||||
GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
|
||||
[b]Note:[/b] On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output.
|
||||
</description>
|
||||
</method>
|
||||
<method name="print_verbose" qualifiers="vararg">
|
||||
@@ -1142,9 +1146,9 @@
|
||||
<description>
|
||||
Returns [code]-1.0[/code] if [param x] is negative, [code]1.0[/code] if [param x] is positive, and [code]0.0[/code] if [param x] is zero.
|
||||
[codeblock]
|
||||
sign(-6.5) # Returns -1.0
|
||||
sign(0.0) # Returns 0.0
|
||||
sign(6.5) # Returns 1.0
|
||||
signf(-6.5) # Returns -1.0
|
||||
signf(0.0) # Returns 0.0
|
||||
signf(6.5) # Returns 1.0
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -1154,9 +1158,9 @@
|
||||
<description>
|
||||
Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param x] is positive, and [code]0[/code] if if [param x] is zero.
|
||||
[codeblock]
|
||||
sign(-6) # Returns -1
|
||||
sign(0) # Returns 0
|
||||
sign(6) # Returns 1
|
||||
signi(-6) # Returns -1
|
||||
signi(0) # Returns 0
|
||||
signi(6) # Returns 1
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -1226,8 +1230,8 @@
|
||||
Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating point number to an arbitrary number of decimals.
|
||||
A type-safe version of [method snapped], returning a [float].
|
||||
[codeblock]
|
||||
snapped(32.0, 2.5) # Returns 32.5
|
||||
snapped(3.14159, 0.01) # Returns 3.14
|
||||
snappedf(32.0, 2.5) # Returns 32.5
|
||||
snappedf(3.14159, 0.01) # Returns 3.14
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -1239,8 +1243,8 @@
|
||||
Returns the multiple of [param step] that is the closest to [param x].
|
||||
A type-safe version of [method snapped], returning an [int].
|
||||
[codeblock]
|
||||
snapped(53, 16) # Returns 48
|
||||
snapped(4096, 100) # Returns 4100
|
||||
snappedi(53, 16) # Returns 48
|
||||
snappedi(4096, 100) # Returns 4100
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
@@ -2432,10 +2436,10 @@
|
||||
Enum value which doesn't correspond to any MIDI message. This is used to initialize [enum MIDIMessage] properties with a generic state.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
|
||||
MIDI note OFF message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
|
||||
MIDI note OFF message. Not all MIDI devices send this event; some send [constant MIDI_MESSAGE_NOTE_ON] with zero velocity instead. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
|
||||
MIDI note ON message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
|
||||
MIDI note ON message. Some MIDI devices send this event with velocity zero instead of [constant MIDI_MESSAGE_NOTE_OFF], but implementations vary. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
|
||||
</constant>
|
||||
<constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
|
||||
MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
|
||||
@@ -2773,6 +2777,7 @@
|
||||
The property is shown in the [EditorInspector] (default).
|
||||
</constant>
|
||||
<constant name="PROPERTY_USAGE_INTERNAL" value="8" enum="PropertyUsageFlags" is_bitfield="true">
|
||||
The property is excluded from the class reference.
|
||||
</constant>
|
||||
<constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags" is_bitfield="true">
|
||||
The property can be checked in the [EditorInspector].
|
||||
@@ -2838,10 +2843,10 @@
|
||||
The property is read-only in the [EditorInspector].
|
||||
</constant>
|
||||
<constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags" is_bitfield="true">
|
||||
Default usage (storage, editor and network).
|
||||
Default usage (storage and editor).
|
||||
</constant>
|
||||
<constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags" is_bitfield="true">
|
||||
Default usage but without showing the property in the editor (storage, network).
|
||||
Default usage but without showing the property in the editor (storage).
|
||||
</constant>
|
||||
<constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags" is_bitfield="true">
|
||||
Flag for a normal method.
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
<param index="0" name="from" type="Vector3" />
|
||||
<param index="1" name="dir" type="Vector3" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the given ray intersects with this [AABB]. Ray length is infinite.
|
||||
Returns the point of intersection of the given ray with this [AABB] or [code]null[/code] if there is no intersection. Ray length is infinite.
|
||||
</description>
|
||||
</method>
|
||||
<method name="intersects_segment" qualifiers="const">
|
||||
@@ -196,7 +196,7 @@
|
||||
<param index="0" name="from" type="Vector3" />
|
||||
<param index="1" name="to" type="Vector3" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] intersects the line segment between [param from] and [param to].
|
||||
Returns the point of intersection between [param from] and [param to] with this [AABB] or [code]null[/code] if there is no intersection.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_equal_approx" qualifiers="const">
|
||||
@@ -237,7 +237,7 @@
|
||||
<return type="bool" />
|
||||
<param index="0" name="right" type="AABB" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the vectors are not equal.
|
||||
Returns [code]true[/code] if the AABBs are not equal.
|
||||
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
|
||||
</description>
|
||||
</operator>
|
||||
|
||||
@@ -15,27 +15,27 @@
|
||||
var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
|
||||
var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
|
||||
# Encrypt ECB
|
||||
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8())
|
||||
var encrypted = aes.update(data.to_utf8())
|
||||
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())
|
||||
var encrypted = aes.update(data.to_utf8_buffer())
|
||||
aes.finish()
|
||||
# Decrypt ECB
|
||||
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8())
|
||||
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())
|
||||
var decrypted = aes.update(encrypted)
|
||||
aes.finish()
|
||||
# Check ECB
|
||||
assert(decrypted == data.to_utf8())
|
||||
assert(decrypted == data.to_utf8_buffer())
|
||||
|
||||
var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes.
|
||||
# Encrypt CBC
|
||||
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8())
|
||||
encrypted = aes.update(data.to_utf8())
|
||||
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
|
||||
encrypted = aes.update(data.to_utf8_buffer())
|
||||
aes.finish()
|
||||
# Decrypt CBC
|
||||
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8())
|
||||
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
|
||||
decrypted = aes.update(encrypted)
|
||||
aes.finish()
|
||||
# Check CBC
|
||||
assert(decrypted == data.to_utf8())
|
||||
assert(decrypted == data.to_utf8_buffer())
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
using Godot;
|
||||
@@ -50,27 +50,27 @@
|
||||
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
|
||||
string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed.
|
||||
// Encrypt ECB
|
||||
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8());
|
||||
byte[] encrypted = _aes.Update(data.ToUtf8());
|
||||
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());
|
||||
byte[] encrypted = _aes.Update(data.ToUtf8Buffer());
|
||||
_aes.Finish();
|
||||
// Decrypt ECB
|
||||
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8());
|
||||
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());
|
||||
byte[] decrypted = _aes.Update(encrypted);
|
||||
_aes.Finish();
|
||||
// Check ECB
|
||||
Debug.Assert(decrypted == data.ToUtf8());
|
||||
Debug.Assert(decrypted == data.ToUtf8Buffer());
|
||||
|
||||
string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes.
|
||||
// Encrypt CBC
|
||||
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8(), iv.ToUtf8());
|
||||
encrypted = _aes.Update(data.ToUtf8());
|
||||
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
|
||||
encrypted = _aes.Update(data.ToUtf8Buffer());
|
||||
_aes.Finish();
|
||||
// Decrypt CBC
|
||||
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8(), iv.ToUtf8());
|
||||
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
|
||||
decrypted = _aes.Update(encrypted);
|
||||
_aes.Finish();
|
||||
// Check CBC
|
||||
Debug.Assert(decrypted == data.ToUtf8());
|
||||
Debug.Assert(decrypted == data.ToUtf8Buffer());
|
||||
}
|
||||
}
|
||||
[/csharp]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors.
|
||||
Physics body for 2D physics which moves only by script or animation (while affecting other bodies on its path). Useful for moving platforms and doors.
|
||||
</brief_description>
|
||||
<description>
|
||||
Animatable body for 2D physics.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors.
|
||||
Physics body for 3D physics which moves only by script or animation (while affecting other bodies on its path). Useful for moving platforms and doors.
|
||||
</brief_description>
|
||||
<description>
|
||||
Animatable body for 3D physics.
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation">
|
||||
If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation].
|
||||
If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation].
|
||||
</member>
|
||||
<member name="audio_max_polyphony" type="int" setter="set_audio_max_polyphony" getter="get_audio_max_polyphony" default="32">
|
||||
The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers.
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
The magnitude of area-specific wind force.
|
||||
</member>
|
||||
<member name="wind_source_path" type="NodePath" setter="set_wind_source_path" getter="get_wind_source_path" default="NodePath("")">
|
||||
The [Node3D] which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform.
|
||||
The [Node3D] which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform.
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
[b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient.
|
||||
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].
|
||||
[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior.
|
||||
[b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@@ -442,12 +441,23 @@
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
|
||||
To find the maximum value using a custom comparator, you can use [method reduce]. In this example every array element is checked and the first maximum value is returned:
|
||||
[codeblock]
|
||||
func _ready():
|
||||
var arr = [Vector2(0, 1), Vector2(2, 0), Vector2(1, 1), Vector2(1, 0), Vector2(0, 2)]
|
||||
# In this example we compare the lengths.
|
||||
print(arr.reduce(func(max, val): return val if is_length_greater(val, max) else max))
|
||||
|
||||
func is_length_greater(a, b):
|
||||
return a.length() > b.length()
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="min" qualifiers="const">
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
|
||||
See also [method max] for an example of using a custom comparator.
|
||||
</description>
|
||||
</method>
|
||||
<method name="pick_random" qualifiers="const">
|
||||
|
||||
@@ -1,16 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Audio stream that generates sounds procedurally.
|
||||
An audio stream with utilities for procedural sound generation.
|
||||
</brief_description>
|
||||
<description>
|
||||
This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also [AudioStreamGeneratorPlayback].
|
||||
[AudioStreamGenerator] is a type of audio stream that does not play back sounds on its own; instead, it expects a script to generate audio data for it. See also [AudioStreamGeneratorPlayback].
|
||||
Here's a sample on how to use it to generate a sine wave:
|
||||
[codeblock]
|
||||
var playback # Will hold the AudioStreamGeneratorPlayback.
|
||||
@onready var sample_hz = $AudioStreamPlayer.stream.mix_rate
|
||||
var pulse_hz = 440.0 # The frequency of the sound wave.
|
||||
|
||||
func _ready():
|
||||
$AudioStreamPlayer.play()
|
||||
playback = $AudioStreamPlayer.get_stream_playback()
|
||||
fill_buffer()
|
||||
|
||||
func fill_buffer():
|
||||
var phase = 0.0
|
||||
var increment = pulse_hz / sample_hz
|
||||
var frames_available = playback.get_frames_available()
|
||||
|
||||
for i in range(frames_available):
|
||||
playback.push_frame(Vector2.ONE * sin(phase * TAU))
|
||||
phase = fmod(phase + increment, 1.0)
|
||||
[/codeblock]
|
||||
In the example above, the "AudioStreamPlayer" node must use an [AudioStreamGenerator] as its stream. The [code]fill_buffer[/code] function provides audio data for approximating a sine wave.
|
||||
See also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis.
|
||||
[b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
|
||||
<link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5">
|
||||
|
||||
@@ -356,13 +356,13 @@
|
||||
[b]Note:[/b] [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to [code]0.0[/code] instead.
|
||||
</member>
|
||||
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
|
||||
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
|
||||
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality].
|
||||
</member>
|
||||
<member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.
|
||||
</member>
|
||||
<member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0">
|
||||
The strength of the subsurface scattering effect.
|
||||
The strength of the subsurface scattering effect. The depth of the effect is also controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale], which is set globally.
|
||||
</member>
|
||||
<member name="subsurf_scatter_texture" type="Texture2D" setter="set_texture" getter="get_texture">
|
||||
Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength].
|
||||
@@ -390,7 +390,7 @@
|
||||
Repeat flags for the texture. See [enum TextureFilter] for options.
|
||||
</member>
|
||||
<member name="transparency" type="int" setter="set_transparency" getter="get_transparency" enum="BaseMaterial3D.Transparency" default="0">
|
||||
If [code]true[/code], transparency is enabled on the body. Some transparency modes will disable shadow casting. Any transparency mode other than Disabled has a greater performance impact compared to opaque rendering. See also [member blend_mode].
|
||||
The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than [constant TRANSPARENCY_DISABLED] has a greater performance impact compared to opaque rendering. See also [member blend_mode].
|
||||
</member>
|
||||
<member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false">
|
||||
If [code]true[/code], enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
|
||||
</member>
|
||||
<member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false">
|
||||
If set to true, three different scale curves can be specified, one per scale axis.
|
||||
If set to [code]true[/code], three different scale curves can be specified, one per scale axis.
|
||||
</member>
|
||||
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
|
||||
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes.
|
||||
|
||||
@@ -76,14 +76,16 @@
|
||||
<method name="bind" qualifiers="vararg const">
|
||||
<return type="Callable" />
|
||||
<description>
|
||||
Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call].
|
||||
Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind].
|
||||
[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bindv">
|
||||
<return type="Callable" />
|
||||
<param index="0" name="arguments" type="Array" />
|
||||
<description>
|
||||
Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call].
|
||||
Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind].
|
||||
[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
|
||||
</description>
|
||||
</method>
|
||||
<method name="call" qualifiers="vararg const">
|
||||
@@ -187,7 +189,13 @@
|
||||
<return type="Callable" />
|
||||
<param index="0" name="argcount" type="int" />
|
||||
<description>
|
||||
Returns a copy of this [Callable] with the arguments unbound, as defined by [param argcount]. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method.
|
||||
Returns a copy of this [Callable] with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to [param argcount]. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also [method bind].
|
||||
[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
|
||||
[codeblock]
|
||||
func _ready():
|
||||
foo.unbind(1).call(1, 2) # Calls foo(1).
|
||||
foo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it does not change the arguments from bind.
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<param index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
|
||||
<param index="3" name="texture" type="Texture2D" default="null" />
|
||||
<description>
|
||||
Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
|
||||
Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors]. If you need more flexibility (such as being able to use bones), use [method RenderingServer.canvas_item_add_triangle_array] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_polyline">
|
||||
@@ -279,7 +279,7 @@
|
||||
<param index="2" name="filled" type="bool" default="true" />
|
||||
<param index="3" name="width" type="float" default="-1.0" />
|
||||
<description>
|
||||
Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified.
|
||||
Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect].
|
||||
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
|
||||
[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
|
||||
[b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]).
|
||||
@@ -380,7 +380,7 @@
|
||||
<param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
|
||||
<param index="4" name="transpose" type="bool" default="false" />
|
||||
<description>
|
||||
Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped.
|
||||
Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. See also [method draw_rect] and [method draw_texture_rect_region].
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw_texture_rect_region">
|
||||
@@ -392,7 +392,7 @@
|
||||
<param index="4" name="transpose" type="bool" default="false" />
|
||||
<param index="5" name="clip_uv" type="bool" default="true" />
|
||||
<description>
|
||||
Draws a textured rectangle region at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped.
|
||||
Draws a textured rectangle from a texture's region (specified by [param src_rect]) at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. See also [method draw_texture_rect].
|
||||
</description>
|
||||
</method>
|
||||
<method name="force_update_transform">
|
||||
@@ -423,6 +423,7 @@
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer].
|
||||
[b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_global_transform" qualifiers="const">
|
||||
@@ -502,7 +503,7 @@
|
||||
<method name="is_visible_in_tree" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw]).
|
||||
Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="make_canvas_position_local" qualifiers="const">
|
||||
@@ -569,13 +570,14 @@
|
||||
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
|
||||
</member>
|
||||
<member name="material" type="Material" setter="set_material" getter="get_material">
|
||||
The material applied to textures on this [CanvasItem].
|
||||
The material applied to this [CanvasItem].
|
||||
</member>
|
||||
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
|
||||
The color applied to textures on this [CanvasItem].
|
||||
The color applied to this [CanvasItem]. This property does affect child [CanvasItem]s, unlike [member self_modulate] which only affects the node itself.
|
||||
</member>
|
||||
<member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color(1, 1, 1, 1)">
|
||||
The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s.
|
||||
The color applied to this [CanvasItem]. This property does [b]not[/b] affect child [CanvasItem]s, unlike [member modulate] which affects both the node itself and its children.
|
||||
[b]Note:[/b] Internal children (e.g. sliders in [ColorPicker] or tab bar in [TabContainer]) are also not affected by this property (see [code]include_internal[/code] parameter of [method Node.get_child] and other similar methods).
|
||||
</member>
|
||||
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">
|
||||
If [code]true[/code], the object draws behind its parent.
|
||||
@@ -596,7 +598,7 @@
|
||||
The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask.
|
||||
</member>
|
||||
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
|
||||
If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
|
||||
If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
|
||||
[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
|
||||
</member>
|
||||
<member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="apply_floor_snap">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_angle" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
|
||||
@@ -67,8 +73,8 @@
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
for i in get_slide_collision_count():
|
||||
var collision = get_slide_collision(i)
|
||||
print("Collided with: ", collision.collider.name)
|
||||
var collision = get_slide_collision(i)
|
||||
print("Collided with: ", collision.get_collider().name)
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
for (int i = 0; i < GetSlideCollisionCount(); i++)
|
||||
@@ -152,7 +158,7 @@
|
||||
</member>
|
||||
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="1.0">
|
||||
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
|
||||
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
|
||||
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use [method apply_floor_snap].
|
||||
</member>
|
||||
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
|
||||
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="apply_floor_snap">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_angle" qualifiers="const">
|
||||
<return type="float" />
|
||||
<param index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
|
||||
@@ -144,7 +150,7 @@
|
||||
</member>
|
||||
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1">
|
||||
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
|
||||
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
|
||||
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use [method apply_floor_snap].
|
||||
</member>
|
||||
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
|
||||
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.
|
||||
|
||||
@@ -537,7 +537,7 @@
|
||||
Marks the option as a member.
|
||||
</constant>
|
||||
<constant name="KIND_ENUM" value="5" enum="CodeCompletionKind">
|
||||
Marks the option as a enum entry.
|
||||
Marks the option as an enum entry.
|
||||
</constant>
|
||||
<constant name="KIND_CONSTANT" value="6" enum="CodeCompletionKind">
|
||||
Marks the option as a constant.
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CollisionPolygon2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Defines a 2D collision polygon.
|
||||
Node that represents a 2D collision polygon.
|
||||
</brief_description>
|
||||
<description>
|
||||
Provides a concave or convex 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices. See also [ConvexPolygonShape2D].
|
||||
Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices.
|
||||
Depending on the build mode, this node effectively provides several convex shapes (by convex decomposition of the polygon) or a single concave shape made of the polygon's segments.
|
||||
In the editor, a [CollisionPolygon2D] can be generated from a [Sprite2D]'s outline by selecting a [Sprite2D] node, going to the [b]Sprite2D[/b] menu at the top of the 2D editor viewport then choosing [b]Create CollisionPolygon2D Sibling[/b].
|
||||
</description>
|
||||
<tutorials>
|
||||
@@ -24,15 +25,16 @@
|
||||
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity.
|
||||
</member>
|
||||
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
|
||||
The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference.
|
||||
The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first.
|
||||
[b]Warning:[/b] The returned value is a clone of the [PackedVector2Array], not a reference.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
<constant name="BUILD_SOLIDS" value="0" enum="BuildMode">
|
||||
Collisions will include the polygon and its contained area.
|
||||
Collisions will include the polygon and its contained area. In this mode the node has the same effect as several [ConvexPolygonShape2D] nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes).
|
||||
</constant>
|
||||
<constant name="BUILD_SEGMENTS" value="1" enum="BuildMode">
|
||||
Collisions will only include the polygon edges.
|
||||
Collisions will only include the polygon edges. In this mode the node has the same effect as a single [ConcavePolygonShape2D] made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon).
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="CollisionPolygon3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Editor-only node for defining a collision polygon in 3D space.
|
||||
Node that represents a 3D collision polygon, given by the thickening of a 2D polygon in the local XY plane along the local Z axis.
|
||||
</brief_description>
|
||||
<description>
|
||||
Allows editing a concave or convex collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates several [ConvexPolygonShape3D]s at run-time to represent the original polygon using convex decomposition.
|
||||
[b]Note:[/b] Since this is an editor-only helper, properties modified during gameplay will have no effect.
|
||||
Provides a 3D collision polygon to a [CollisionObject3D] parent, by thickening a 2D (convex or concave) polygon in the local XY plane along the local Z axis. The 2D polygon in the local XY plane can be drawn in the editor or specified by a list of vertices. That 2D polygon is thickened evenly in the local Z and -Z directions.
|
||||
This node has the same effect as several [ConvexPolygonShape3D] nodes, created by thickening the 2D convex polygons in the convex decomposition of the given 2D polygon (but without the overhead of multiple nodes).
|
||||
[b]Warning:[/b] A non-uniformly scaled CollisionPolygon3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change its [member polygon]'s vertices instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
|
||||
Length that the resulting collision extends in either direction perpendicular to its polygon.
|
||||
Length that the resulting collision extends in either direction perpendicular to its 2D polygon.
|
||||
</member>
|
||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
|
||||
If [code]true[/code], no collision will be produced.
|
||||
@@ -21,7 +21,7 @@
|
||||
The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details.
|
||||
</member>
|
||||
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
|
||||
Array of vertices which define the polygon.
|
||||
Array of vertices which define the 2D polygon in the local XY plane.
|
||||
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
|
||||
</member>
|
||||
</members>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Node that represents collision shape data in 2D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
Editor facility for creating and editing collision shapes in 2D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape.
|
||||
Editor facility for creating and editing collision shapes in 2D space. Set the [member shape] property to configure the shape.
|
||||
You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Node that represents collision shape data in 3D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape.
|
||||
Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape.
|
||||
You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object.
|
||||
[b]Warning:[/b] A non-uniformly scaled CollisionShape3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size of its [member shape] resource instead.
|
||||
</description>
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
A cubemap that is loaded from a [code].ccube[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemap] can use one of 4 compresson methods:
|
||||
- Uncompressed (uncompressed on the GPU)
|
||||
- Lossless (WebP or PNG, uncompressed on the GPU)
|
||||
- Lossy (WebP, uncompressed on the GPU)
|
||||
- VRAM Compressed (compressed on the GPU)
|
||||
- VRAM Uncompressed (uncompressed on the GPU)
|
||||
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
|
||||
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
|
||||
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
|
||||
See [Cubemap] for a general description of cubemaps.
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
A cubemap array that is loaded from a [code].ccubearray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemapArray] can use one of 4 compresson methods:
|
||||
- Uncompressed (uncompressed on the GPU)
|
||||
- Lossless (WebP or PNG, uncompressed on the GPU)
|
||||
- Lossy (WebP, uncompressed on the GPU)
|
||||
- VRAM Compressed (compressed on the GPU)
|
||||
- VRAM Uncompressed (uncompressed on the GPU)
|
||||
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
|
||||
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
|
||||
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
|
||||
See [CubemapArray] for a general description of cubemap arrays.
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
A texture that is loaded from a [code].ctex[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compression methods (including a lack of any compression):
|
||||
- Uncompressed (uncompressed on the GPU)
|
||||
- Lossless (WebP or PNG, uncompressed on the GPU)
|
||||
- Lossy (WebP, uncompressed on the GPU)
|
||||
- VRAM Compressed (compressed on the GPU)
|
||||
- VRAM Uncompressed (uncompressed on the GPU)
|
||||
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
|
||||
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
|
||||
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
|
||||
</description>
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2DArray] can use one of 4 compresson methods:
|
||||
- Uncompressed (uncompressed on the GPU)
|
||||
- Lossless (WebP or PNG, uncompressed on the GPU)
|
||||
- Lossy (WebP, uncompressed on the GPU)
|
||||
- VRAM Compressed (compressed on the GPU)
|
||||
- VRAM Uncompressed (uncompressed on the GPU)
|
||||
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
|
||||
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
|
||||
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
|
||||
See [Texture2DArray] for a general description of texture arrays.
|
||||
|
||||
@@ -4,13 +4,7 @@
|
||||
Base class for texture arrays that can optionally be compressed.
|
||||
</brief_description>
|
||||
<description>
|
||||
A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compresson methods:
|
||||
- Uncompressed (uncompressed on the GPU)
|
||||
- Lossless (WebP or PNG, uncompressed on the GPU)
|
||||
- Lossy (WebP, uncompressed on the GPU)
|
||||
- VRAM Compressed (compressed on the GPU)
|
||||
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
|
||||
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
|
||||
Base class for [CompressedTexture2DArray] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [TextureLayered].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
||||
@@ -4,16 +4,19 @@
|
||||
Concave polygon shape resource for 2D physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
|
||||
The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection.
|
||||
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape2D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape2D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape2D]'s documentation for instructions. However, consider using primitive collision shapes such as [CircleShape2D] or [RectangleShape2D] first.
|
||||
2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node.
|
||||
The shape consists of a collection of line segments, and as such it does not include any "inside" that the segments might be enclosing. If the segments do enclose anything, then the shape is [i]hollow[/i], as opposed to a [ConvexPolygonShape2D] which is solid. See also [CollisionPolygon2D].
|
||||
Being made out of line segments, this shape is the most freely configurable single 2D shape. It can be used to form (hollow) polygons of any nature, convex or concave.
|
||||
[b]Note:[/b] When used for collision, [b]ConcavePolygonShape2D[/b] is intended to work with static [PhysicsBody2D] nodes like [StaticBody2D] and is not recommended to use with [RigidBody2D] nodes in a mode other than Static. A [CollisionPolygon2D] in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better suited for static bodies.
|
||||
[b]Warning:[/b] The nature of this shape makes it extra prone to being tunneled through by (small) fast physics bodies. For example, consider a (small) rigid body [i]Ball[/i] traveling toward a static body [i]Box[/i] at high speed. If the box uses a [b]ConcavePolygonShape2D[/b] consisting of four segments, then the ball might end up inside the box or tunnel all the way through the box, if it goes fast enough. This is (partly) because the ball can only collide against the individual segments of the hollow box. In interactions with rigid bodies tunneling can be avoided by enabling continuous collision detection on the rigid body.
|
||||
[b]Warning:[/b] Using this shape for an [Area2D] (via a [CollisionShape2D] node) may give unexpected results: the area will only detect collisions with the segments in the [ConcavePolygonShape2D] (and not with any "inside" of the shape, for example).
|
||||
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape2D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape2D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape2D]'s documentation for instructions. However, consider using primitive collision shapes such as [CircleShape2D] or [RectangleShape2D] first.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array()">
|
||||
The array of points that make up the [ConcavePolygonShape2D]'s line segments.
|
||||
The array of points that make up the [ConcavePolygonShape2D]'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
||||
@@ -4,10 +4,13 @@
|
||||
Concave polygon shape resource (also called "trimesh") for 3D physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
3D concave polygon shape resource (also called "trimesh") to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node. This shape is created by feeding a list of triangles. Despite its name, [ConcavePolygonShape3D] can also store convex polygon shapes. However, unlike [ConvexPolygonShape3D], [ConcavePolygonShape3D] is [i]not[/i] limited to storing convex shapes exclusively.
|
||||
[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static.
|
||||
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape3D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions. However, consider using primitive collision shapes such as [SphereShape3D] or [BoxShape3D] first.
|
||||
3D concave polygon shape resource (also called "trimesh") to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node.
|
||||
The shape consists of a collection of triangle faces, and as such it does not include any "inside" that the faces might be enclosing. If the faces enclose anything, then the shape is [i]hollow[/i], as opposed to a [ConvexPolygonShape3D] which is solid. See also [CollisionPolygon3D].
|
||||
Being made out of triangle faces, this shape is the most freely configurable single 3D shape. Despite its name, it can be used to form (hollow) polyhedra of any nature, convex or concave.
|
||||
[b]Note:[/b] When used for collision, [b]ConcavePolygonShape3D[/b] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] in a mode other than Static.
|
||||
[b]Warning:[/b] The nature of this shape makes it extra prone to being tunneled through by (small) fast physics bodies. For example, consider a (small) rigid body [i]Ball[/i] traveling toward a static body [i]Box[/i] at high speed. If the box uses a [b]ConcavePolygonShape3D[/b] consisting of twelve triangle faces (two triangle faces for each of the six sides of the box), then the ball might end up inside the box or tunnel all the way through the box, if it goes fast enough. This is (partly) because the ball can only collide against the individual faces of the hollow box. In interactions with rigid bodies tunneling can be avoided by enabling continuous collision detection on the rigid body.
|
||||
[b]Warning:[/b] Using this shape for an [Area3D] (via a [CollisionShape3D] node, created e.g. by using the [i]Create Trimesh Collision Sibling[/i] option in the [i]Mesh[/i] menu that appears when selecting a [MeshInstance3D] node) may give unexpected results: the area will only detect collisions with the triangle faces in the [ConcavePolygonShape3D] (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if [member backface_collision] is [code]true[/code].
|
||||
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape3D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions. However, consider using primitive collision shapes such as [SphereShape3D] or [BoxShape3D] first.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
|
||||
@@ -16,14 +19,14 @@
|
||||
<method name="get_faces" qualifiers="const">
|
||||
<return type="PackedVector3Array" />
|
||||
<description>
|
||||
Returns the faces (an array of triangles).
|
||||
Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_faces">
|
||||
<return type="void" />
|
||||
<param index="0" name="faces" type="PackedVector3Array" />
|
||||
<description>
|
||||
Sets the faces (an array of triangles).
|
||||
Sets the faces of the trimesh shape from an array of vertices. The [param faces] array should be composed of triples such that each triple of vertices defines a triangle.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<return type="float" />
|
||||
<param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
|
||||
<description>
|
||||
Returns the value of the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_param">
|
||||
@@ -22,6 +23,7 @@
|
||||
<param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
|
||||
<param index="1" name="value" type="float" />
|
||||
<description>
|
||||
Sets the value of the specified parameter.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
<return type="void" />
|
||||
<description>
|
||||
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
|
||||
[b]Note:[/b] This does not affect the methods in [Input], only the way events are propagated.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_theme_color_override">
|
||||
@@ -399,7 +400,7 @@
|
||||
<return type="float" />
|
||||
<param index="0" name="offset" type="int" enum="Side" />
|
||||
<description>
|
||||
Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
|
||||
Returns the offset for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parent_area_size" qualifiers="const">
|
||||
@@ -840,7 +841,7 @@
|
||||
<param index="0" name="side" type="int" enum="Side" />
|
||||
<param index="1" name="neighbor" type="NodePath" />
|
||||
<description>
|
||||
Sets the anchor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
|
||||
Sets the focus neighbor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_global_position">
|
||||
@@ -937,10 +938,10 @@
|
||||
Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_left] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
|
||||
</member>
|
||||
<member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")">
|
||||
Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
|
||||
Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the right of this one.
|
||||
</member>
|
||||
<member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")">
|
||||
Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
|
||||
Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the top of this one.
|
||||
</member>
|
||||
<member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath("")">
|
||||
Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action.
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
Convex polygon shape resource for 2D physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
2D convex polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also [CollisionPolygon2D].
|
||||
The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection.
|
||||
[b]Performance:[/b] [ConvexPolygonShape2D] is faster to check collisions against compared to [ConcavePolygonShape2D], but it is slower than primitive collision shapes such as [CircleShape2D] or [RectangleShape2D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape.
|
||||
2D convex polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node.
|
||||
The shape is a [i]solid[/i] that includes all the points that it encloses, as opposed to [ConcavePolygonShape2D] which is hollow if it encloses anything. See also [CollisionPolygon2D].
|
||||
The solid nature of the shape makes it well-suited for both detection and physics; in physics body interactions this allows depenetrating even those shapes which end up (e.g. due to high speed) fully inside the convex shape (similarly to primitive shapes, but unlike [ConcavePolygonShape2D]). The convexity limits the possible geometric shape of a single [ConvexPolygonShape2D]: it cannot be concave.
|
||||
[b]Convex decomposition:[/b] Concave objects' collisions can be represented accurately using [i]several[/i] convex shapes. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). It can be achieved using several [ConvexPolygonShape2D] nodes or by using the [CollisionPolygon2D] node in Solids build mode. To generate a collision polygon from a sprite, select the [Sprite2D] node, go to the [b]Sprite2D[/b] menu that appears above the viewport, and choose [b]Create Polygon2D Sibling[/b].
|
||||
[b]Performance:[/b] [ConvexPolygonShape2D] is faster to check collisions against compared to [ConcavePolygonShape2D], but it is slower than primitive collision shapes such as [CircleShape2D] or [RectangleShape2D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@@ -15,13 +17,14 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="point_cloud" type="PackedVector2Array" />
|
||||
<description>
|
||||
Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details.
|
||||
Based on the set of points provided, this assigns the [member points] property using the convex hull algorithm, removing all unneeded points. See [method Geometry2D.convex_hull] for details.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()">
|
||||
The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [method set_point_cloud] to generate a convex hull shape from concave shape points.
|
||||
The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order.
|
||||
[b]Warning:[/b] Only set this property to a list of points that actually form a convex hull. Use [method set_point_cloud] to generate the convex hull of an arbitrary set of points.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
Convex polygon shape resource for 3D physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
3D convex polygon shape resource to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node. Unlike [ConcavePolygonShape3D], [ConvexPolygonShape3D] cannot store concave polygon shapes. [ConvexPolygonShape3D]s can be manually drawn in the editor using the [CollisionPolygon3D] node.
|
||||
[b]Convex decomposition:[/b] Concave objects' collisions can be represented accurately using [i]several[/i] [ConvexPolygonShape3D]s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the [MeshInstance3D], going to the [b]Mesh[/b] menu and choosing [b]Create Multiple Convex Collision Siblings[/b]. Alternatively, [method MeshInstance3D.create_multiple_convex_collisions] can be called in a script to perform this decomposition at run-time.
|
||||
[b]Performance:[/b] [ConvexPolygonShape3D] is faster to check collisions against compared to [ConcavePolygonShape3D], but it is slower than primitive collision shapes such as [SphereShape3D] or [BoxShape3D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape.
|
||||
3D convex polygon shape resource to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node.
|
||||
The shape is a [i]solid[/i] that includes all the points that it encloses, as opposed to [ConcavePolygonShape3D] which is hollow if it encloses anything. See also [CollisionPolygon3D].
|
||||
The solid nature of the shape makes it well-suited for both detection and physics; in physics body interactions this allows depenetrating even those shapes which end up (e.g. due to high speed) fully inside the convex shape (similarly to primitive shapes, but unlike [ConcavePolygonShape3D] and [HeightMapShape3D]). The convexity restricts the possible geometric shape of a single [ConvexPolygonShape3D]: it cannot be concave.
|
||||
[b]Convex decomposition:[/b] Concave objects' collisions can be represented accurately using [i]several[/i] convex shapes. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). It can be achieved by using several [ConvexPolygonShape3D] nodes or by using the [CollisionPolygon3D] node. To generate a collision polygon from a mesh, select the [MeshInstance3D] node, go to the [b]Mesh[/b] menu that appears above the viewport and choose [b]Create Multiple Convex Collision Siblings[/b]. Alternatively, [method MeshInstance3D.create_multiple_convex_collisions] can be called in a script to perform this decomposition at run-time.
|
||||
[b]Performance:[/b] [ConvexPolygonShape3D] is faster to check collisions against compared to [ConcavePolygonShape3D], but it is slower than primitive collision shapes such as [SphereShape3D] or [BoxShape3D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
cert.save("user://generated.crt")
|
||||
# Encryption
|
||||
var data = "Some data"
|
||||
var encrypted = crypto.encrypt(key, data.to_utf8())
|
||||
var encrypted = crypto.encrypt(key, data.to_utf8_buffer())
|
||||
# Decryption
|
||||
var decrypted = crypto.decrypt(key, encrypted)
|
||||
# Signing
|
||||
@@ -33,7 +33,7 @@
|
||||
var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key)
|
||||
# Checks
|
||||
assert(verified)
|
||||
assert(data.to_utf8() == decrypted)
|
||||
assert(data.to_utf8_buffer() == decrypted)
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
using Godot;
|
||||
@@ -56,7 +56,7 @@
|
||||
_cert.Save("user://generated.crt");
|
||||
// Encryption
|
||||
string data = "Some data";
|
||||
byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8());
|
||||
byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer());
|
||||
// Decryption
|
||||
byte[] decrypted = _crypto.Decrypt(_key, encrypted);
|
||||
// Signing
|
||||
@@ -65,7 +65,7 @@
|
||||
bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key);
|
||||
// Checks
|
||||
Debug.Assert(verified);
|
||||
Debug.Assert(data.ToUtf8() == decrypted);
|
||||
Debug.Assert(data.ToUtf8Buffer() == decrypted);
|
||||
}
|
||||
}
|
||||
[/csharp]
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<param index="1" name="cubic" type="bool" default="false" />
|
||||
<param index="2" name="apply_tilt" type="bool" default="false" />
|
||||
<description>
|
||||
Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes.
|
||||
Similar with [code]interpolate_baked()[/code]. The return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="samplef" qualifiers="const">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</member>
|
||||
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
|
||||
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
|
||||
The format the texture should be generated with. When passing a CurveTexture as a input to a [Shader], this may need to be adjusted.
|
||||
The format the texture should be generated with. When passing a CurveTexture as an input to a [Shader], this may need to be adjusted.
|
||||
</member>
|
||||
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
|
||||
The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
func _process(delta):
|
||||
while server.is_connection_available():
|
||||
var peer : PacketPeerUDP = server.take_connection()
|
||||
var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer)
|
||||
var peer: PacketPeerUDP = server.take_connection()
|
||||
var dtls_peer: PacketPeerDTLS = dtls.take_connection(peer)
|
||||
if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING:
|
||||
continue # It is normal that 50% of the connections fails due to cookie exchange.
|
||||
print("Peer connected!")
|
||||
@@ -35,7 +35,7 @@
|
||||
if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
|
||||
while p.get_available_packet_count() > 0:
|
||||
print("Received message from client: %s" % p.get_packet().get_string_from_utf8())
|
||||
p.put_packet("Hello DTLS client".to_utf8())
|
||||
p.put_packet("Hello DTLS client".to_utf8_buffer())
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
// ServerNode.cs
|
||||
@@ -77,7 +77,7 @@
|
||||
while (p.GetAvailablePacketCount() > 0)
|
||||
{
|
||||
GD.Print($"Received Message From Client: {p.GetPacket().GetStringFromUtf8()}");
|
||||
p.PutPacket("Hello DTLS Client".ToUtf8());
|
||||
p.PutPacket("Hello DTLS Client".ToUtf8Buffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@
|
||||
if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
|
||||
if !connected:
|
||||
# Try to contact server
|
||||
dtls.put_packet("The answer is... 42!".to_utf8())
|
||||
dtls.put_packet("The answer is... 42!".to_utf8_buffer())
|
||||
while dtls.get_available_packet_count() > 0:
|
||||
print("Connected: %s" % dtls.get_packet().get_string_from_utf8())
|
||||
connected = true
|
||||
@@ -133,7 +133,7 @@
|
||||
if (!_connected)
|
||||
{
|
||||
// Try to contact server
|
||||
_dtls.PutPacket("The Answer Is..42!".ToUtf8());
|
||||
_dtls.PutPacket("The Answer Is..42!".ToUtf8Buffer());
|
||||
}
|
||||
while (_dtls.GetAvailablePacketCount() > 0)
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<member name="texture_orm" type="Texture2D" setter="set_texture" getter="get_texture">
|
||||
[Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.
|
||||
[b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
|
||||
[b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
|
||||
[b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create an ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
|
||||
</member>
|
||||
<member name="upper_fade" type="float" setter="set_upper_fade" getter="get_upper_fade" default="0.3">
|
||||
Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member lower_fade].
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
[b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior.
|
||||
[b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
<description>
|
||||
Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories. The array is sorted alphabetically.
|
||||
Affected by [member include_hidden].
|
||||
[b]Note:[/b] When used on a [code]res://[/code] path in an exported project, only the files actually included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level [code].godot/[/code] folder, only paths to [code]*.gd[/code] and [code]*.import[/code] files are returned (plus a few files such as [code]project.godot[/code] or [code]project.binary[code] and the project icon). In an exported project, the list of returned files will also vary depending on whether [member ProjectSettings.editor/export/convert_text_resources_to_binary] is [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_files_at" qualifiers="static">
|
||||
@@ -290,7 +291,7 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="include_hidden" type="bool" setter="set_include_hidden" getter="get_include_hidden">
|
||||
If [code]true[/code], hidden files are included when the navigating directory.
|
||||
If [code]true[/code], hidden files are included when navigating the directory.
|
||||
Affects [method list_dir_begin], [method get_directories] and [method get_files].
|
||||
</member>
|
||||
<member name="include_navigational" type="bool" setter="set_include_navigational" getter="get_include_navigational">
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<description>
|
||||
Adds a new checkable item with text [param label] to the global menu with ID [param menu_root].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
[b]Supported system menu IDs:[/b]
|
||||
@@ -213,7 +213,7 @@
|
||||
<description>
|
||||
Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
[b]Supported system menu IDs:[/b]
|
||||
@@ -236,7 +236,7 @@
|
||||
<description>
|
||||
Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
[b]Supported system menu IDs:[/b]
|
||||
@@ -259,7 +259,7 @@
|
||||
<description>
|
||||
Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it.
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
@@ -282,7 +282,7 @@
|
||||
<description>
|
||||
Adds a new item with text [param label] to the global menu with ID [param menu_root].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
[b]Supported system menu IDs:[/b]
|
||||
@@ -307,7 +307,7 @@
|
||||
Adds a new item with text [param label] to the global menu with ID [param menu_root].
|
||||
Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] By default, there's no indication of the current item state, it should be changed manually.
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
@@ -330,7 +330,7 @@
|
||||
<description>
|
||||
Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root].
|
||||
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it.
|
||||
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
@@ -462,7 +462,7 @@
|
||||
<param index="0" name="menu_root" type="String" />
|
||||
<param index="1" name="idx" type="int" />
|
||||
<description>
|
||||
Returns number of states of an multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
Returns number of states of a multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -471,7 +471,7 @@
|
||||
<param index="0" name="menu_root" type="String" />
|
||||
<param index="1" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the state of an multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
Returns the state of a multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -507,7 +507,7 @@
|
||||
<param index="0" name="menu_root" type="String" />
|
||||
<param index="1" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the tooltip associated with the specified index index [param idx].
|
||||
Returns the tooltip associated with the specified index [param idx].
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -565,7 +565,7 @@
|
||||
<param index="1" name="idx" type="int" />
|
||||
<param index="2" name="keycode" type="int" enum="Key" />
|
||||
<description>
|
||||
Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -576,7 +576,7 @@
|
||||
<param index="2" name="callback" type="Callable" />
|
||||
<description>
|
||||
Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed.
|
||||
[b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
|
||||
[b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the [code]tag[/code] parameter when the menu item was created.
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -638,7 +638,7 @@
|
||||
<param index="2" name="key_callback" type="Callable" />
|
||||
<description>
|
||||
Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated.
|
||||
[b]Note:[/b] The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
|
||||
[b]Note:[/b] The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the [code]tag[/code] parameter when the menu item was created.
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -648,7 +648,7 @@
|
||||
<param index="1" name="idx" type="int" />
|
||||
<param index="2" name="max_states" type="int" />
|
||||
<description>
|
||||
Sets number of state of an multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
Sets number of state of a multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -669,7 +669,7 @@
|
||||
<param index="1" name="idx" type="int" />
|
||||
<param index="2" name="state" type="int" />
|
||||
<description>
|
||||
Sets the state of an multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
Sets the state of a multistate item. See [method global_menu_add_multistate_item] for details.
|
||||
[b]Note:[/b] This method is implemented on macOS.
|
||||
</description>
|
||||
</method>
|
||||
@@ -815,7 +815,7 @@
|
||||
<method name="mouse_get_position" qualifiers="const">
|
||||
<return type="Vector2i" />
|
||||
<description>
|
||||
Returns the mouse cursor's current position.
|
||||
Returns the mouse cursor's current position in screen coordinates.
|
||||
</description>
|
||||
</method>
|
||||
<method name="mouse_set_mode">
|
||||
@@ -943,7 +943,7 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="image" type="Image" />
|
||||
<description>
|
||||
Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. To use icons in the operating system's native format, use [method set_native_icon] instead.
|
||||
Sets the window icon (usually displayed in the top-left corner) with an [Image]. To use icons in the operating system's native format, use [method set_native_icon] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_native_icon">
|
||||
@@ -1037,8 +1037,8 @@
|
||||
<param index="1" name="callable" type="Callable" />
|
||||
<description>
|
||||
Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
|
||||
- [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance id.
|
||||
- [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance id.
|
||||
- [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance ID.
|
||||
- [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance ID.
|
||||
[b]Note:[/b] The granularity of the boundary callbacks is engine dependent.
|
||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
|
||||
</description>
|
||||
@@ -1575,7 +1575,7 @@
|
||||
Default landscape orientation.
|
||||
</constant>
|
||||
<constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation">
|
||||
Default portrait orienstation.
|
||||
Default portrait orientation.
|
||||
</constant>
|
||||
<constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
|
||||
Reverse landscape orientation (upside down).
|
||||
@@ -1694,7 +1694,7 @@
|
||||
[b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
|
||||
</constant>
|
||||
<constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
|
||||
The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
|
||||
The window can't be resized by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
|
||||
</constant>
|
||||
<constant name="WINDOW_FLAG_BORDERLESS" value="1" enum="WindowFlags">
|
||||
The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
|
||||
@@ -1711,7 +1711,7 @@
|
||||
The window can't be focused. No-focus window will ignore all input, except mouse clicks.
|
||||
</constant>
|
||||
<constant name="WINDOW_FLAG_POPUP" value="5" enum="WindowFlags">
|
||||
Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [method window_set_transient]).
|
||||
Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [method window_set_transient]).
|
||||
</constant>
|
||||
<constant name="WINDOW_FLAG_EXTEND_TO_TITLE" value="6" enum="WindowFlags">
|
||||
Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons.
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
The view format in which the [EditorFileDialog] displays resources to the user.
|
||||
</member>
|
||||
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="EditorFileDialog.FileMode" default="4">
|
||||
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
|
||||
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
|
||||
</member>
|
||||
<member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray()">
|
||||
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected.
|
||||
|
||||
@@ -64,7 +64,9 @@
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the editor is marked as self-contained, [code]false[/code] otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an [code]editor_data/[/code] folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects.
|
||||
Self-contained mode can be enabled by creating a file named [code]._sc_[/code] or [code]_sc_[/code] in the same folder as the editor binary while the editor is not running. See also [method get_self_contained_file].
|
||||
Self-contained mode can be enabled by creating a file named [code]._sc_[/code] or [code]_sc_[/code] in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also [method get_self_contained_file].
|
||||
[b]Note:[/b] On macOS, quarantine flag should be manually removed before using self-contained mode, see [url=https://docs.godotengine.org/en/stable/tutorials/export/running_on_macos.html]Running on macOS[/url].
|
||||
[b]Note:[/b] On macOS, placing [code]_sc_[/code] or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead.
|
||||
[b]Note:[/b] The Steam release of Godot uses self-contained mode by default.
|
||||
</description>
|
||||
</method>
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
[gdscript]
|
||||
extends EditorResourceConversionPlugin
|
||||
|
||||
func _handles(resource : Resource):
|
||||
func _handles(resource: Resource):
|
||||
return resource is ImageTexture
|
||||
|
||||
func _converts_to():
|
||||
return "PortableCompressedTexture2D"
|
||||
|
||||
func _convert(itex : Resource):
|
||||
func _convert(itex: Resource):
|
||||
var ptex = PortableCompressedTexture2D.new()
|
||||
ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS)
|
||||
return ptex
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<method name="get_changed_settings" qualifiers="const">
|
||||
<return type="PackedStringArray" />
|
||||
<description>
|
||||
Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]
|
||||
Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_favorites" qualifiers="const">
|
||||
@@ -295,7 +295,7 @@
|
||||
If [code]true[/code], render the grid on an XZ plane.
|
||||
</member>
|
||||
<member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
|
||||
If [code]true[/code], render the grid on an YZ plane. This can be useful for 3D side-scrolling games.
|
||||
If [code]true[/code], render the grid on a YZ plane. This can be useful for 3D side-scrolling games.
|
||||
</member>
|
||||
<member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
|
||||
If [code]true[/code], enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad.
|
||||
@@ -695,7 +695,7 @@
|
||||
If [code]true[/code], colors the background of the line the caret is currently on with [member text_editor/theme/highlighting/current_line_color].
|
||||
</member>
|
||||
<member name="text_editor/appearance/caret/type" type="int" setter="" getter="">
|
||||
The shape of the caret to use in the script editor. [b]Line[/b] displays a vertical line to the left of the current character, whereas [b]Block[/b] displays a outline over the current character.
|
||||
The shape of the caret to use in the script editor. [b]Line[/b] displays a vertical line to the left of the current character, whereas [b]Block[/b] displays an outline over the current character.
|
||||
</member>
|
||||
<member name="text_editor/appearance/guidelines/line_length_guideline_hard_column" type="int" setter="" getter="">
|
||||
The column at which to display a subtle line as a line length guideline for scripts. This should generally be greater than [member text_editor/appearance/guidelines/line_length_guideline_soft_column].
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
- If the object is a built-in resource, use the scene from its path;
|
||||
- If the object is external resource or anything else, use global history.
|
||||
This guessing can sometimes yield false results, so you can provide a custom context object when creating an action.
|
||||
[EditorUndoRedoManager] is intended to be used by Godot editor plugins. You can obtain it using [method EditorPlugin.get_undo_redo]. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use [UndoRedo] instead.
|
||||
The manager's API is mostly the same as in [UndoRedo], so you can refer to its documentation for more examples. The main difference is that [EditorUndoRedoManager] uses object + method name for actions, instead of [Callable].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<param index="0" name="remote" type="String" />
|
||||
<param index="1" name="force" type="bool" />
|
||||
<description>
|
||||
Pushes changes to the [code]remote[/code]. Optionally, if [code]force[/code] is set to true, a force push will override the change history already present on the remote.
|
||||
Pushes changes to the [param remote]. If [param force] is [code]true[/code], a force push will override the change history already present on the remote.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_remove_branch" qualifiers="virtual">
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
|
||||
</member>
|
||||
<member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0">
|
||||
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
|
||||
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects [Timer] and [SceneTreeTimer] (see [method SceneTree.create_timer] for how to control this).
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
[b]Note:[/b] SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.
|
||||
</member>
|
||||
<member name="ssr_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15">
|
||||
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
|
||||
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
|
||||
</member>
|
||||
<member name="ssr_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0">
|
||||
The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Evaluating Expressions">$DOCS_URL/tutorials/scripting/evaluating_expressions.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="execute">
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
</methods>
|
||||
<members>
|
||||
<member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access" default="0">
|
||||
The file system access scope. See enum [code]Access[/code] constants.
|
||||
The file system access scope. See [enum Access] constants.
|
||||
[b]Warning:[/b] Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url].
|
||||
</member>
|
||||
<member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir">
|
||||
@@ -74,7 +74,7 @@
|
||||
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected.
|
||||
</member>
|
||||
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
|
||||
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
|
||||
If [code]true[/code], changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
|
||||
</member>
|
||||
<member name="root_subfolder" type="String" setter="set_root_subfolder" getter="get_root_subfolder" default="""">
|
||||
If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory.
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="FileSystemDock" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Editor dock for managing files in the project.
|
||||
</brief_description>
|
||||
<description>
|
||||
This class is available only in [EditorPlugin]s and can't be instantiated. You can access it using [method EditorInterface.get_file_system_dock].
|
||||
While FileSystemDock doesn't expose any methods for file manipulation, you can listen for various file-related signals.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@@ -11,49 +14,58 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="path" type="String" />
|
||||
<description>
|
||||
Sets the given [param path] as currently selected, ensuring that the selected file/directory is visible.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<signals>
|
||||
<signal name="display_mode_changed">
|
||||
<description>
|
||||
Emitted when the user switches file display mode or split mode.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="file_removed">
|
||||
<param index="0" name="file" type="String" />
|
||||
<description>
|
||||
Emitted when the given [param file] was removed.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="files_moved">
|
||||
<param index="0" name="old_file" type="String" />
|
||||
<param index="1" name="new_file" type="String" />
|
||||
<description>
|
||||
Emitted when a file is moved from [param old_file] path to [param new_file] path.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="folder_moved">
|
||||
<param index="0" name="old_folder" type="String" />
|
||||
<param index="1" name="new_folder" type="String" />
|
||||
<description>
|
||||
Emitted when a folder is moved from [param old_folder] path to [param new_folder] path.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="folder_removed">
|
||||
<param index="0" name="folder" type="String" />
|
||||
<description>
|
||||
Emitted when the given [param folder] was removed.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="inherit">
|
||||
<param index="0" name="file" type="String" />
|
||||
<description>
|
||||
Emitted when a new scene is created that inherits the scene at [param file] path.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="instantiate">
|
||||
<param index="0" name="files" type="PackedStringArray" />
|
||||
<description>
|
||||
Emitted when the given scenes are being instantiated in the editor.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="resource_removed">
|
||||
<param index="0" name="resource" type="Resource" />
|
||||
<description>
|
||||
Emitted when an external [param resource] had its file removed.
|
||||
</description>
|
||||
</signal>
|
||||
</signals>
|
||||
|
||||
@@ -271,6 +271,17 @@
|
||||
<description>
|
||||
Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
|
||||
Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
|
||||
To print available variation axes of a variable font:
|
||||
[codeblock]
|
||||
var fv = FontVariation.new()
|
||||
fv.set_base_font = load("res://RobotoFlex.ttf")
|
||||
var variation_list = fv.get_supported_variation_list()
|
||||
for tag in variation_list:
|
||||
var name = TextServerManager.get_primary_interface().tag_to_name(tag)
|
||||
var values = variation_list[tag]
|
||||
print("variation axis: %s (%d)\n\tmin, max, default: %s" % [name, tag, values])
|
||||
[/codeblock]
|
||||
[b]Note:[/b] To set and get variation coordinates of a [FontVariation], use [member FontVariation.variation_opentype].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_underline_position" qualifiers="const">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
- Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
|
||||
- Monospace image font importer: All supported image formats.
|
||||
[b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
|
||||
[b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
|
||||
[b]Note:[/b] A glyph is a bitmap or shape used to draw one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
|
||||
[b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
GetNode("Label").AddThemeFontSizeOverride("font_size", 64);
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
To set the coordinate of multiple variation axes:
|
||||
[codeblock]
|
||||
var fv = FontVariation.new();
|
||||
var ts = TextServerManager.get_primary_interface()
|
||||
fv.base_font = load("res://BarlowCondensed-Regular.ttf")
|
||||
fv.variation_opentype = { ts.name_to_tag("wght"): 900, ts.name_to_tag("custom_hght"): 900 }
|
||||
[/codeblock]
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@@ -40,7 +47,7 @@
|
||||
Base font used to create a variation. If not set, default [Theme] font is used.
|
||||
</member>
|
||||
<member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
|
||||
Array of fallback [Font]s. If not set [member base_font] fallback are ussed.
|
||||
Array of fallback [Font]s to use as a substitute if a glyph is not found in this [FontVariation]. If not set, [member base_font]'s fallbacks are used instead.
|
||||
</member>
|
||||
<member name="opentype_features" type="Dictionary" setter="set_opentype_features" getter="get_opentype_features" default="{}">
|
||||
A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
|
||||
@@ -66,6 +73,8 @@
|
||||
</member>
|
||||
<member name="variation_opentype" type="Dictionary" setter="set_variation_opentype" getter="get_variation_opentype" default="{}">
|
||||
Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url].
|
||||
[b]Note:[/b] This [Dictionary] uses OpenType tags as keys. Variation axes can be identified both by tags([code]int[/code]) and names ([code]string[/code]). Some axes might be accessible by multiple names. For example, [code]wght[/code] refers to the same axis as [code]weight[/code]. Tags on the other hand are unique. To convert between names and tags, use [method TextServer.name_to_tag] and [method TextServer.tag_to_name].
|
||||
[b]Note:[/b] To get available variation axes of a font, use [method Font.get_supported_variation_list].
|
||||
</member>
|
||||
<member name="variation_transform" type="Transform2D" setter="set_variation_transform" getter="get_variation_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
|
||||
2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
Represents the size of the [enum Resolution] enum.
|
||||
</constant>
|
||||
<constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode">
|
||||
Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction.
|
||||
Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction, or by calling [method RenderingServer.particles_collision_height_field_update].
|
||||
</constant>
|
||||
<constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode">
|
||||
Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user