mirror of
https://github.com/godotengine/godot.git
synced 2025-10-15 02:49:24 +00:00
Compare commits
350 Commits
3.5
...
3.3.3-stab
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b973f997ff | ||
![]() |
6a2f135695 | ||
![]() |
f799163914 | ||
![]() |
dff81b25cd | ||
![]() |
a9bffd5878 | ||
![]() |
c55be95364 | ||
![]() |
62df64fe58 | ||
![]() |
8b07d65701 | ||
![]() |
2e8081cef2 | ||
![]() |
f604b32081 | ||
![]() |
1b51ba0157 | ||
![]() |
6bcd7f6b54 | ||
![]() |
1aa7f05dd9 | ||
![]() |
3b65adb00f | ||
![]() |
2667261520 | ||
![]() |
f66ff33b25 | ||
![]() |
f1bf894085 | ||
![]() |
2eb8875b77 | ||
![]() |
654d892570 | ||
![]() |
7054f93e10 | ||
![]() |
1f87904366 | ||
![]() |
f38abd593d | ||
![]() |
32bbe644ca | ||
![]() |
86466737ff | ||
![]() |
1c8682aa78 | ||
![]() |
afefa8f70f | ||
![]() |
d4eecf4535 | ||
![]() |
8c20e03150 | ||
![]() |
0c6b5bdfeb | ||
![]() |
a89346e227 | ||
![]() |
279af47ef9 | ||
![]() |
5da2675856 | ||
![]() |
64af5e5db4 | ||
![]() |
be6712fb3d | ||
![]() |
6cc9333fe8 | ||
![]() |
f20a2d3da7 | ||
![]() |
1785d3e030 | ||
![]() |
ed5b7e38ce | ||
![]() |
2cf58509dd | ||
![]() |
5acfb5127c | ||
![]() |
eaf45d4f60 | ||
![]() |
5b3f6a6d34 | ||
![]() |
520fa45f0d | ||
![]() |
994cafb9f1 | ||
![]() |
f26390769a | ||
![]() |
b0bb791e4a | ||
![]() |
2ac5a8dd2e | ||
![]() |
e78a8b2424 | ||
![]() |
bb14eb9743 | ||
![]() |
17fcd76a74 | ||
![]() |
54084ac70d | ||
![]() |
6b15d9a435 | ||
![]() |
6ff869eda7 | ||
![]() |
4bc527fedd | ||
![]() |
dec840452d | ||
![]() |
ea0bdb6860 | ||
![]() |
16fd1c421e | ||
![]() |
c5589c76ce | ||
![]() |
edef9a9c86 | ||
![]() |
620579eaf8 | ||
![]() |
73f40a1efc | ||
![]() |
5e3ed7e014 | ||
![]() |
321a4bfcd8 | ||
![]() |
7be11742b5 | ||
![]() |
f84de49718 | ||
![]() |
121af4a37d | ||
![]() |
6878fe6d88 | ||
![]() |
6a0155393a | ||
![]() |
c717c97819 | ||
![]() |
947c87d717 | ||
![]() |
03a6fe6489 | ||
![]() |
dd7bb8f965 | ||
![]() |
4641e6b170 | ||
![]() |
10d07e02f2 | ||
![]() |
c406c8512f | ||
![]() |
385b88fced | ||
![]() |
bd63402ed6 | ||
![]() |
4204c02fd1 | ||
![]() |
f862edd47c | ||
![]() |
c476459f2b | ||
![]() |
8c640b8204 | ||
![]() |
6cea423cc6 | ||
![]() |
9f68eb2e4c | ||
![]() |
f240d77e29 | ||
![]() |
ce71a883c7 | ||
![]() |
0647f46a67 | ||
![]() |
22a449c420 | ||
![]() |
1f649e9825 | ||
![]() |
e652218b1f | ||
![]() |
57189c114e | ||
![]() |
037a1d4f69 | ||
![]() |
d110182cfe | ||
![]() |
21c176165a | ||
![]() |
ff943359dc | ||
![]() |
6234f460b4 | ||
![]() |
92cdebe1ac | ||
![]() |
a9e0a4bd12 | ||
![]() |
752c1451db | ||
![]() |
1856be7a0e | ||
![]() |
4d48e33345 | ||
![]() |
1e14bd655e | ||
![]() |
051c5a7ed9 | ||
![]() |
1594678ed5 | ||
![]() |
ad95bb52d6 | ||
![]() |
1c840a31a5 | ||
![]() |
c0ab0df9dc | ||
![]() |
6250a33c61 | ||
![]() |
db42629cef | ||
![]() |
859dba0dd6 | ||
![]() |
cca999c007 | ||
![]() |
f0dcedbf3a | ||
![]() |
c2a92d93f2 | ||
![]() |
00ed053486 | ||
![]() |
7abe93ecf2 | ||
![]() |
85fb2ea8b4 | ||
![]() |
bdcdfb0db7 | ||
![]() |
28ea0cf1e2 | ||
![]() |
686a27b278 | ||
![]() |
c90766cc38 | ||
![]() |
54eef268c0 | ||
![]() |
ecf4557348 | ||
![]() |
47a0490ff3 | ||
![]() |
c43d33fa60 | ||
![]() |
30bb133e01 | ||
![]() |
1a6c44aaf3 | ||
![]() |
7c8bbfadca | ||
![]() |
25bf30da53 | ||
![]() |
9c1580579c | ||
![]() |
da03374563 | ||
![]() |
747450a777 | ||
![]() |
e0223edafc | ||
![]() |
6f58cfd077 | ||
![]() |
9933553268 | ||
![]() |
e5265a9bc3 | ||
![]() |
5ba710863d | ||
![]() |
e1bc053496 | ||
![]() |
288ce3c4b1 | ||
![]() |
e39d59b43e | ||
![]() |
aeb8cf2d2b | ||
![]() |
5359b1dcc1 | ||
![]() |
7a8020ea67 | ||
![]() |
6c7d52164a | ||
![]() |
5c36619bdd | ||
![]() |
2e1e8eb2e1 | ||
![]() |
c652cb62db | ||
![]() |
0938958111 | ||
![]() |
cefef7db05 | ||
![]() |
f12df328f0 | ||
![]() |
64cfd5cbaa | ||
![]() |
c1b2bd6fb6 | ||
![]() |
f36a3c67e3 | ||
![]() |
87883f8b0d | ||
![]() |
336a381486 | ||
![]() |
dc203b0d13 | ||
![]() |
461e79bd18 | ||
![]() |
a40b59d270 | ||
![]() |
5dcbe95758 | ||
![]() |
e8759f218d | ||
![]() |
e583888573 | ||
![]() |
0cb19bc69c | ||
![]() |
fbe8226213 | ||
![]() |
6f63b0c9ae | ||
![]() |
915865b279 | ||
![]() |
286ab2aa5c | ||
![]() |
984fa91a0f | ||
![]() |
2760de8710 | ||
![]() |
65e14eb8de | ||
![]() |
0b594bf3c8 | ||
![]() |
a812779cc5 | ||
![]() |
6bf3a162cd | ||
![]() |
fbba61998a | ||
![]() |
1114c248b1 | ||
![]() |
018ca6b1c4 | ||
![]() |
ca465ef54d | ||
![]() |
5738d6ee6e | ||
![]() |
fab9c19d2e | ||
![]() |
089fde5c59 | ||
![]() |
6a98050afa | ||
![]() |
b45fb53896 | ||
![]() |
aa4afee320 | ||
![]() |
e5dc7a06a9 | ||
![]() |
3c55a9c210 | ||
![]() |
f7e9467441 | ||
![]() |
f1ca7c5e98 | ||
![]() |
05b72c2e9b | ||
![]() |
c45ce8b6bb | ||
![]() |
5b3f94e807 | ||
![]() |
843e6bbd6b | ||
![]() |
7674015231 | ||
![]() |
a34c0a9248 | ||
![]() |
0446cf487f | ||
![]() |
b9e8fa4504 | ||
![]() |
41206078dd | ||
![]() |
593b3272f6 | ||
![]() |
1f2e0c67b0 | ||
![]() |
3b29aac348 | ||
![]() |
65d9992fb6 | ||
![]() |
2ce5515762 | ||
![]() |
f901049a0d | ||
![]() |
d043b5d71c | ||
![]() |
0d5be76f15 | ||
![]() |
3574c87888 | ||
![]() |
b9492b2659 | ||
![]() |
c680057dad | ||
![]() |
da2f17ae19 | ||
![]() |
59745c9286 | ||
![]() |
c3f2eb9291 | ||
![]() |
d5089c4e4e | ||
![]() |
30dfb51048 | ||
![]() |
3117f04759 | ||
![]() |
7610409b8a | ||
![]() |
bc5ac12bdb | ||
![]() |
2c99306e20 | ||
![]() |
2c520fb732 | ||
![]() |
2857840754 | ||
![]() |
f87096ecea | ||
![]() |
5b8b3f645e | ||
![]() |
20dfa4ceaa | ||
![]() |
738d0b7f63 | ||
![]() |
7678e73398 | ||
![]() |
d36ab91461 | ||
![]() |
997f8f5d29 | ||
![]() |
2ec691e274 | ||
![]() |
01ce818c7b | ||
![]() |
e14d5062f7 | ||
![]() |
418e044789 | ||
![]() |
274e251d30 | ||
![]() |
c1827b872d | ||
![]() |
9b8a099bd1 | ||
![]() |
a1af387177 | ||
![]() |
337ef03958 | ||
![]() |
066ceefcaf | ||
![]() |
5602deeb0f | ||
![]() |
4ed50733fd | ||
![]() |
f89120b895 | ||
![]() |
7339de9dbb | ||
![]() |
80f74aac0f | ||
![]() |
2df6731281 | ||
![]() |
af6c50b0e5 | ||
![]() |
0f3f706ca6 | ||
![]() |
4da4277dc9 | ||
![]() |
3698298326 | ||
![]() |
bcedd09742 | ||
![]() |
d006f50db3 | ||
![]() |
c3732f0da8 | ||
![]() |
628265be44 | ||
![]() |
5445d04fbe | ||
![]() |
4601328542 | ||
![]() |
a2b4093a50 | ||
![]() |
757c2c0e77 | ||
![]() |
c804baf6a9 | ||
![]() |
f6c29d1cf5 | ||
![]() |
26efa5c690 | ||
![]() |
164fd19bb5 | ||
![]() |
77e3b51627 | ||
![]() |
75cd0dc950 | ||
![]() |
2784697b96 | ||
![]() |
70a2b746a3 | ||
![]() |
07870cf7d1 | ||
![]() |
4b221df06d | ||
![]() |
9602dfad90 | ||
![]() |
025a380d1f | ||
![]() |
57f271f03a | ||
![]() |
746b9b03dd | ||
![]() |
3624abd613 | ||
![]() |
c93b8be3b6 | ||
![]() |
d1ac177f98 | ||
![]() |
140cf0f2cb | ||
![]() |
5193c3c8eb | ||
![]() |
6f780d7e3a | ||
![]() |
dd20139901 | ||
![]() |
3299600093 | ||
![]() |
7eacb604b1 | ||
![]() |
0a7193c5f4 | ||
![]() |
3fc59fbcc7 | ||
![]() |
488f448fbb | ||
![]() |
b622a9e359 | ||
![]() |
e6cbb4d460 | ||
![]() |
88210227dc | ||
![]() |
5514b16950 | ||
![]() |
523faf0444 | ||
![]() |
bb6b38680c | ||
![]() |
e6186dad59 | ||
![]() |
e9c8889ae8 | ||
![]() |
feaf4e6207 | ||
![]() |
edd63aeefa | ||
![]() |
476bc5191b | ||
![]() |
7e22dfdd05 | ||
![]() |
7c5633c032 | ||
![]() |
b1cb84b452 | ||
![]() |
b4529c7e8d | ||
![]() |
ba4f15b376 | ||
![]() |
6a84390cd6 | ||
![]() |
b97b37f91c | ||
![]() |
1cfed0d583 | ||
![]() |
4b8a1d21f3 | ||
![]() |
06136d433b | ||
![]() |
c5332b1d7a | ||
![]() |
3c089f6a4f | ||
![]() |
508cd0bb12 | ||
![]() |
045b85b6e0 | ||
![]() |
62d80ba15d | ||
![]() |
703c290b71 | ||
![]() |
387d2a69ca | ||
![]() |
44a4df0476 | ||
![]() |
839f602859 | ||
![]() |
a93f52ee7e | ||
![]() |
dacd16fd33 | ||
![]() |
87aa694ae5 | ||
![]() |
edf5a03714 | ||
![]() |
2bd40b4c9c | ||
![]() |
e4cbf9c58a | ||
![]() |
8dc3d5eb7a | ||
![]() |
31bc9d859b | ||
![]() |
08bedba341 | ||
![]() |
42c88d99ae | ||
![]() |
05a8ddf3d2 | ||
![]() |
7212256496 | ||
![]() |
00b70f60bb | ||
![]() |
46a5f3a18e | ||
![]() |
890ec03431 | ||
![]() |
dbf71c1b70 | ||
![]() |
278af7d023 | ||
![]() |
88cfde0aba | ||
![]() |
cde16a994c | ||
![]() |
f172123a7a | ||
![]() |
feac30b96a | ||
![]() |
5a26bcda12 | ||
![]() |
d8607d8045 | ||
![]() |
84dc716d0d | ||
![]() |
3f3108006f | ||
![]() |
1d8d7b0d4b | ||
![]() |
d696d89bc8 | ||
![]() |
3111910331 | ||
![]() |
3ab33d3ce9 | ||
![]() |
7a6a150bc2 | ||
![]() |
9201ffa9a2 | ||
![]() |
bceaef6500 | ||
![]() |
dc98144b99 | ||
![]() |
3b44829fbd | ||
![]() |
5e16b10824 | ||
![]() |
162c78f9dc | ||
![]() |
aa84787fb4 | ||
![]() |
1e3166115a | ||
![]() |
66625962bf | ||
![]() |
33d6b1f68f | ||
![]() |
bcbf7ce3b6 | ||
![]() |
b616f41573 | ||
![]() |
e86d086573 | ||
![]() |
0ecbf77e30 |
7
.github/workflows/android_builds.yml
vendored
7
.github/workflows/android_builds.yml
vendored
@@ -6,7 +6,6 @@ env:
|
||||
GODOT_BASE_BRANCH: 3.x
|
||||
SCONSFLAGS: platform=android verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
||||
SCONS_CACHE_LIMIT: 4096
|
||||
ANDROID_NDK_VERSION: 21.1.6352462
|
||||
|
||||
jobs:
|
||||
android-template:
|
||||
@@ -29,10 +28,6 @@ jobs:
|
||||
with:
|
||||
java-version: 8
|
||||
|
||||
- name: Install Android NDK r21
|
||||
run: |
|
||||
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install 'ndk;${{env.ANDROID_NDK_VERSION}}'
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: android-template-cache
|
||||
@@ -44,6 +39,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
@@ -64,7 +60,6 @@ jobs:
|
||||
- name: Compilation
|
||||
env:
|
||||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
||||
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/${{env.ANDROID_NDK_VERSION}}/
|
||||
run: |
|
||||
scons target=release tools=no android_arch=armv7
|
||||
scons target=release tools=no android_arch=arm64v8
|
||||
|
1
.github/workflows/ios_builds.yml
vendored
1
.github/workflows/ios_builds.yml
vendored
@@ -26,6 +26,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
|
3
.github/workflows/javascript_builds.yml
vendored
3
.github/workflows/javascript_builds.yml
vendored
@@ -6,7 +6,7 @@ env:
|
||||
GODOT_BASE_BRANCH: 3.x
|
||||
SCONSFLAGS: platform=javascript verbose=yes warnings=all werror=yes debug_symbols=no --jobs=2
|
||||
SCONS_CACHE_LIMIT: 4096
|
||||
EM_VERSION: 1.39.20
|
||||
EM_VERSION: 2.0.15
|
||||
EM_CACHE_FOLDER: 'emsdk-cache'
|
||||
|
||||
jobs:
|
||||
@@ -35,6 +35,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Additional cache for Emscripten generated system libraries
|
||||
- name: Load Emscripten cache
|
||||
|
29
.github/workflows/linux_builds.yml
vendored
29
.github/workflows/linux_builds.yml
vendored
@@ -39,6 +39,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
@@ -104,6 +105,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
@@ -167,6 +169,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
@@ -193,18 +196,30 @@ jobs:
|
||||
scons tools=yes target=debug use_asan=yes use_ubsan=yes
|
||||
ls -l bin/
|
||||
|
||||
# Download and test project to check leaks and invalid memory usage.
|
||||
# Download test project
|
||||
# CI has no audio device, so use the Dummy audio driver to avoid spurious error messages.
|
||||
- name: Importing and running project project
|
||||
- name: Download project
|
||||
run: |
|
||||
wget2 https://github.com/qarmin/RegressionTestProject/archive/3.x.zip
|
||||
unzip 3.x.zip
|
||||
mv "RegressionTestProject-3.x" "test_project"
|
||||
wget2 https://github.com/qarmin/RegressionTestProject/archive/3.3.zip
|
||||
unzip 3.3.zip
|
||||
mv "RegressionTestProject-3.3" "test_project"
|
||||
|
||||
echo "----- Open editor to check for memory leaks -----"
|
||||
# Editor is quite complicated piece of software, so it is easy to introduce bug here
|
||||
- name: Open and close editor
|
||||
run: |
|
||||
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/scripts/check_ci_log.py sanitizers_log.txt
|
||||
|
||||
echo "----- Run and test project -----"
|
||||
# Run test project
|
||||
- name: Run project
|
||||
run: |
|
||||
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s 30 --video-driver GLES3 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
|
||||
misc/scripts/check_ci_log.py sanitizers_log.txt
|
||||
|
||||
# Check class reference
|
||||
- name: Check for class reference updates
|
||||
run: |
|
||||
echo "Running --doctool to see if this changes the public API without updating the documentation."
|
||||
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
|
||||
DRI_PRIME=0 xvfb-run bin/godot.x11.tools.64s --doctool . 2>&1 > /dev/null || true
|
||||
git diff --color --exit-code
|
||||
|
2
.github/workflows/macos_builds.yml
vendored
2
.github/workflows/macos_builds.yml
vendored
@@ -27,6 +27,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
@@ -77,6 +78,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
|
2
.github/workflows/server_builds.yml
vendored
2
.github/workflows/server_builds.yml
vendored
@@ -38,6 +38,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
@@ -93,6 +94,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
|
6
.github/workflows/windows_builds.yml
vendored
6
.github/workflows/windows_builds.yml
vendored
@@ -32,6 +32,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
@@ -46,7 +47,7 @@ jobs:
|
||||
- name: Configuring Python packages
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons pywin32
|
||||
python -m pip install scons
|
||||
python --version
|
||||
scons --version
|
||||
|
||||
@@ -83,6 +84,7 @@ jobs:
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
|
||||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}
|
||||
continue-on-error: true
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
@@ -97,7 +99,7 @@ jobs:
|
||||
- name: Configuring Python packages
|
||||
run: |
|
||||
python -c "import sys; print(sys.version)"
|
||||
python -m pip install scons pywin32
|
||||
python -m pip install scons
|
||||
python --version
|
||||
scons --version
|
||||
|
||||
|
5
.mailmap
5
.mailmap
@@ -32,6 +32,7 @@ Erik Selecký <35656626+rxlecky@users.noreply.github.com> <35656626+SeleckyErik@
|
||||
Fabian <supagu@gmail.com>
|
||||
Ferenc Arn <tagcup@yahoo.com>
|
||||
Ferenc Arn <tagcup@yahoo.com> <tagcup@users.noreply.github.com>
|
||||
foxydevloper <12120644+foxydevloper@users.noreply.github.com>
|
||||
Fredia Huya-Kouadio <fhuyakou@gmail.com>
|
||||
Fredia Huya-Kouadio <fhuyakou@gmail.com> <fhuya@google.com>
|
||||
Geequlim <geequlim@gmail.com>
|
||||
@@ -56,6 +57,7 @@ Indah Sylvia <ISylvox@yahoo.com>
|
||||
J08nY <johny@neuromancer.sk> <jancar.jj@gmail.com>
|
||||
J08nY <johny@neuromancer.sk> <J08nY@users.noreply.github.com>
|
||||
Jakub Grzesik <kubecz3k@gmail.com>
|
||||
janglee <merupatel123@gmail.com>
|
||||
Jérôme Gully <jerome.gully0@gmail.com>
|
||||
JFonS <joan.fonssanchez@gmail.com>
|
||||
Juan Linietsky <reduzio@gmail.com>
|
||||
@@ -68,6 +70,7 @@ Kanabenki <lucien.menassol@gmail.com> <18357657+Kanabenki@users.noreply.github.c
|
||||
Kelly Thomas <kelly.thomas@hotmail.com.au>
|
||||
Kongfa Waroros <gongpha@hotmail.com>
|
||||
K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
|
||||
kleonc <9283098+kleonc@users.noreply.github.com> <kleonc@users.noreply.github.com>
|
||||
Leon Krause <lk@leonkrause.com> <eska@eska.me>
|
||||
Leon Krause <lk@leonkrause.com> <eska014@users.noreply.github.com>
|
||||
Liz Haas <27thLiz@gmail.com>
|
||||
@@ -91,9 +94,11 @@ Michael Alexsander <michaelalexsander@protonmail.com>
|
||||
Nathan Franke <natfra@pm.me> <nathanwfranke@gmail.com>
|
||||
Nathan Lovato <nathan@gdquest.com>
|
||||
Nathan Warden <nathan@nathanwarden.com> <nathanwardenlee@icloud.com>
|
||||
Nicholas Huelin <62965063+SirQuartz@users.noreply.github.com>
|
||||
Nils ANDRÉ-CHANG <nils@nilsand.re>
|
||||
Nils ANDRÉ-CHANG <nils@nilsand.re> <nils.andre.chang@gmail.com>
|
||||
Nuno Donato <nunodonato@gmail.com> <n.donato@estrelasustentavel.pt>
|
||||
Pawel Kowal <pkowal1982@gmail.com>
|
||||
Pedro J. Estébanez <pedrojrulez@gmail.com> <RandomShaper@users.noreply.github.com>
|
||||
Paul Batty <p_batty@hotmail.co.uk>
|
||||
Paul Batty <p_batty@hotmail.co.uk> <Paulb23@users.noreply.github.com>
|
||||
|
17
AUTHORS.md
17
AUTHORS.md
@@ -28,12 +28,14 @@ name is available.
|
||||
(in alphabetical order, with over 10 commits excluding merges)
|
||||
|
||||
Aaron Franke (aaronfranke)
|
||||
Aaron Record (LightningAA)
|
||||
Alexander Holland (AlexHolly)
|
||||
Alexey Khoroshavin (allkhor)
|
||||
Alket Rexhepi (alketii)
|
||||
Andrea Catania (AndreaCatania)
|
||||
Andrii Doroshenko (Xrayez)
|
||||
Andy Moss (MillionOstrich)
|
||||
Angad Kambli (angad-k)
|
||||
Anish Bhobe (KidRigger)
|
||||
Anton Yabchinskiy (a12n)
|
||||
Anutrix
|
||||
@@ -43,6 +45,7 @@ name is available.
|
||||
Ben Brookshire (sheepandshepherd)
|
||||
Benjamin Larsson (Nallebeorn)
|
||||
Bernard Liebl (poke1024)
|
||||
Bhuvan Vemula (Bhu1-V)
|
||||
Błażej Szczygieł (zaps166)
|
||||
Bojidar Marinov (bojidar-bg)
|
||||
Bruno Lourenço (MadEqua)
|
||||
@@ -64,6 +67,7 @@ name is available.
|
||||
Dmitry Koteroff (Krakean)
|
||||
Dominik Jasiński (dreamsComeTrue)
|
||||
DualMatrix
|
||||
Ellen Poe (ellenhp)
|
||||
Emmanuel Barroga (codecustard)
|
||||
Emmanuel Leblond (touilleMan)
|
||||
Eoin O'Neill (Eoin-ONeill-Yokai)
|
||||
@@ -74,7 +78,11 @@ name is available.
|
||||
est31
|
||||
Fabian Mathews (supagu)
|
||||
Fabio Alessandrelli (Faless)
|
||||
fabriceci
|
||||
Ferenc Arn (tagcup)
|
||||
follower
|
||||
foxydevloper
|
||||
François Belair (Razoric480)
|
||||
Franklin Sobrinho (TheHX)
|
||||
Fredia Huya-Kouadio (m4gr3d)
|
||||
Geequlim
|
||||
@@ -86,8 +94,11 @@ name is available.
|
||||
Hanif Bin Ariffin (hbina)
|
||||
Haoyu Qiu (timothyqiu)
|
||||
Hein-Pieter van Braam-Stewart (hpvb)
|
||||
Hendrik Brucker (Geometror)
|
||||
hilfazer
|
||||
Hiroshi Ogawa (hi-ogawa)
|
||||
homer666
|
||||
hoontee
|
||||
Hubert Jarosz (Marqin)
|
||||
Hugo Locurcio (Calinou)
|
||||
Ian Bishop (ianb96)
|
||||
@@ -107,8 +118,10 @@ name is available.
|
||||
Joshua Grams (JoshuaGrams)
|
||||
Juan Linietsky (reduz)
|
||||
Julian Murgia (StraToN)
|
||||
Julien Nguyen (Blackiris)
|
||||
Justo Delgado (mrcdk)
|
||||
Kelly Thomas (KellyThomas)
|
||||
kleonc
|
||||
Kongfa Waroros (gongpha)
|
||||
Kostadin Damyanov (Max-Might)
|
||||
K. S. Ernest (iFire) Lee (fire)
|
||||
@@ -137,6 +150,7 @@ name is available.
|
||||
Matthias Hölzl (hoelzl)
|
||||
Max Hilbrunner (mhilbrunner)
|
||||
merumelu
|
||||
Meru Patel (Janglee123)
|
||||
Michael Alexsander (YeldhamDev)
|
||||
MichiRecRoom (LikeLakers2)
|
||||
mrezai
|
||||
@@ -144,6 +158,7 @@ name is available.
|
||||
Nathan Franke (nathanfranke)
|
||||
Nathan Lovato (NathanLovato)
|
||||
Nathan Warden (NathanWarden)
|
||||
Nicholas Huelin (SirQuartz)
|
||||
Nils André-Chang (NilsIrl)
|
||||
Noah Beard (TwistedTwigleg)
|
||||
Nuno Donato (nunodonato)
|
||||
@@ -181,12 +196,14 @@ name is available.
|
||||
Stijn Hinlopen (hinlopen)
|
||||
Swarnim Arun (minraws)
|
||||
Thakee Nathees (ThakeeNathees)
|
||||
thebestnom
|
||||
Theo Hallenius (TheoXD)
|
||||
Thomas Herzog (karroffel)
|
||||
Timo Schwarzer (timoschwarzer)
|
||||
Timo (toger5)
|
||||
Tomasz Chabora (KoBeWi)
|
||||
Twarit Waikar (IronicallySerious)
|
||||
Umang Kalra (theoway)
|
||||
Vinzenz Feenstra (vinzenz)
|
||||
박한얼 (volzhs)
|
||||
V. Vamsi Krishna (vkbsb)
|
||||
|
266
CHANGELOG.md
266
CHANGELOG.md
@@ -4,6 +4,260 @@ 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/).
|
||||
|
||||
|
||||
## [3.3.3] - 2021-08-19
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-3-3) for details.
|
||||
|
||||
### Added
|
||||
|
||||
#### Input
|
||||
|
||||
- [Add `action_get_deadzone()` method to InputMap](https://github.com/godotengine/godot/pull/50065).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [Android: Add partial support for Android scoped storage](https://github.com/godotengine/godot/pull/50359).
|
||||
|
||||
### Changed
|
||||
|
||||
#### Nodes
|
||||
|
||||
- [GraphEdit: Allow higher and lower maximum zoom values](https://github.com/godotengine/godot/pull/49437).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [Android: Target API level 30, raise min API level to 19](https://github.com/godotengine/godot/pull/50359).
|
||||
- [HTML5: Raise default initial memory to 32 MiB](https://github.com/godotengine/godot/pull/50422).
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Audio
|
||||
|
||||
- [Fix cubic resampling algorithm](https://github.com/godotengine/godot/pull/51082).
|
||||
|
||||
#### Core
|
||||
|
||||
- [Save binary `ProjectSettings` key length properly](https://github.com/godotengine/godot/pull/49649).
|
||||
|
||||
#### C#
|
||||
|
||||
- [Fix C# bindings generator for default value types](https://github.com/godotengine/godot/pull/49702).
|
||||
- [Ignore paths with invalid chars in `PathWhich`](https://github.com/godotengine/godot/pull/50918).
|
||||
|
||||
#### Editor
|
||||
|
||||
- [Fix slow load/save of scenes with many instances of the same script](https://github.com/godotengine/godot/pull/49570).
|
||||
- [Fix logic for showing tilemap debug collision](https://github.com/godotengine/godot/pull/49075).
|
||||
- [Fix handling of HiDPI scaling for the curve editor's handles](https://github.com/godotengine/godot/pull/50627).
|
||||
|
||||
#### GDScript
|
||||
|
||||
- [LSP: Translate file path to URI on LSP symbol requests](https://github.com/godotengine/godot/pull/49687).
|
||||
- [LSP: Implement `didClose` notification](https://github.com/godotengine/godot/pull/50277).
|
||||
- LSP: Fix [`SymbolKind` reporting wrong types](https://github.com/godotengine/godot/pull/50914) and [`get_node()` parsing](https://github.com/godotengine/godot/pull/51283).
|
||||
|
||||
#### Import
|
||||
|
||||
- [glTF: Fix mesh nodes which are also bones](https://github.com/godotengine/godot/pull/49119).
|
||||
- [Fix loading RLE compressed TGA files](https://github.com/godotengine/godot/pull/49603).
|
||||
|
||||
#### Input
|
||||
|
||||
- [Fix game controllers ignoring the last listed button](https://github.com/godotengine/godot/pull/48934).
|
||||
|
||||
#### Networking
|
||||
|
||||
- [Fix parsing some IPv6 URLs for WebSocket](https://github.com/godotengine/godot/pull/48205).
|
||||
- [WebsocketPeer outbound buffer fixes and buffer size query](https://github.com/godotengine/godot/pull/51037).
|
||||
- [Fix IP address resolution incorrectly locking the main thread](https://github.com/godotengine/godot/pull/51212).
|
||||
|
||||
#### Nodes
|
||||
|
||||
- [GridMap: Fix erasing octants in the wrong order](https://github.com/godotengine/godot/pull/50052).
|
||||
- [PathFollow: Fix forward calculation for the position at the end of the curve](https://github.com/godotengine/godot/pull/50986).
|
||||
- [RichTextLabel: Fix auto-wrapping on CJK texts](https://github.com/godotengine/godot/pull/49280).
|
||||
- [SkeletonIK: Fixed issue where bones become detached if multiple SkeletonIK nodes are used](https://github.com/godotengine/godot/pull/49031).
|
||||
|
||||
#### Physics
|
||||
|
||||
- [Avoid NaNs when calculating inertias for bodies without mass/area](https://github.com/godotengine/godot/pull/49185).
|
||||
- [Ignore disabled shapes for mass property calculations](https://github.com/godotengine/godot/pull/49699).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [Android: Add GDNative libraries to Android custom Gradle builds](https://github.com/godotengine/godot/pull/49912).
|
||||
- [Android: Disable resource optimizations for legacy release builds](https://github.com/godotengine/godot/pull/50664).
|
||||
- [Android: Resolve issue where the Godot app remains stuck when resuming](https://github.com/godotengine/godot/pull/51584).
|
||||
- [iOS: Fix plugin configuration loading](https://github.com/godotengine/godot/pull/50433).
|
||||
- [iOS: Remove duplicate orientation settings in the iOS export preset](https://github.com/godotengine/godot/pull/48943).
|
||||
- [Linux: Fix crash when using ALSA MIDI with PulseAudio](https://github.com/godotengine/godot/pull/48350).
|
||||
- [macOS: Fix custom mouse cursor not set after mouse mode change](https://github.com/godotengine/godot/pull/49848).
|
||||
- [Windows: Fix platform file access to allow file sharing with external programs](https://github.com/godotengine/godot/pull/51430).
|
||||
- [Windows: Fix code signing with `osslsigncode` from Linux/macOS](https://github.com/godotengine/godot/pull/49985).
|
||||
- [Fix `Directory::get_space_left()` result on macOS and Linux](https://github.com/godotengine/godot/pull/49222).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- [Fix potential BakedLightmap crash](https://github.com/godotengine/godot/pull/50150).
|
||||
- [VisualServer now sorts based on AABB position](https://github.com/godotengine/godot/pull/43506).
|
||||
- [Fixes depth sorting of meshes with transparent textures](https://github.com/godotengine/godot/pull/50721).
|
||||
- [Fix CanvasItem bounding rect calculation in some cases](https://github.com/godotengine/godot/pull/49160).
|
||||
- [Fix flipped binormal in SpatialMaterial triplanar mapping](https://github.com/godotengine/godot/pull/49950).
|
||||
|
||||
#### Thirdparty
|
||||
|
||||
- mbedtls updated to version 2.16.11 (security fix).
|
||||
- CA root certificates updated to 2021-07-05 bundle from Mozilla.
|
||||
|
||||
|
||||
## [3.3.2] - 2021-05-24
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-3-2) for details.
|
||||
|
||||
### Added
|
||||
|
||||
#### GDScript
|
||||
|
||||
- [Allow `warning-ignore` in the same line as the respective warning](https://github.com/godotengine/godot/pull/47863).
|
||||
|
||||
#### Import
|
||||
|
||||
- [Print a warning when importing a repeating NPOT texture in a GLES2 project](https://github.com/godotengine/godot/pull/48817).
|
||||
|
||||
### Changed
|
||||
|
||||
#### Editor
|
||||
|
||||
- [Remove high radiance sizes from the editor due to issues on specific GPUs](https://github.com/godotengine/godot/pull/48906).
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Build system
|
||||
|
||||
- [Android: Remove `-fno-integrated-as`, it can break arm64v8 build](https://github.com/godotengine/godot/pull/48851).
|
||||
- [HTML5: Fix GDNative build with Emscripten 2.0.19+](https://github.com/godotengine/godot/pull/48831).
|
||||
- [Windows: Fix Embree crash when building with MinGW](https://github.com/godotengine/godot/pull/48888).
|
||||
* Official builds are made with MinGW, and Godot 3.3.1 was thus subject to this [crash when baking lightmaps](https://github.com/godotengine/godot/issues/48822).
|
||||
|
||||
#### Core
|
||||
|
||||
- [Fix STL to Godot type conversion of polypartition](https://github.com/godotengine/godot/pull/48921).
|
||||
- [Fix duplicate close file when deconstructing ZipArchive](https://github.com/godotengine/godot/pull/49013).
|
||||
* This would trigger a crash in Godot 3.3.1 when [exiting a project running from a ZIP data pack](https://github.com/godotengine/godot/issues/49012).
|
||||
|
||||
#### Editor
|
||||
|
||||
- [Fix swapped front/rear directions in viewport rotation control](https://github.com/godotengine/godot/pull/48895).
|
||||
- [Fix editor crash when exporting profiler data](https://github.com/godotengine/godot/pull/48917).
|
||||
|
||||
#### Import
|
||||
|
||||
- glTF: Improved error handling around [invalid images](https://github.com/godotengine/godot/pull/48904) and [invalid meshes](https://github.com/godotengine/godot/pull/48912).
|
||||
- [glTF: Fix incorrect skin deduplication when using named binds](https://github.com/godotengine/godot/pull/48913).
|
||||
|
||||
#### Physics
|
||||
|
||||
- [Fix ragdoll simulation when parent was readded to scene](https://github.com/godotengine/godot/pull/48823).
|
||||
- [Fix crash on debug shapes update if CollisionObject is not in tree](https://github.com/godotengine/godot/pull/48974).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [macOS: Allow "on top" windows to enter full-screen mode](https://github.com/godotengine/godot/pull/49017).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- [Batching: Fix `item_batch_flags` stale state causing glitches](https://github.com/godotengine/godot/pull/48992).
|
||||
|
||||
|
||||
## [3.3.1] - 2021-05-18
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-3-1) for details.
|
||||
|
||||
### Added
|
||||
|
||||
#### Build system
|
||||
|
||||
- [Android: Allow building template with debug symbols using `gradlew generateDevTemplate`](https://github.com/godotengine/godot/pull/48276).
|
||||
|
||||
#### Core
|
||||
|
||||
- [Expose `Shape.get_debug_mesh()` to the scripting API](https://github.com/godotengine/godot/pull/48316).
|
||||
|
||||
#### Editor
|
||||
|
||||
- [Add Ctrl+Shift+A shortcut to instance a scene in the Scene Tree dock](https://github.com/godotengine/godot/pull/47530).
|
||||
- [Allow negative contrast values in the editor theme settings](https://github.com/godotengine/godot/pull/48540).
|
||||
- [TileMap: Apply modulate on autotile previews](https://github.com/godotengine/godot/pull/48403).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [Add support for ARM64 architecture for the Embree raycaster (Apple M1, Linux aarch64)](https://github.com/godotengine/godot/pull/48455).
|
||||
* Note that the OIDN denoiser is still not available on this architecture.
|
||||
|
||||
### Changed
|
||||
|
||||
#### Physics
|
||||
|
||||
- [Create `CollisionObject` debug shapes using `VisualServer`](https://github.com/godotengine/godot/pull/48588).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [HTML5: Use 64KiB chunk size in JS HTTPClient, for consistency with native platforms](https://github.com/godotengine/godot/pull/48501).
|
||||
|
||||
### Fixed
|
||||
|
||||
#### Animation
|
||||
|
||||
- [Fix SkeletonIK root bones being twisted incorrectly when rotated](https://github.com/godotengine/godot/pull/48251).
|
||||
- [Fix skinning initialization in `MeshInstance` when loaded from thread](https://github.com/godotengine/godot/pull/48217).
|
||||
|
||||
#### Build system
|
||||
|
||||
- [HTML5: Fix build with Emscripten 2.0.17+](https://github.com/godotengine/godot/pull/48320).
|
||||
* We recommend using Emscripten 2.0.15 for this release, which is the one used in official builds.
|
||||
- Linux: Fix 32-bit builds' compatibility with older libstdc++. The official builds should be compatibile with Ubuntu 16.04 LTS and any other distribution published since 2016.
|
||||
- Various compilation fixes for some platforms/compilers, and Linux packaging fixes.
|
||||
|
||||
#### Core
|
||||
|
||||
- [Fix ZIP files being opened with two file descriptors](https://github.com/godotengine/godot/pull/42337).
|
||||
- [Fix calculation of PrismMesh normals](https://github.com/godotengine/godot/pull/48775).
|
||||
- [Fix CSG Path Polygon cache being removed after connect](https://github.com/godotengine/godot/pull/48232).
|
||||
- [LineEdit: Fix double click to select words and triple click to select whole line](https://github.com/godotengine/godot/pull/46527).
|
||||
|
||||
#### Editor
|
||||
|
||||
- [Fix race condition in font preview generation which could lock the editor on first edit](https://github.com/godotengine/godot/pull/48308).
|
||||
- [Fix 3D scene preview generation](https://github.com/godotengine/godot/pull/47172).
|
||||
- [Fix display of programmatically created value in remote inspector](https://github.com/godotengine/godot/pull/44657).
|
||||
- [Make LSP update the filesystem for changed scripts](https://github.com/godotengine/godot/pull/47891).
|
||||
|
||||
#### Porting
|
||||
|
||||
- [HTML5: Fix `target_fps` when window loses focus](https://github.com/godotengine/godot/pull/48543).
|
||||
- [Linux: Handle having no sinks in the PulseAudio driver](https://github.com/godotengine/godot/pull/48706).
|
||||
- macOS: Update `Info.plist` to clarify that the minimum required version is now macOS 10.12 (due to use of C++14 features).
|
||||
- [WebXR: Fix incompatibility with Emscripten 2.0.13+ which made WebXR error out](https://github.com/godotengine/godot/pull/48268).
|
||||
- [Windows: Fix socket poll timeout](https://github.com/godotengine/godot/pull/48203).
|
||||
|
||||
#### Rendering
|
||||
|
||||
- [Batching: Fix GLES3 light pass modulates](https://github.com/godotengine/godot/pull/48151).
|
||||
- [Batching: Fix crash with wrong number of verts in translation](https://github.com/godotengine/godot/pull/48125).
|
||||
- [Batching: Fix invalid polygon rotation](https://github.com/godotengine/godot/pull/48457).
|
||||
- [Batching: Fallback for 2D skinning with unrigged polygons](https://github.com/godotengine/godot/pull/48647).
|
||||
- [Lightmapper: Fixes to environment energy](https://github.com/godotengine/godot/pull/48089).
|
||||
- [Fix 2D software skinning relative transforms](https://github.com/godotengine/godot/pull/48402).
|
||||
- [Fix usage of proxy textures on GLES2 `PanoramaSky`](https://github.com/godotengine/godot/pull/48541).
|
||||
- [Fix refraction offset by manually unpacking normal mappings](https://github.com/godotengine/godot/pull/48478).
|
||||
- [Disable GIProbe emission when disabled on a material](https://github.com/godotengine/godot/pull/48798).
|
||||
|
||||
#### VisualScript
|
||||
|
||||
- [Fix wrongly setting default value on property hint change](https://github.com/godotengine/godot/pull/48702).
|
||||
|
||||
|
||||
## [3.3] - 2021-04-21
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/godot-3-3-has-arrived) for details.
|
||||
@@ -148,6 +402,8 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
|
||||
- [SVG images can now be used as a project icon](https://github.com/godotengine/godot/pull/43369).
|
||||
- [Tweaked log file names for consistency between Mono and non-Mono builds](https://github.com/godotengine/godot/pull/44148).
|
||||
- [Tweaked command line `--print-fps` display to display milliseconds per frame timings in addition to FPS](https://github.com/godotengine/godot/pull/47735).
|
||||
- [OpenSimplexNoise is now guaranteed to give consistent results across platforms](https://github.com/godotengine/godot/issues/47211).
|
||||
- This change breaks compatibility: you get different results even for the same seed.
|
||||
|
||||
#### Editor
|
||||
|
||||
@@ -342,6 +598,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
|
||||
- [Fade screen-space reflections towards the inner margin in GLES3](https://github.com/godotengine/godot/pull/41892).
|
||||
- [Ensure Reinhard tonemapping values are positive in GLES3](https://github.com/godotengine/godot/pull/42056).
|
||||
|
||||
|
||||
## [3.2.3] - 2020-09-17
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-2-3) for details.
|
||||
@@ -414,6 +671,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
|
||||
- Windows: DirectInput: Use correct joypad ID
|
||||
- Thirdparty library updates: mbedtls 2.16.8, stb_vorbis 1.20, wslay 1.1.1
|
||||
|
||||
|
||||
## [3.2.2] - 2020-06-26
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-2-2) for details.
|
||||
@@ -499,6 +757,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
|
||||
- Windows: Do not probe joypads if `DirectInput` cannot be initializer
|
||||
- Windows: Fix overflow condition with QueryPerformanceCounter
|
||||
|
||||
|
||||
## [3.2.1] - 2020-03-10
|
||||
|
||||
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-3-2-1) for details.
|
||||
@@ -527,6 +786,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
|
||||
- Windows: Fix UPNP regression after upstream update
|
||||
- Windows: Disable NetSocket address reuse
|
||||
|
||||
|
||||
## [3.2] - 2020-01-29
|
||||
|
||||
### Added
|
||||
@@ -1253,6 +1513,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
|
||||
- **X11:** `OS.set_window_maximized()` now gives up after 0.5 seconds.
|
||||
- This makes the editor no longer freeze on startup when using fvwm.
|
||||
|
||||
|
||||
## [3.1] - 2019-03-13
|
||||
|
||||
### Added
|
||||
@@ -1512,6 +1773,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
|
||||
|
||||
- Fixed a security issue relating to deserializing Variants.
|
||||
|
||||
|
||||
## [3.0] - 2018-01-29
|
||||
|
||||
### Added
|
||||
@@ -1645,6 +1907,10 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
|
||||
- HTML5 export using asm.js.
|
||||
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.
|
||||
|
||||
|
||||
[3.3.3]: https://downloads.tuxfamily.org/godotengine/3.3.3/Godot_v3.3.3-stable_changelog_chrono.txt
|
||||
[3.3.2]: https://downloads.tuxfamily.org/godotengine/3.3.2/Godot_v3.3.2-stable_changelog_chrono.txt
|
||||
[3.3.1]: https://downloads.tuxfamily.org/godotengine/3.3.1/Godot_v3.3.1-stable_changelog_chrono.txt
|
||||
[3.3]: https://downloads.tuxfamily.org/godotengine/3.3/Godot_v3.3-stable_changelog_chrono.txt
|
||||
[3.2.3]: https://downloads.tuxfamily.org/godotengine/3.2.3/Godot_v3.2.3-stable_changelog_chrono.txt
|
||||
[3.2.2]: https://downloads.tuxfamily.org/godotengine/3.2.2/Godot_v3.2.2-stable_changelog_chrono.txt
|
||||
|
@@ -133,6 +133,11 @@ Copyright: 2018, Eric Lasota
|
||||
2018, Microsoft Corp.
|
||||
License: Expat
|
||||
|
||||
Files: ./thirdparty/embree/
|
||||
Comment: Embree
|
||||
Copyright: 2009-2021 Intel Corporation
|
||||
License: Apache-2.0
|
||||
|
||||
Files: ./thirdparty/enet/
|
||||
Comment: ENet
|
||||
Copyright: 2002-2020, Lee Salzman
|
||||
|
259
DONORS.md
259
DONORS.md
@@ -7,7 +7,7 @@ support of generous donors.
|
||||
The ways to donate to the project, as well as details on how the funds are
|
||||
used, are described on [Godot's website](https://godotengine.org/donate).
|
||||
|
||||
The following is a list of the current monthly donors, to be have their
|
||||
The following is a list of the current monthly donors, who will have their
|
||||
generous deed immortalized in the next stable release of Godot Engine.
|
||||
|
||||
## Platinum sponsors
|
||||
@@ -23,30 +23,32 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
## Silver sponsors
|
||||
|
||||
ASIFA-Hollywood <https://www.asifa-hollywood.org>
|
||||
Moonwards <https://www.moonwards.com>
|
||||
Zenva Academy <https://academy.zenva.com>
|
||||
LITSLINK <https://litslink.com>
|
||||
|
||||
## Bronze sponsors
|
||||
|
||||
Ben Nolan
|
||||
Brandon Lamb
|
||||
Garry Newman
|
||||
Gordon MacPherson
|
||||
Hunter Dickson
|
||||
Kitcat490
|
||||
Kyle Szklenski
|
||||
Moonwards <https://www.moonwards.com>
|
||||
TrampolineTales <http://trampolinetales.com>
|
||||
|
||||
## Mini sponsors
|
||||
|
||||
AD Ford
|
||||
Alejandro Saucedo
|
||||
alex brown
|
||||
Andrew Dunai
|
||||
Angry Skull
|
||||
anti666
|
||||
Ben Nolan
|
||||
blurp
|
||||
CD
|
||||
Christian Baune
|
||||
Christoffer Sundbom
|
||||
Christopher Montesano
|
||||
Christopher Shifflett
|
||||
Daniel Edwards
|
||||
Darrin Massena
|
||||
David Mydlarz
|
||||
Digital Grows
|
||||
@@ -56,28 +58,31 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Gamechuck
|
||||
GameDev.net
|
||||
Hein-Pieter van Braam
|
||||
Jacob McKenney
|
||||
Jasper Brooks
|
||||
Javary Co.
|
||||
Jay Sistar
|
||||
Jeffery Chiu
|
||||
John G Gentzel
|
||||
Jonah Stich
|
||||
Justin Arnold
|
||||
Kamil Brzezinski
|
||||
Justo Delgado Baudí
|
||||
Kamil Brzezinskip
|
||||
Marcel Kräml
|
||||
Marek Belski
|
||||
Matthieu Huvé
|
||||
Maxim Karsten
|
||||
Mike King
|
||||
Nathan Warden
|
||||
Neal Gompa (Conan Kudo)
|
||||
Ninja_5tyl3
|
||||
Patrick Horn
|
||||
Patrick Schmidt
|
||||
Péter Magyar
|
||||
Rami
|
||||
Relintai
|
||||
Ronnie Cheng
|
||||
Slobodan Milnovic
|
||||
Stephan Lanfermann
|
||||
Steve
|
||||
Stonesoft io
|
||||
Thomas Krampl
|
||||
Tristan Pemble
|
||||
Violin Iliev
|
||||
@@ -86,23 +91,22 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
## Gold donors
|
||||
|
||||
Acheron
|
||||
Adam Brown
|
||||
albinaask
|
||||
Alvaro A Baena R
|
||||
Andres Hernandez
|
||||
Asher Glick
|
||||
Barugon
|
||||
Carlo Cabanilla
|
||||
Chris Goddard
|
||||
Christopher Case
|
||||
Daniel James
|
||||
David Gehrig
|
||||
David Graham
|
||||
David Snopek
|
||||
Don B
|
||||
Ed Morley
|
||||
Ellen Poe
|
||||
Florian Rämisch
|
||||
Forge
|
||||
Gamejunkey
|
||||
Hoojib
|
||||
Jakub Grzesik
|
||||
Javier Roman
|
||||
Joan Fons
|
||||
@@ -112,65 +116,69 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Klavdij Voncina
|
||||
kuku
|
||||
Lex Steers
|
||||
Luke
|
||||
Maciej Pendolski
|
||||
Manuele Finocchiaro
|
||||
Markus Wiesner
|
||||
Mason Bially
|
||||
Matthew Hillier
|
||||
Michael
|
||||
m kaersten
|
||||
Monster Vial
|
||||
Officine Pixel S.n.c.
|
||||
Petrus Prinsloo
|
||||
Rene
|
||||
Retro Village
|
||||
Rob Messick
|
||||
Roland Fredenhagen
|
||||
Ronan Zeegers
|
||||
Sandro Jenny
|
||||
Sarksus
|
||||
Scott B
|
||||
Sean
|
||||
Sergey
|
||||
Sofox
|
||||
Stephen Molyneaux
|
||||
Taylor Ritenour
|
||||
Tom Langwaldt
|
||||
Tricky Fat Cat
|
||||
tukon
|
||||
Vagabond Arcade
|
||||
Vitaliy Sapronenko
|
||||
William Wold
|
||||
xagonist
|
||||
Xeno Coliseum
|
||||
Zaven Muradyan
|
||||
|
||||
Adam Nakonieczny
|
||||
Adrian Adamiak
|
||||
Alexander J Maynard
|
||||
Alex de la Mare
|
||||
Alexey Dyadchenko
|
||||
Alex Khayrullin
|
||||
alice gambrell
|
||||
Andreas Funke
|
||||
Andrew Cunningham
|
||||
Andrew Farr
|
||||
Antanas Paskauskas
|
||||
Antoni Batchelli
|
||||
Arch Henderson III
|
||||
Arisaka Mayuki
|
||||
Arthur S. Muszynski
|
||||
Ben Botwin
|
||||
Brandon Hawkinson
|
||||
Caleb Sizemore
|
||||
Can Eris
|
||||
Cameron Connolly
|
||||
Charlie Whitfield
|
||||
Chase Taranto
|
||||
Chelsea Hash
|
||||
Chris Petrich
|
||||
Chris Serino
|
||||
Christian Leth Jeppesen
|
||||
Cow
|
||||
Craig Ostrin
|
||||
Craig Scarborough
|
||||
Craig Smith
|
||||
Cristopher
|
||||
CzechBlueBear
|
||||
D
|
||||
dan didenko
|
||||
Daniel Hernández Alcojor
|
||||
Daniel Tebbutt
|
||||
Darrian Little
|
||||
Dennis Belfrage
|
||||
Dev To be curious
|
||||
@@ -179,29 +187,38 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Donn Eddy
|
||||
Easypete
|
||||
Edgar Sun
|
||||
Eric
|
||||
Eric Brand
|
||||
Eugenio Hugo Salgüero Jáñez
|
||||
EXUREI
|
||||
flesk
|
||||
F S
|
||||
foxydevloper
|
||||
Fransiska
|
||||
Gabrielius Vaiškūnas
|
||||
Gary Hulst
|
||||
gavlig
|
||||
General Chicken
|
||||
Geoffroy Warin
|
||||
GGGames.org
|
||||
GrayDwarf
|
||||
Guilherme Felipe de C. G. da Silva
|
||||
Harvey Fong
|
||||
Hayden Whitehead
|
||||
Heath Hayes
|
||||
Horváth Péter
|
||||
Hu Hund
|
||||
Hunter Barabas
|
||||
Jake Burga
|
||||
James Couzens
|
||||
Jan Sælid
|
||||
Jared
|
||||
Jared White
|
||||
Jeppe Zapp
|
||||
Jesús Chicharro
|
||||
Joel Fivat
|
||||
Joel Höglund
|
||||
Johnathan Kupferer
|
||||
John Knight
|
||||
Jonathan Turner
|
||||
Jose Malheiro
|
||||
Jose Manuel Muñoz Perez
|
||||
Joseph Crane
|
||||
@@ -211,40 +228,42 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Juan T Chen
|
||||
Juan Velandia
|
||||
Judd
|
||||
Julián Absatz
|
||||
Julian Todd
|
||||
Juraj Móza
|
||||
JUSTIN CARROLL
|
||||
Justo Delgado Baudí
|
||||
Kelteseth
|
||||
kickmaniac
|
||||
kinfox
|
||||
Kis Levente Lorand
|
||||
Kos
|
||||
Lachie
|
||||
Lain Ballard
|
||||
Laszlo Kiss
|
||||
leetNightshade
|
||||
Leo Fidel R Liban
|
||||
Liam Smyth
|
||||
Luc-Frédéric Langis
|
||||
Łukasz Nowak
|
||||
LoparPanda
|
||||
Luca Vazzano
|
||||
MadScientistCarl
|
||||
Marcelo Dornbusch Lopes
|
||||
Marcus Dobler
|
||||
Marcus Richter
|
||||
Marek Belski
|
||||
Mark Barrett
|
||||
Martin Eigel
|
||||
Martin Kotz
|
||||
Martin Soucek
|
||||
Matt Eunson
|
||||
matt
|
||||
Matt Greene
|
||||
Matthias Toepp
|
||||
Mecha Kaiju X
|
||||
medecau
|
||||
Michael
|
||||
Michael Bordießer-Krauth
|
||||
Michael Dürwald
|
||||
Michael Policastro
|
||||
MightyPossum
|
||||
MikadoSC
|
||||
Mike Barbee
|
||||
minz1
|
||||
MuffinManKen
|
||||
nate etan
|
||||
Nick Abousselam
|
||||
@@ -257,24 +276,27 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Pavel Kotlyar
|
||||
Pedro Silva
|
||||
Pete Goodwin
|
||||
Peter Richmond
|
||||
Petr Malac
|
||||
PhaineOfCatz
|
||||
pl
|
||||
Raymond Harris
|
||||
Raz A
|
||||
Renato Fontes
|
||||
Rene Tailleur
|
||||
Rhodochrone
|
||||
Ricardo Alcantara
|
||||
Robert Larnach
|
||||
Rob
|
||||
Robert McDermott
|
||||
Robert Willes
|
||||
Rob McInroy
|
||||
Rocknight Studios
|
||||
Rodrigo Favarete
|
||||
Romeo Disca
|
||||
Ronnie Ashlock
|
||||
Ronny Mühle
|
||||
Ryan Scott
|
||||
Ryszard Sommefeldt
|
||||
Samuel Judd
|
||||
Samuel Smart
|
||||
Sean Morgan
|
||||
Sebastian Hutter
|
||||
Sébastien
|
||||
@@ -288,32 +310,36 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Stephan Hennion
|
||||
Steven Landow
|
||||
Stoned Xander
|
||||
Super Izzo
|
||||
Sven F.
|
||||
Thomas Bjarnelöf
|
||||
Thomas Kurz
|
||||
Tim Howard
|
||||
Tobias Bocanegra
|
||||
Todd Smith
|
||||
Torbulous
|
||||
toto bibi
|
||||
Troy Kinsella
|
||||
Turntsnaco
|
||||
tweaklab
|
||||
Valryia
|
||||
VikFro
|
||||
Vincent Cloutier
|
||||
Vlad Ceru Opran
|
||||
VoidPointer
|
||||
voxelv
|
||||
Winston
|
||||
Wojciech Chojnacki
|
||||
xzibiting
|
||||
Yifan Lai
|
||||
Yuancheng Zhang
|
||||
Zhou Tuizhi
|
||||
Zie Weaver
|
||||
Zoran Kukulj
|
||||
|
||||
## Silver donors
|
||||
|
||||
1D_Inc
|
||||
Abraham Haskins
|
||||
Adam
|
||||
Adam Brown
|
||||
Aaron Oldenburg
|
||||
Actual_Dio
|
||||
Adam Brunnmeier
|
||||
Adam Carr
|
||||
Adam Long
|
||||
@@ -322,8 +348,8 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Adam Smeltzer
|
||||
Adam Szymański
|
||||
Adisibio
|
||||
Adrien de Pierres
|
||||
Agar3s - Giovanny Beltrán
|
||||
Agustinus Arya
|
||||
Ahmet Kalyoncu
|
||||
Aidan O'Flannagain
|
||||
Aki Mimoto
|
||||
@@ -334,45 +360,50 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
AleMax
|
||||
Alessandro Senese
|
||||
Alexander Erlemann
|
||||
Alexander Ravenheart
|
||||
Alexander Ryndin
|
||||
Alexander Walter (SilvanuZ)
|
||||
Alexandre Beaudoin
|
||||
alex clavelle
|
||||
Alex Chan
|
||||
Alex Clavelle
|
||||
alex raeside
|
||||
Alex (Well Done Games)
|
||||
Allan Davis
|
||||
Allen Schade
|
||||
Aloehart
|
||||
Anders Marstein Kruke
|
||||
Andreas Krampitz
|
||||
Andre Stackhouse
|
||||
Andrew Groot
|
||||
andrew james morris
|
||||
Andrew Mansuetti
|
||||
Andrew Thomas
|
||||
Ano Nim
|
||||
Anthony Avina
|
||||
Anton Bouwer
|
||||
aomimezura11
|
||||
AP Condomines
|
||||
Arch Toasty
|
||||
Arda Erol
|
||||
Armin Preiml
|
||||
Arseniy M
|
||||
Arthur Brainville
|
||||
Ashley Claymore
|
||||
Astier Mickael
|
||||
Aubrey Falconer
|
||||
aurelien condomines
|
||||
AzulCrescent
|
||||
Balázs Batári
|
||||
Baptiste Le Bourhis
|
||||
Bartosz Bielecki
|
||||
Benedikt
|
||||
Benoit Jauvin-Girard
|
||||
Ben Vercammen
|
||||
Bernd Jänichen
|
||||
Bernhard Werner
|
||||
Bill Thibault
|
||||
Bjarne Voigtländer
|
||||
Black Block
|
||||
blackjacksike
|
||||
Blair Allen
|
||||
Bobby CC Wong
|
||||
Borkzilla
|
||||
Boyd Trolinger
|
||||
Bram
|
||||
brian
|
||||
Brian Klein
|
||||
@@ -382,11 +413,11 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Burney Waring
|
||||
bwhirt
|
||||
Caleb Gartner
|
||||
Caleb Makela
|
||||
Cameron Meyer
|
||||
Carlos Cejudo
|
||||
Carl van der Geest
|
||||
Carwyn Edwards
|
||||
Cas Brugman
|
||||
Casey
|
||||
Cassidy James
|
||||
Cédric Givord
|
||||
Chad Steadman
|
||||
@@ -399,25 +430,27 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Christoffer Dahlblom
|
||||
Christophe Gagnier
|
||||
Christopher Chin
|
||||
Christopher Schmitt
|
||||
Chris Truebe
|
||||
Clay Heaton
|
||||
Cody Parker
|
||||
Conall O
|
||||
Conner Lane
|
||||
Corchari
|
||||
Craig Maloney
|
||||
Craig Post
|
||||
CzechBlueBear
|
||||
C. R. Messen
|
||||
damucz
|
||||
Daniel Cheney
|
||||
Daniel Johnson
|
||||
DanielMaximiano
|
||||
Daren Scot Wilson
|
||||
Dave Walker
|
||||
David Baker
|
||||
David Bôle
|
||||
David May
|
||||
David Maziarka
|
||||
David Woodard
|
||||
deadwithbread
|
||||
Devin Carraway
|
||||
Diego Pereira
|
||||
Dima Fedotov
|
||||
Dmitry Fisher
|
||||
Dmytro Korchynskyi
|
||||
Dominik Wetzel
|
||||
@@ -434,6 +467,7 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Egon Elbre
|
||||
Elgenzay
|
||||
Elias Nykrem
|
||||
Emerson MX
|
||||
Ephemeral
|
||||
Eric Stokes
|
||||
Eric Walkingshaw
|
||||
@@ -445,75 +479,87 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
fby
|
||||
Fekinox
|
||||
Felix Bohmann
|
||||
Flaredown
|
||||
Forty Doubleu
|
||||
Francisco Garcia Florez
|
||||
Francois Holland
|
||||
Frank
|
||||
FrostMarble
|
||||
Game Endeavor
|
||||
Gareth Knowles
|
||||
Gary Thomas
|
||||
George Marques
|
||||
georgios katsanakis
|
||||
GFizz
|
||||
Georgi Petkov
|
||||
Graham Overby
|
||||
Greg Lincoln
|
||||
Greg Olson
|
||||
Greyson Richey
|
||||
Grid
|
||||
Guillaume Audirac
|
||||
Grominet
|
||||
Guillaume Pham Ngoc
|
||||
Guldoman
|
||||
Gustavo Loureiro dos Reis
|
||||
Hal A
|
||||
helija
|
||||
Hayden Foley
|
||||
Heribert Hirth
|
||||
Houdini Blueprints
|
||||
Hunter Jones
|
||||
Ian ORourke
|
||||
Ian Williams
|
||||
Iiari
|
||||
IndustrialRobot
|
||||
Ivan Nikolaev
|
||||
iveks
|
||||
Jackson Harmer
|
||||
Jacob
|
||||
Jacob D
|
||||
Jaguar
|
||||
Jaime Ruiz-Borau Vizárraga
|
||||
Jake D
|
||||
Jake Huxell
|
||||
Jako Danar
|
||||
James
|
||||
James A F Manley
|
||||
James Guardino
|
||||
James Quincy
|
||||
James Thomas
|
||||
Jamie Massey
|
||||
Janis Skuja
|
||||
Jan Vetulani
|
||||
JARKKO PARVIAINEN
|
||||
Jason Bolton
|
||||
Jason Malcolm-Herzmark
|
||||
Jason Uechi
|
||||
Jeff Hungerford
|
||||
Jeff Messer
|
||||
Jeffrey Berube
|
||||
Jennifer Graves
|
||||
JernauGurgeh
|
||||
Jesse Dubay
|
||||
Jhon Adams
|
||||
Jim Engstrand
|
||||
Joe Klemmer
|
||||
Joel Höglund
|
||||
John Bruce
|
||||
John Gabriel
|
||||
John Szevin
|
||||
Jonah Branch
|
||||
Jonas
|
||||
Jonas Arndt
|
||||
Jonas Bernemann
|
||||
Jonas Rudlang
|
||||
Jonas Yamazaki
|
||||
Jonatan R
|
||||
Jonathan Bieber
|
||||
Jonathan G
|
||||
Jonathan Wright
|
||||
Jon Bonazza
|
||||
Jon Oakes
|
||||
Jon Sully
|
||||
Jordan West
|
||||
Jordy Goodridge
|
||||
Jorge Antunes
|
||||
Jorge Araya Navarro
|
||||
Jose C. Rubio
|
||||
Joseph Catrambone
|
||||
Josep Sanchez
|
||||
Josh Taylor
|
||||
Joshua Heidrich
|
||||
jromkjrom
|
||||
Juanfran
|
||||
Juan Maggi
|
||||
Juan Uys
|
||||
Jueast
|
||||
Julian Murgia
|
||||
@@ -523,7 +569,7 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Justin Spedding
|
||||
Justin W. Flory
|
||||
KaDokta
|
||||
Kalin
|
||||
Karol Porzycki
|
||||
Keedong Park
|
||||
Keinan Powers
|
||||
Keith Bradner
|
||||
@@ -532,13 +578,20 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Kenneth Lee
|
||||
Kent Jofur
|
||||
Ketafuki
|
||||
Kevin van Rooijen
|
||||
Kiri Jolly
|
||||
Kjetil Haugland
|
||||
Kodera Software
|
||||
Kolandrious
|
||||
Konstantin Goncharov
|
||||
Kridsada Thanabulpong
|
||||
kormai
|
||||
Krishna Nadoor
|
||||
Kristian Nygaard Jensen
|
||||
KR McGinley
|
||||
Kronarq
|
||||
KsyTek Games
|
||||
kycho
|
||||
Kyle Burnett
|
||||
Kyle Jacobs
|
||||
Kyuppin
|
||||
Lasse le Dous
|
||||
@@ -549,12 +602,12 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Leonardo Dimano
|
||||
Lin Chear
|
||||
Linus Lind Lundgren
|
||||
Ludovic DELVAL
|
||||
Luigi Renna
|
||||
Luis Gaemperle
|
||||
Luis M
|
||||
LunaticInAHat
|
||||
Major Haul
|
||||
makoto asano
|
||||
Malcolm
|
||||
Marco Lardelli
|
||||
Mark Jad
|
||||
@@ -563,34 +616,40 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Markus Michael Egger
|
||||
Martin FIbik
|
||||
Martin Holas
|
||||
Martin Liška
|
||||
Martin Trbola
|
||||
Marvin
|
||||
Mathieu
|
||||
Matt Edwards
|
||||
Matthew Booe
|
||||
Matt Sylvia
|
||||
Maverick
|
||||
Max Fiedler
|
||||
Maxime Blade
|
||||
Maxwell
|
||||
Megasploot
|
||||
Melissa Mears
|
||||
Merlyn Morgan-Graham
|
||||
mewin
|
||||
mhilbrunner
|
||||
Michael
|
||||
Michael Bruce-Lockhart
|
||||
Michael Haney
|
||||
Michael Morrison
|
||||
Michał Skwarek
|
||||
Michel Candries
|
||||
MidoriBunn 'tis BS
|
||||
Mikayla
|
||||
Mike
|
||||
Mike Birkhead
|
||||
Mike Copley
|
||||
Mike Cunningham
|
||||
Mitchell J. Wagner
|
||||
MJacred
|
||||
ModularMind
|
||||
Molinghu
|
||||
Molly Jameson
|
||||
MoltenGears
|
||||
MrAZIE
|
||||
Mrjemandem
|
||||
Nathan Fish
|
||||
Nathaniel
|
||||
nee
|
||||
@@ -599,105 +658,118 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Neil Wang
|
||||
Nerdforge
|
||||
Nerdyninja
|
||||
Nicholas
|
||||
Nicholas La Roux
|
||||
Nicholas Orlowski
|
||||
Nick Eldrenkamp
|
||||
Nick Macholl
|
||||
Niclas Eriksen
|
||||
Nicolas Goll-Perrier
|
||||
Nicolas Rosset
|
||||
Nicolas SAN AGUSTIN
|
||||
Nima Farid
|
||||
Noel Billig
|
||||
Nuno Dionísio
|
||||
NZ
|
||||
oceoh
|
||||
Okatima
|
||||
OKV
|
||||
Oleg Reva
|
||||
Oleksandr Kryvonos
|
||||
Omar Delarosa
|
||||
Orfist
|
||||
Oriol Muñoz Princep
|
||||
oscar1000108
|
||||
Oscar Domingo
|
||||
Pascal
|
||||
Patrick Brock
|
||||
Patrick Nafarrete
|
||||
Paul Gieske
|
||||
Paweł Kowal
|
||||
Paweł Łyczkowski
|
||||
p_brighenti
|
||||
Peter Höglund
|
||||
Peter Richmond
|
||||
Petrus Prinsloo
|
||||
Philip Cohoe
|
||||
Philip Ludington (MrPhil)
|
||||
Pierre Caye
|
||||
Piotr Góral
|
||||
pj
|
||||
Point08
|
||||
Preethi Vaidyanathan
|
||||
pwab
|
||||
RabidTunes
|
||||
Rackat
|
||||
Rad Cat
|
||||
Rafa Laguna
|
||||
Raffaele Aramo
|
||||
Rainer Amler
|
||||
Rami Hanano
|
||||
Rammeow
|
||||
RAMupgrade
|
||||
Remi Rampin
|
||||
Rémi Verschelde
|
||||
Reneator
|
||||
Riccardo Marini
|
||||
Richard Hayes
|
||||
Richard Ivánek
|
||||
Richard Néveri
|
||||
Riley
|
||||
Robert Farr (Larington)
|
||||
Rob Ruana
|
||||
Rodrigo Loli
|
||||
Roger Smith
|
||||
Roland Rząsa
|
||||
Roman Tinkov
|
||||
Ronald Ho Hip (CrimsonZA)
|
||||
Ronan
|
||||
Ross Squires
|
||||
Roy Scayged
|
||||
Ryan Groom
|
||||
Sam Caulfield
|
||||
Sam Edson
|
||||
Samuele Zolfanelli
|
||||
scapegoat57
|
||||
Scott D. Yelich
|
||||
Scott Longley
|
||||
Sean Lynch
|
||||
Sebastian Michailidis
|
||||
segfault-god
|
||||
SeongWan Kim
|
||||
Sergey
|
||||
Sergiy Onenko
|
||||
SeungJong k
|
||||
Shaidak
|
||||
Shane
|
||||
Shane Sicienski
|
||||
Shane Spoor
|
||||
Siim Raidma
|
||||
simdee
|
||||
Simon Jonas Larsen
|
||||
Simon Schoenenberger
|
||||
Simon Wenner
|
||||
sirn
|
||||
Skalli
|
||||
smbe19
|
||||
smo1704
|
||||
soft circles
|
||||
Solene Waked
|
||||
Spencer Everhart
|
||||
Squirrel
|
||||
Stéphane Roussel
|
||||
Steve Cloete
|
||||
summerblind
|
||||
Sung soo Choi
|
||||
Svenne Krap
|
||||
SxP
|
||||
tadashi endo
|
||||
tannhauser_gate
|
||||
Tarch
|
||||
Terry
|
||||
the9thdude
|
||||
Theodore Lindsey
|
||||
TheVoiceInMyHead
|
||||
thomas
|
||||
Thomas Bechtold
|
||||
Thomas Detoy
|
||||
Thomas Horwath
|
||||
Tianren Qin
|
||||
Till1805
|
||||
Tim Drumheller
|
||||
Tim Erskine
|
||||
Tim Gleason
|
||||
Timothy B. MacDonald
|
||||
Title Plinsut
|
||||
TMoney
|
||||
Toadile
|
||||
Tobias Bradtke
|
||||
Tom Coxon
|
||||
Toni Duran
|
||||
Tony Zhao
|
||||
Tom Webster
|
||||
Torgeir Lilleskog
|
||||
Torsten Crass
|
||||
toupeira
|
||||
@@ -708,19 +780,17 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Troy Bonneau
|
||||
Tryggve Sollid
|
||||
Turgut Temucin
|
||||
Tyler Compton
|
||||
Tyler Stafos
|
||||
UltyX
|
||||
Uther
|
||||
v01tech
|
||||
Vaughan Ling
|
||||
Victor
|
||||
Viktor Ismagilov
|
||||
Vincent Foulon
|
||||
Vi Watch
|
||||
Vladimir Savin
|
||||
Vladislav Smirnov
|
||||
Vytenis Narušis
|
||||
waka nya
|
||||
Wayne Haak
|
||||
werner mendizabal
|
||||
Wiley Thompson
|
||||
William Edwards
|
||||
@@ -729,10 +799,13 @@ generous deed immortalized in the next stable release of Godot Engine.
|
||||
Wyatt Goodin
|
||||
x1212
|
||||
xenomat
|
||||
Yan Shi
|
||||
Yegor Smirnov
|
||||
Zak Stephens
|
||||
Эльдар Будагов
|
||||
Zher Huei Lee
|
||||
蕭惟允
|
||||
貴宏 小松
|
||||
郝晨煜
|
||||
|
||||
## Bronze donors
|
||||
|
||||
|
27
SConstruct
27
SConstruct
@@ -151,6 +151,7 @@ opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise e
|
||||
# Thirdparty libraries
|
||||
opts.Add(BoolVariable("builtin_bullet", "Use the built-in Bullet library", True))
|
||||
opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundles", True))
|
||||
opts.Add(BoolVariable("builtin_embree", "Use the built-in Embree library", True))
|
||||
opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True))
|
||||
opts.Add(BoolVariable("builtin_freetype", "Use the built-in FreeType library", True))
|
||||
opts.Add(BoolVariable("builtin_libogg", "Use the built-in libogg library", True))
|
||||
@@ -194,7 +195,13 @@ elif env_base["p"] != "":
|
||||
selected_platform = env_base["p"]
|
||||
else:
|
||||
# Missing `platform` argument, try to detect platform automatically
|
||||
if sys.platform.startswith("linux"):
|
||||
if (
|
||||
sys.platform.startswith("linux")
|
||||
or sys.platform.startswith("dragonfly")
|
||||
or sys.platform.startswith("freebsd")
|
||||
or sys.platform.startswith("netbsd")
|
||||
or sys.platform.startswith("openbsd")
|
||||
):
|
||||
selected_platform = "x11"
|
||||
elif sys.platform == "darwin":
|
||||
selected_platform = "osx"
|
||||
@@ -212,7 +219,7 @@ else:
|
||||
if selected_platform in ["linux", "bsd", "linuxbsd"]:
|
||||
if selected_platform == "linuxbsd":
|
||||
# Alias for forward compatibility.
|
||||
print('Platform "linuxbsd" is still called "x11" in Godot 3.2.x. Building for platform "x11".')
|
||||
print('Platform "linuxbsd" is still called "x11" in Godot 3.x. Building for platform "x11".')
|
||||
# Alias for convenience.
|
||||
selected_platform = "x11"
|
||||
|
||||
@@ -421,17 +428,21 @@ if selected_platform in platform_list:
|
||||
else: # GCC, Clang
|
||||
version = methods.get_compiler_version(env) or [-1, -1]
|
||||
|
||||
gcc_common_warnings = []
|
||||
common_warnings = []
|
||||
|
||||
if methods.using_gcc(env):
|
||||
gcc_common_warnings += ["-Wno-misleading-indentation"]
|
||||
common_warnings += ["-Wno-misleading-indentation"]
|
||||
if version[0] >= 7:
|
||||
gcc_common_warnings += ["-Wshadow-local"]
|
||||
common_warnings += ["-Wshadow-local"]
|
||||
elif methods.using_clang(env) or methods.using_emcc(env):
|
||||
# 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"]
|
||||
|
||||
if env["warnings"] == "extra":
|
||||
# Note: enable -Wimplicit-fallthrough for Clang (already part of -Wextra for GCC)
|
||||
# once we switch to C++11 or later (necessary for our FALLTHROUGH macro).
|
||||
env.Append(CCFLAGS=["-Wall", "-Wextra", "-Wwrite-strings", "-Wno-unused-parameter"] + gcc_common_warnings)
|
||||
env.Append(CCFLAGS=["-Wall", "-Wextra", "-Wwrite-strings", "-Wno-unused-parameter"] + common_warnings)
|
||||
env.Append(CXXFLAGS=["-Wctor-dtor-privacy", "-Wnon-virtual-dtor"])
|
||||
if methods.using_gcc(env):
|
||||
env.Append(
|
||||
@@ -447,9 +458,9 @@ if selected_platform in platform_list:
|
||||
if version[0] >= 9:
|
||||
env.Append(CCFLAGS=["-Wattribute-alias=2"])
|
||||
elif env["warnings"] == "all":
|
||||
env.Append(CCFLAGS=["-Wall"] + gcc_common_warnings)
|
||||
env.Append(CCFLAGS=["-Wall"] + common_warnings)
|
||||
elif env["warnings"] == "moderate":
|
||||
env.Append(CCFLAGS=["-Wall", "-Wno-unused"] + gcc_common_warnings)
|
||||
env.Append(CCFLAGS=["-Wall", "-Wno-unused"] + common_warnings)
|
||||
else: # 'no'
|
||||
env.Append(CCFLAGS=["-w"])
|
||||
|
||||
|
20
core/SCsub
20
core/SCsub
@@ -40,6 +40,9 @@ with open("script_encryption_key.gen.cpp", "w") as f:
|
||||
|
||||
|
||||
# Add required thirdparty code.
|
||||
|
||||
thirdparty_obj = []
|
||||
|
||||
env_thirdparty = env.Clone()
|
||||
env_thirdparty.disable_warnings()
|
||||
|
||||
@@ -57,7 +60,7 @@ thirdparty_misc_sources = [
|
||||
"clipper.cpp",
|
||||
]
|
||||
thirdparty_misc_sources = [thirdparty_misc_dir + file for file in thirdparty_misc_sources]
|
||||
env_thirdparty.add_source_files(env.core_sources, thirdparty_misc_sources)
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_misc_sources)
|
||||
|
||||
# Zlib library, can be unbundled
|
||||
if env["builtin_zlib"]:
|
||||
@@ -83,7 +86,7 @@ if env["builtin_zlib"]:
|
||||
if env["target"] == "debug":
|
||||
env_thirdparty.Append(CPPDEFINES=["ZLIB_DEBUG"])
|
||||
|
||||
env_thirdparty.add_source_files(env.core_sources, thirdparty_zlib_sources)
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_zlib_sources)
|
||||
|
||||
# Minizip library, could be unbundled in theory
|
||||
# However, our version has some custom modifications, so it won't compile with the system one
|
||||
@@ -94,7 +97,7 @@ thirdparty_minizip_sources = [
|
||||
"zip.c",
|
||||
]
|
||||
thirdparty_minizip_sources = [thirdparty_minizip_dir + file for file in thirdparty_minizip_sources]
|
||||
env_thirdparty.add_source_files(env.core_sources, thirdparty_minizip_sources)
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_minizip_sources)
|
||||
|
||||
# Zstd library, can be unbundled in theory
|
||||
# though we currently use some private symbols
|
||||
@@ -136,10 +139,14 @@ if env["builtin_zstd"]:
|
||||
# Also needed in main env includes will trigger warnings
|
||||
env.Append(CPPDEFINES=["ZSTD_STATIC_LINKING_ONLY"])
|
||||
|
||||
env_thirdparty.add_source_files(env.core_sources, thirdparty_zstd_sources)
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_zstd_sources)
|
||||
|
||||
|
||||
# Godot's own sources
|
||||
env.core_sources += thirdparty_obj
|
||||
|
||||
|
||||
# Godot source files
|
||||
|
||||
env.add_source_files(env.core_sources, "*.cpp")
|
||||
|
||||
# Certificates
|
||||
@@ -185,3 +192,6 @@ SConscript("bind/SCsub")
|
||||
# Build it all as a library
|
||||
lib = env.add_library("core", env.core_sources)
|
||||
env.Prepend(LIBS=[lib])
|
||||
|
||||
# Needed to force rebuilding the core files when the thirdparty code is updated.
|
||||
env.Depends(lib, thirdparty_obj)
|
||||
|
@@ -815,7 +815,7 @@ int64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
|
||||
unsigned int hour = ((datetime.has(HOUR_KEY)) ? static_cast<unsigned int>(datetime[HOUR_KEY]) : 0);
|
||||
unsigned int day = ((datetime.has(DAY_KEY)) ? static_cast<unsigned int>(datetime[DAY_KEY]) : 1);
|
||||
unsigned int month = ((datetime.has(MONTH_KEY)) ? static_cast<unsigned int>(datetime[MONTH_KEY]) : 1);
|
||||
unsigned int year = ((datetime.has(YEAR_KEY)) ? static_cast<unsigned int>(datetime[YEAR_KEY]) : 0);
|
||||
unsigned int year = ((datetime.has(YEAR_KEY)) ? static_cast<unsigned int>(datetime[YEAR_KEY]) : 1970);
|
||||
|
||||
/// How many days come before each month (0-12)
|
||||
static const unsigned short int DAYS_PAST_THIS_YEAR_TABLE[2][13] = {
|
||||
@@ -826,15 +826,14 @@ int64_t _OS::get_unix_time_from_datetime(Dictionary datetime) const {
|
||||
};
|
||||
|
||||
ERR_FAIL_COND_V_MSG(second > 59, 0, "Invalid second value of: " + itos(second) + ".");
|
||||
|
||||
ERR_FAIL_COND_V_MSG(minute > 59, 0, "Invalid minute value of: " + itos(minute) + ".");
|
||||
|
||||
ERR_FAIL_COND_V_MSG(hour > 23, 0, "Invalid hour value of: " + itos(hour) + ".");
|
||||
|
||||
ERR_FAIL_COND_V_MSG(year == 0, 0, "Years before 1 AD are not supported. Value passed: " + itos(year) + ".");
|
||||
ERR_FAIL_COND_V_MSG(month > 12 || month == 0, 0, "Invalid month value of: " + itos(month) + ".");
|
||||
|
||||
// Do this check after month is tested as valid
|
||||
ERR_FAIL_COND_V_MSG(day > MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1] || day == 0, 0, "Invalid day value of '" + itos(day) + "' which is larger than '" + itos(MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1]) + "' or 0.");
|
||||
unsigned int days_in_month = MONTH_DAYS_TABLE[LEAPYEAR(year)][month - 1];
|
||||
ERR_FAIL_COND_V_MSG(day == 0 || day > days_in_month, 0, "Invalid day value of: " + itos(day) + ". It should be comprised between 1 and " + itos(days_in_month) + " for month " + itos(month) + ".");
|
||||
|
||||
// Calculate all the seconds from months past in this year
|
||||
uint64_t SECONDS_FROM_MONTHS_PAST_THIS_YEAR = DAYS_PAST_THIS_YEAR_TABLE[LEAPYEAR(year)][month - 1] * SECONDS_PER_DAY;
|
||||
|
||||
@@ -1192,9 +1191,8 @@ bool _OS::is_keep_screen_on() const {
|
||||
return OS::get_singleton()->is_keep_screen_on();
|
||||
}
|
||||
|
||||
String _OS::get_system_dir(SystemDir p_dir) const {
|
||||
|
||||
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir));
|
||||
String _OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
|
||||
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir), p_shared_storage);
|
||||
}
|
||||
|
||||
String _OS::get_scancode_string(uint32_t p_code) const {
|
||||
@@ -1411,7 +1409,7 @@ void _OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_dynamic_memory_usage"), &_OS::get_dynamic_memory_usage);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_user_data_dir"), &_OS::get_user_data_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_system_dir", "dir"), &_OS::get_system_dir);
|
||||
ClassDB::bind_method(D_METHOD("get_system_dir", "dir", "shared_storage"), &_OS::get_system_dir, DEFVAL(true));
|
||||
ClassDB::bind_method(D_METHOD("get_unique_id"), &_OS::get_unique_id);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("is_ok_left_and_cancel_right"), &_OS::is_ok_left_and_cancel_right);
|
||||
@@ -2534,15 +2532,17 @@ Error _Directory::copy(String p_from, String p_to) {
|
||||
Error _Directory::rename(String p_from, String p_to) {
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use.");
|
||||
ERR_FAIL_COND_V_MSG(p_from.empty() || p_from == "." || p_from == "..", ERR_INVALID_PARAMETER, "Invalid path to rename.");
|
||||
|
||||
if (!p_from.is_rel_path()) {
|
||||
DirAccess *d = DirAccess::create_for_path(p_from);
|
||||
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from), ERR_DOES_NOT_EXIST, "File does not exist.");
|
||||
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from) && !d->dir_exists(p_from), ERR_DOES_NOT_EXIST, "File or directory does not exist.");
|
||||
Error err = d->rename(p_from, p_to);
|
||||
memdelete(d);
|
||||
return err;
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from), ERR_DOES_NOT_EXIST, "File does not exist.");
|
||||
ERR_FAIL_COND_V_MSG(!d->file_exists(p_from) && !d->dir_exists(p_from), ERR_DOES_NOT_EXIST, "File or directory does not exist.");
|
||||
return d->rename(p_from, p_to);
|
||||
}
|
||||
Error _Directory::remove(String p_name) {
|
||||
|
@@ -347,7 +347,7 @@ public:
|
||||
SCREEN_ORIENTATION_SENSOR,
|
||||
};
|
||||
|
||||
String get_system_dir(SystemDir p_dir) const;
|
||||
String get_system_dir(SystemDir p_dir, bool p_shared_storage = true) const;
|
||||
|
||||
String get_user_data_dir() const;
|
||||
|
||||
|
10
core/color.h
10
core/color.h
@@ -93,14 +93,14 @@ struct Color {
|
||||
Color inverted() const;
|
||||
Color contrasted() const;
|
||||
|
||||
_FORCE_INLINE_ Color linear_interpolate(const Color &p_b, float p_t) const {
|
||||
_FORCE_INLINE_ Color linear_interpolate(const Color &p_to, float p_weight) const {
|
||||
|
||||
Color res = *this;
|
||||
|
||||
res.r += (p_t * (p_b.r - r));
|
||||
res.g += (p_t * (p_b.g - g));
|
||||
res.b += (p_t * (p_b.b - b));
|
||||
res.a += (p_t * (p_b.a - a));
|
||||
res.r += (p_weight * (p_to.r - r));
|
||||
res.g += (p_weight * (p_to.g - g));
|
||||
res.b += (p_weight * (p_to.b - b));
|
||||
res.a += (p_weight * (p_to.a - a));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ struct _PHashTranslationCmp {
|
||||
|
||||
void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
ERR_FAIL_COND(p_from.is_null());
|
||||
List<StringName> keys;
|
||||
p_from->get_message_list(&keys);
|
||||
|
||||
|
@@ -6,6 +6,7 @@ env_crypto = env.Clone()
|
||||
|
||||
is_builtin = env["builtin_mbedtls"]
|
||||
has_module = env["module_mbedtls_enabled"]
|
||||
thirdparty_obj = []
|
||||
|
||||
if is_builtin or not has_module:
|
||||
# Use our headers for builtin or if the module is not going to be compiled.
|
||||
@@ -35,6 +36,16 @@ if not has_module:
|
||||
"godot_core_mbedtls_platform.c",
|
||||
]
|
||||
thirdparty_mbedtls_sources = [thirdparty_mbedtls_dir + file for file in thirdparty_mbedtls_sources]
|
||||
env_thirdparty.add_source_files(env.core_sources, thirdparty_mbedtls_sources)
|
||||
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_mbedtls_sources)
|
||||
env.core_sources += thirdparty_obj
|
||||
|
||||
env_crypto.add_source_files(env.core_sources, "*.cpp")
|
||||
|
||||
# Godot source files
|
||||
|
||||
core_obj = []
|
||||
|
||||
env_crypto.add_source_files(core_obj, "*.cpp")
|
||||
env.core_sources += core_obj
|
||||
|
||||
# Needed to force rebuilding the core files when the thirdparty library is updated.
|
||||
env.Depends(core_obj, thirdparty_obj)
|
||||
|
@@ -415,6 +415,7 @@ void register_global_constants() {
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_19);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_20);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_21);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_22);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
|
||||
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
|
||||
@@ -448,6 +449,7 @@ void register_global_constants() {
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_DOWN);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_LEFT);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_RIGHT);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_GUIDE);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_MISC1);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_PADDLE1);
|
||||
BIND_GLOBAL_ENUM_CONSTANT(JOY_PADDLE2);
|
||||
|
@@ -1104,7 +1104,7 @@ void Image::resize(int p_width, int p_height, Interpolation p_interpolation) {
|
||||
void Image::crop_from_point(int p_x, int p_y, int p_width, int p_height) {
|
||||
|
||||
ERR_FAIL_COND_MSG(!_can_modify(format), "Cannot crop in compressed or custom image formats.");
|
||||
|
||||
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
|
||||
ERR_FAIL_COND_MSG(p_x < 0, "Start x position cannot be smaller than 0.");
|
||||
ERR_FAIL_COND_MSG(p_y < 0, "Start y position cannot be smaller than 0.");
|
||||
ERR_FAIL_COND_MSG(p_width <= 0, "Width of image must be greater than 0.");
|
||||
@@ -1351,7 +1351,8 @@ void Image::expand_x2_hq2x() {
|
||||
}
|
||||
|
||||
void Image::shrink_x2() {
|
||||
|
||||
ERR_FAIL_COND(!_can_modify(format));
|
||||
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
|
||||
ERR_FAIL_COND(data.size() == 0);
|
||||
|
||||
if (mipmaps) {
|
||||
@@ -1455,6 +1456,8 @@ Error Image::generate_mipmaps(bool p_renormalize) {
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!_can_modify(format), ERR_UNAVAILABLE, "Cannot generate mipmaps in compressed or custom image formats.");
|
||||
|
||||
ERR_FAIL_COND_V_MSG(write_lock.ptr(), ERR_UNAVAILABLE, "Cannot modify image when it is locked.");
|
||||
|
||||
ERR_FAIL_COND_V_MSG(format == FORMAT_RGBA4444 || format == FORMAT_RGBA5551, ERR_UNAVAILABLE, "Cannot generate mipmaps in custom image formats.");
|
||||
|
||||
ERR_FAIL_COND_V_MSG(width == 0 || height == 0, ERR_UNCONFIGURED, "Cannot generate mipmaps with width or height equal to 0.");
|
||||
@@ -1587,6 +1590,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
|
||||
ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, "Image width cannot be greater than " + itos(MAX_WIDTH) + ".");
|
||||
ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, "Image height cannot be greater than " + itos(MAX_HEIGHT) + ".");
|
||||
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot create image when it is locked.");
|
||||
ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "Image format out of range, please see Image's Format enum.");
|
||||
|
||||
int mm = 0;
|
||||
int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0);
|
||||
@@ -1607,6 +1611,7 @@ void Image::create(int p_width, int p_height, bool p_use_mipmaps, Format p_forma
|
||||
ERR_FAIL_COND_MSG(p_height <= 0, "Image height must be greater than 0.");
|
||||
ERR_FAIL_COND_MSG(p_width > MAX_WIDTH, "Image width cannot be greater than " + itos(MAX_WIDTH) + ".");
|
||||
ERR_FAIL_COND_MSG(p_height > MAX_HEIGHT, "Image height cannot be greater than " + itos(MAX_HEIGHT) + ".");
|
||||
ERR_FAIL_INDEX_MSG(p_format, FORMAT_MAX, "Image format out of range, please see Image's Format enum.");
|
||||
|
||||
int mm;
|
||||
int size = _get_dst_image_size(p_width, p_height, p_format, mm, p_use_mipmaps ? -1 : 0);
|
||||
@@ -3018,6 +3023,8 @@ void Image::premultiply_alpha() {
|
||||
}
|
||||
|
||||
void Image::fix_alpha_edges() {
|
||||
ERR_FAIL_COND(!_can_modify(format));
|
||||
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
|
||||
|
||||
if (data.size() == 0)
|
||||
return;
|
||||
|
@@ -46,6 +46,7 @@ void InputMap::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("erase_action", "action"), &InputMap::erase_action);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("action_set_deadzone", "action", "deadzone"), &InputMap::action_set_deadzone);
|
||||
ClassDB::bind_method(D_METHOD("action_get_deadzone", "action"), &InputMap::action_get_deadzone);
|
||||
ClassDB::bind_method(D_METHOD("action_add_event", "action", "event"), &InputMap::action_add_event);
|
||||
ClassDB::bind_method(D_METHOD("action_has_event", "action", "event"), &InputMap::action_has_event);
|
||||
ClassDB::bind_method(D_METHOD("action_erase_event", "action", "event"), &InputMap::action_erase_event);
|
||||
@@ -156,6 +157,12 @@ bool InputMap::has_action(const StringName &p_action) const {
|
||||
return input_map.has(p_action);
|
||||
}
|
||||
|
||||
float InputMap::action_get_deadzone(const StringName &p_action) {
|
||||
ERR_FAIL_COND_V_MSG(!input_map.has(p_action), 0.0f, _suggest_actions(p_action));
|
||||
|
||||
return input_map[p_action].deadzone;
|
||||
}
|
||||
|
||||
void InputMap::action_set_deadzone(const StringName &p_action, float p_deadzone) {
|
||||
|
||||
ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
|
||||
|
@@ -72,6 +72,7 @@ public:
|
||||
void add_action(const StringName &p_action, float p_deadzone = 0.5);
|
||||
void erase_action(const StringName &p_action);
|
||||
|
||||
float action_get_deadzone(const StringName &p_action);
|
||||
void action_set_deadzone(const StringName &p_action, float p_deadzone);
|
||||
void action_add_event(const StringName &p_action, const Ref<InputEvent> &p_event);
|
||||
bool action_has_event(const StringName &p_action, const Ref<InputEvent> &p_event);
|
||||
|
@@ -141,8 +141,9 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
|
||||
|
||||
if (p_dst_max_size < 16) {
|
||||
uint8_t dst[16];
|
||||
ret_size = fastlz_decompress(p_src, p_src_size, dst, 16);
|
||||
fastlz_decompress(p_src, p_src_size, dst, 16);
|
||||
copymem(p_dst, dst, p_dst_max_size);
|
||||
ret_size = p_dst_max_size;
|
||||
} else {
|
||||
ret_size = fastlz_decompress(p_src, p_src_size, p_dst, p_dst_max_size);
|
||||
}
|
||||
|
@@ -258,6 +258,7 @@ Error FileAccessEncrypted::get_error() const {
|
||||
void FileAccessEncrypted::store_buffer(const uint8_t *p_src, int p_length) {
|
||||
|
||||
ERR_FAIL_COND_MSG(!writing, "File has not been opened in write mode.");
|
||||
ERR_FAIL_COND(!p_src && p_length > 0);
|
||||
|
||||
if (pos < data.size()) {
|
||||
|
||||
|
@@ -184,7 +184,7 @@ void FileAccessMemory::store_8(uint8_t p_byte) {
|
||||
}
|
||||
|
||||
void FileAccessMemory::store_buffer(const uint8_t *p_src, int p_length) {
|
||||
|
||||
ERR_FAIL_COND(!p_src && p_length > 0);
|
||||
int left = length - pos;
|
||||
int write = MIN(p_length, left);
|
||||
if (write < p_length) {
|
||||
|
@@ -45,15 +45,14 @@ static void *godot_open(void *data, const char *p_fname, int mode) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FileAccess *f = (FileAccess *)data;
|
||||
f->open(p_fname, FileAccess::READ);
|
||||
FileAccess *f = FileAccess::open(p_fname, FileAccess::READ);
|
||||
ERR_FAIL_COND_V(!f, nullptr);
|
||||
|
||||
return f->is_open() ? data : NULL;
|
||||
return f;
|
||||
}
|
||||
|
||||
static uLong godot_read(void *data, void *fdata, void *buf, uLong size) {
|
||||
|
||||
FileAccess *f = (FileAccess *)data;
|
||||
FileAccess *f = (FileAccess *)fdata;
|
||||
f->get_buffer((uint8_t *)buf, size);
|
||||
return size;
|
||||
}
|
||||
@@ -64,14 +63,12 @@ static uLong godot_write(voidpf opaque, voidpf stream, const void *buf, uLong si
|
||||
}
|
||||
|
||||
static long godot_tell(voidpf opaque, voidpf stream) {
|
||||
|
||||
FileAccess *f = (FileAccess *)opaque;
|
||||
FileAccess *f = (FileAccess *)stream;
|
||||
return f->get_position();
|
||||
}
|
||||
|
||||
static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) {
|
||||
|
||||
FileAccess *f = (FileAccess *)opaque;
|
||||
FileAccess *f = (FileAccess *)stream;
|
||||
|
||||
int pos = offset;
|
||||
switch (origin) {
|
||||
@@ -91,15 +88,17 @@ static long godot_seek(voidpf opaque, voidpf stream, uLong offset, int origin) {
|
||||
}
|
||||
|
||||
static int godot_close(voidpf opaque, voidpf stream) {
|
||||
|
||||
FileAccess *f = (FileAccess *)opaque;
|
||||
f->close();
|
||||
FileAccess *f = (FileAccess *)stream;
|
||||
if (f) {
|
||||
f->close();
|
||||
memdelete(f);
|
||||
f = nullptr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int godot_testerror(voidpf opaque, voidpf stream) {
|
||||
|
||||
FileAccess *f = (FileAccess *)opaque;
|
||||
FileAccess *f = (FileAccess *)stream;
|
||||
return f->get_error() != OK ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -118,10 +117,8 @@ static void godot_free(voidpf opaque, voidpf address) {
|
||||
void ZipArchive::close_handle(unzFile p_file) const {
|
||||
|
||||
ERR_FAIL_COND_MSG(!p_file, "Cannot close a file if none is open.");
|
||||
FileAccess *f = (FileAccess *)unzGetOpaque(p_file);
|
||||
unzCloseCurrentFile(p_file);
|
||||
unzClose(p_file);
|
||||
memdelete(f);
|
||||
}
|
||||
|
||||
unzFile ZipArchive::get_file_handle(String p_file) const {
|
||||
@@ -129,13 +126,10 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
|
||||
ERR_FAIL_COND_V_MSG(!file_exists(p_file), NULL, "File '" + p_file + " doesn't exist.");
|
||||
File file = files[p_file];
|
||||
|
||||
FileAccess *f = FileAccess::open(packages[file.package].filename, FileAccess::READ);
|
||||
ERR_FAIL_COND_V_MSG(!f, NULL, "Cannot open file '" + packages[file.package].filename + "'.");
|
||||
|
||||
zlib_filefunc_def io;
|
||||
zeromem(&io, sizeof(io));
|
||||
|
||||
io.opaque = f;
|
||||
io.opaque = nullptr;
|
||||
io.zopen_file = godot_open;
|
||||
io.zread_file = godot_read;
|
||||
io.zwrite_file = godot_write;
|
||||
@@ -149,7 +143,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
|
||||
io.free_mem = godot_free;
|
||||
|
||||
unzFile pkg = unzOpen2(packages[file.package].filename.utf8().get_data(), &io);
|
||||
ERR_FAIL_COND_V(!pkg, NULL);
|
||||
ERR_FAIL_COND_V_MSG(!pkg, nullptr, "Cannot open file '" + packages[file.package].filename + "'.");
|
||||
int unz_err = unzGoToFilePos(pkg, &file.file_pos);
|
||||
if (unz_err != UNZ_OK || unzOpenCurrentFile(pkg) != UNZ_OK) {
|
||||
|
||||
@@ -170,11 +164,9 @@ bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, size_
|
||||
return false;
|
||||
|
||||
zlib_filefunc_def io;
|
||||
memset(&io, 0, sizeof(io));
|
||||
|
||||
FileAccess *fa = FileAccess::open(p_path, FileAccess::READ);
|
||||
if (!fa)
|
||||
return false;
|
||||
io.opaque = fa;
|
||||
io.opaque = nullptr;
|
||||
io.zopen_file = godot_open;
|
||||
io.zread_file = godot_read;
|
||||
io.zwrite_file = godot_write;
|
||||
@@ -252,10 +244,7 @@ ZipArchive::ZipArchive() {
|
||||
ZipArchive::~ZipArchive() {
|
||||
|
||||
for (int i = 0; i < packages.size(); i++) {
|
||||
|
||||
FileAccess *f = (FileAccess *)unzGetOpaque(packages[i].zfile);
|
||||
unzClose(packages[i].zfile);
|
||||
memdelete(f);
|
||||
}
|
||||
|
||||
packages.clear();
|
||||
|
@@ -691,8 +691,10 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
|
||||
body_left -= rec;
|
||||
}
|
||||
}
|
||||
if (err != OK)
|
||||
if (err != OK) {
|
||||
ret.resize(_offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -83,12 +83,19 @@ struct _IP_ResolverPrivate {
|
||||
|
||||
if (queue[i].status.get() != IP::RESOLVER_STATUS_WAITING)
|
||||
continue;
|
||||
queue[i].response = IP::get_singleton()->resolve_hostname(queue[i].hostname, queue[i].type);
|
||||
|
||||
if (!queue[i].response.is_valid())
|
||||
queue[i].status.set(IP::RESOLVER_STATUS_ERROR);
|
||||
else
|
||||
queue[i].status.set(IP::RESOLVER_STATUS_DONE);
|
||||
mutex.lock();
|
||||
String hostname = queue[i].hostname;
|
||||
IP::Type type = queue[i].type;
|
||||
mutex.unlock();
|
||||
|
||||
// We should not lock while resolving the hostname,
|
||||
// only when modifying the queue.
|
||||
IP_Address response = IP::get_singleton()->resolve_hostname(hostname, type);
|
||||
|
||||
MutexLock lock(mutex);
|
||||
queue[i].response = response;
|
||||
queue[i].status.set(response.is_valid() ? IP::RESOLVER_STATUS_DONE : IP::RESOLVER_STATUS_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,12 +104,8 @@ struct _IP_ResolverPrivate {
|
||||
_IP_ResolverPrivate *ipr = (_IP_ResolverPrivate *)self;
|
||||
|
||||
while (!ipr->thread_abort) {
|
||||
|
||||
ipr->sem.wait();
|
||||
|
||||
ipr->mutex.lock();
|
||||
ipr->resolve_queues();
|
||||
ipr->mutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,19 +117,24 @@ struct _IP_ResolverPrivate {
|
||||
};
|
||||
|
||||
IP_Address IP::resolve_hostname(const String &p_hostname, IP::Type p_type) {
|
||||
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
|
||||
IP_Address res;
|
||||
|
||||
resolver->mutex.lock();
|
||||
|
||||
String key = _IP_ResolverPrivate::get_cache_key(p_hostname, p_type);
|
||||
if (resolver->cache.has(key) && resolver->cache[key].is_valid()) {
|
||||
IP_Address res = resolver->cache[key];
|
||||
res = resolver->cache[key];
|
||||
} else {
|
||||
// This should be run unlocked so the resolver thread can keep
|
||||
// resolving other requests.
|
||||
resolver->mutex.unlock();
|
||||
return res;
|
||||
res = _resolve_hostname(p_hostname, p_type);
|
||||
resolver->mutex.lock();
|
||||
// We might be overriding another result, but we don't care (they are the
|
||||
// same hostname).
|
||||
resolver->cache[key] = res;
|
||||
}
|
||||
|
||||
IP_Address res = _resolve_hostname(p_hostname, p_type);
|
||||
resolver->cache[key] = res;
|
||||
resolver->mutex.unlock();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -165,15 +173,10 @@ IP::ResolverStatus IP::get_resolve_item_status(ResolverID p_id) const {
|
||||
|
||||
ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IP::RESOLVER_STATUS_NONE);
|
||||
|
||||
resolver->mutex.lock();
|
||||
if (resolver->queue[p_id].status.get() == IP::RESOLVER_STATUS_NONE) {
|
||||
ERR_PRINT("Condition status == IP::RESOLVER_STATUS_NONE");
|
||||
resolver->mutex.unlock();
|
||||
return IP::RESOLVER_STATUS_NONE;
|
||||
}
|
||||
IP::ResolverStatus res = resolver->queue[p_id].status.get();
|
||||
|
||||
resolver->mutex.unlock();
|
||||
if (res == IP::RESOLVER_STATUS_NONE) {
|
||||
ERR_PRINT("Condition status == IP::RESOLVER_STATUS_NONE");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -199,11 +202,7 @@ void IP::erase_resolve_item(ResolverID p_id) {
|
||||
|
||||
ERR_FAIL_INDEX(p_id, IP::RESOLVER_MAX_QUERIES);
|
||||
|
||||
resolver->mutex.lock();
|
||||
|
||||
resolver->queue[p_id].status.set(IP::RESOLVER_STATUS_NONE);
|
||||
|
||||
resolver->mutex.unlock();
|
||||
}
|
||||
|
||||
void IP::clear_cache(const String &p_hostname) {
|
||||
|
@@ -138,18 +138,6 @@ public:
|
||||
ResourceInteractiveLoaderDefault() {}
|
||||
};
|
||||
|
||||
Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
|
||||
|
||||
//either this
|
||||
Ref<Resource> res = load(p_path, p_original_path, r_error);
|
||||
if (res.is_null())
|
||||
return Ref<ResourceInteractiveLoader>();
|
||||
|
||||
Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
|
||||
ril->resource = res;
|
||||
return ril;
|
||||
}
|
||||
|
||||
bool ResourceFormatLoader::exists(const String &p_path) const {
|
||||
return FileAccess::exists(p_path); //by default just check file
|
||||
}
|
||||
@@ -168,25 +156,41 @@ void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions)
|
||||
}
|
||||
}
|
||||
|
||||
RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
|
||||
// Warning: Derived classes must override either `load` or `load_interactive`. The base code
|
||||
// here can trigger an infinite recursion otherwise, since `load` calls `load_interactive`
|
||||
// vice versa.
|
||||
|
||||
Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
|
||||
// Warning: See previous note about the risk of infinite recursion.
|
||||
Ref<Resource> res = load(p_path, p_original_path, r_error);
|
||||
if (res.is_null()) {
|
||||
return Ref<ResourceInteractiveLoader>();
|
||||
}
|
||||
|
||||
Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
|
||||
ril->resource = res;
|
||||
return ril;
|
||||
}
|
||||
|
||||
RES ResourceFormatLoader::load(const String &p_path, const String &p_original_path, Error *r_error) {
|
||||
// Check user-defined loader if there's any. Hard fail if it returns an error.
|
||||
if (get_script_instance() && get_script_instance()->has_method("load")) {
|
||||
Variant res = get_script_instance()->call("load", p_path, p_original_path);
|
||||
|
||||
if (res.get_type() == Variant::INT) {
|
||||
|
||||
if (r_error)
|
||||
if (res.get_type() == Variant::INT) { // Error code, abort.
|
||||
if (r_error) {
|
||||
*r_error = (Error)res.operator int64_t();
|
||||
|
||||
} else {
|
||||
|
||||
if (r_error)
|
||||
}
|
||||
return RES();
|
||||
} else { // Success, pass on result.
|
||||
if (r_error) {
|
||||
*r_error = OK;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
//or this must be implemented
|
||||
// Warning: See previous note about the risk of infinite recursion.
|
||||
Ref<ResourceInteractiveLoader> ril = load_interactive(p_path, p_original_path, r_error);
|
||||
if (!ril.is_valid())
|
||||
return RES();
|
||||
|
@@ -178,7 +178,7 @@ public:
|
||||
}
|
||||
|
||||
int64_t find(const T &p_val, U p_from = 0) const {
|
||||
for (U i = 0; i < count; i++) {
|
||||
for (U i = p_from; i < count; i++) {
|
||||
if (data[i] == p_val) {
|
||||
return int64_t(i);
|
||||
}
|
||||
|
@@ -1033,16 +1033,16 @@ void Basis::set_diagonal(const Vector3 &p_diag) {
|
||||
elements[2][2] = p_diag.z;
|
||||
}
|
||||
|
||||
Basis Basis::slerp(const Basis &target, const real_t &t) const {
|
||||
Basis Basis::slerp(const Basis &p_to, const real_t &p_weight) const {
|
||||
|
||||
//consider scale
|
||||
Quat from(*this);
|
||||
Quat to(target);
|
||||
Quat to(p_to);
|
||||
|
||||
Basis b(from.slerp(to, t));
|
||||
b.elements[0] *= Math::lerp(elements[0].length(), target.elements[0].length(), t);
|
||||
b.elements[1] *= Math::lerp(elements[1].length(), target.elements[1].length(), t);
|
||||
b.elements[2] *= Math::lerp(elements[2].length(), target.elements[2].length(), t);
|
||||
Basis b(from.slerp(to, p_weight));
|
||||
b.elements[0] *= Math::lerp(elements[0].length(), p_to.elements[0].length(), p_weight);
|
||||
b.elements[1] *= Math::lerp(elements[1].length(), p_to.elements[1].length(), p_weight);
|
||||
b.elements[2] *= Math::lerp(elements[2].length(), p_to.elements[2].length(), p_weight);
|
||||
|
||||
return b;
|
||||
}
|
||||
|
@@ -172,7 +172,7 @@ public:
|
||||
bool is_diagonal() const;
|
||||
bool is_rotation() const;
|
||||
|
||||
Basis slerp(const Basis &target, const real_t &t) const;
|
||||
Basis slerp(const Basis &p_to, const real_t &p_weight) const;
|
||||
|
||||
operator String() const;
|
||||
|
||||
|
@@ -18,17 +18,17 @@ void _logic_item_remove_and_reinsert(uint32_t p_ref_id) {
|
||||
// some overlay elaborate way to find out which tree the node is in!
|
||||
BVHHandle temp_handle;
|
||||
temp_handle.set_id(p_ref_id);
|
||||
_current_tree = _handle_get_tree_id(temp_handle);
|
||||
uint32_t tree_id = _handle_get_tree_id(temp_handle);
|
||||
|
||||
// remove and reinsert
|
||||
BVH_ABB abb;
|
||||
node_remove_item(p_ref_id, &abb);
|
||||
node_remove_item(p_ref_id, tree_id, &abb);
|
||||
|
||||
// we must choose where to add to tree
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
|
||||
_node_add_item(ref.tnode_id, p_ref_id, abb);
|
||||
|
||||
refit_upward_and_balance(ref.tnode_id);
|
||||
refit_upward_and_balance(ref.tnode_id, tree_id);
|
||||
}
|
||||
|
||||
// from randy gaul balance function
|
||||
@@ -64,7 +64,7 @@ BVH_ABB _logic_abb_merge(const BVH_ABB &a, const BVH_ABB &b) {
|
||||
// https://github.com/RandyGaul/qu3e
|
||||
// It is MODIFIED from qu3e version.
|
||||
// This is the only function used (and _logic_abb_merge helper function).
|
||||
int32_t _logic_balance(int32_t iA) {
|
||||
int32_t _logic_balance(int32_t iA, uint32_t p_tree_id) {
|
||||
// return iA; // uncomment this to bypass balance
|
||||
|
||||
TNode *A = &_nodes[iA];
|
||||
@@ -103,7 +103,7 @@ int32_t _logic_balance(int32_t iA) {
|
||||
_nodes[A->parent_id].children[1] = iC;
|
||||
} else {
|
||||
// check this .. seems dodgy
|
||||
change_root_node(iC);
|
||||
change_root_node(iC, p_tree_id);
|
||||
}
|
||||
|
||||
// Swap A and C
|
||||
@@ -154,7 +154,7 @@ int32_t _logic_balance(int32_t iA) {
|
||||
|
||||
else {
|
||||
// check this .. seems dodgy
|
||||
change_root_node(iB);
|
||||
change_root_node(iB, p_tree_id);
|
||||
}
|
||||
|
||||
// Swap A and B
|
||||
|
@@ -53,23 +53,25 @@ BVHHandle item_add(T *p_userdata, bool p_active, const AABB &p_aabb, int32_t p_s
|
||||
// assign to handle to return
|
||||
handle.set_id(ref_id);
|
||||
|
||||
_current_tree = 0;
|
||||
if (p_pairable)
|
||||
_current_tree = 1;
|
||||
uint32_t tree_id = 0;
|
||||
if (p_pairable) {
|
||||
tree_id = 1;
|
||||
}
|
||||
|
||||
create_root_node(_current_tree);
|
||||
create_root_node(tree_id);
|
||||
|
||||
// we must choose where to add to tree
|
||||
if (p_active) {
|
||||
ref->tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
|
||||
ref->tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
|
||||
|
||||
bool refit = _node_add_item(ref->tnode_id, ref_id, abb);
|
||||
|
||||
if (refit) {
|
||||
// only need to refit from the parent
|
||||
const TNode &add_node = _nodes[ref->tnode_id];
|
||||
if (add_node.parent_id != BVHCommon::INVALID)
|
||||
refit_upward_and_balance(add_node.parent_id);
|
||||
if (add_node.parent_id != BVHCommon::INVALID) {
|
||||
refit_upward_and_balance(add_node.parent_id, tree_id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ref->set_inactive();
|
||||
@@ -137,13 +139,13 @@ bool item_move(BVHHandle p_handle, const AABB &p_aabb) {
|
||||
return true;
|
||||
}
|
||||
|
||||
_current_tree = _handle_get_tree_id(p_handle);
|
||||
uint32_t tree_id = _handle_get_tree_id(p_handle);
|
||||
|
||||
// remove and reinsert
|
||||
node_remove_item(ref_id);
|
||||
node_remove_item(ref_id, tree_id);
|
||||
|
||||
// we must choose where to add to tree
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
|
||||
|
||||
// add to the tree
|
||||
bool needs_refit = _node_add_item(ref.tnode_id, ref_id, abb);
|
||||
@@ -164,7 +166,7 @@ bool item_move(BVHHandle p_handle, const AABB &p_aabb) {
|
||||
void item_remove(BVHHandle p_handle) {
|
||||
uint32_t ref_id = p_handle.id();
|
||||
|
||||
_current_tree = _handle_get_tree_id(p_handle);
|
||||
uint32_t tree_id = _handle_get_tree_id(p_handle);
|
||||
|
||||
VERBOSE_PRINT("item_remove [" + itos(ref_id) + "] ");
|
||||
|
||||
@@ -184,7 +186,7 @@ void item_remove(BVHHandle p_handle) {
|
||||
|
||||
// remove the item from the node (only if active)
|
||||
if (_refs[ref_id].is_active()) {
|
||||
node_remove_item(ref_id);
|
||||
node_remove_item(ref_id, tree_id);
|
||||
}
|
||||
|
||||
// remove the item reference
|
||||
@@ -195,10 +197,10 @@ void item_remove(BVHHandle p_handle) {
|
||||
}
|
||||
|
||||
// don't think refit_all is necessary?
|
||||
//refit_all(_current_tree);
|
||||
//refit_all(_tree_id);
|
||||
|
||||
#ifdef BVH_VERBOSE_TREE
|
||||
_debug_recursive_print_tree(_current_tree);
|
||||
_debug_recursive_print_tree(tree_id);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -215,13 +217,13 @@ bool item_activate(BVHHandle p_handle, const AABB &p_aabb) {
|
||||
BVH_ABB abb;
|
||||
abb.from(p_aabb);
|
||||
|
||||
_current_tree = _handle_get_tree_id(p_handle);
|
||||
uint32_t tree_id = _handle_get_tree_id(p_handle);
|
||||
|
||||
// we must choose where to add to tree
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
|
||||
_node_add_item(ref.tnode_id, ref_id, abb);
|
||||
|
||||
refit_upward_and_balance(ref.tnode_id);
|
||||
refit_upward_and_balance(ref.tnode_id, tree_id);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -235,9 +237,11 @@ bool item_deactivate(BVHHandle p_handle) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t tree_id = _handle_get_tree_id(p_handle);
|
||||
|
||||
// remove from tree
|
||||
BVH_ABB abb;
|
||||
node_remove_item(ref_id, &abb);
|
||||
node_remove_item(ref_id, tree_id, &abb);
|
||||
|
||||
// mark as inactive
|
||||
ref.set_inactive();
|
||||
@@ -300,29 +304,30 @@ void item_set_pairable(const BVHHandle &p_handle, bool p_pairable, uint32_t p_pa
|
||||
BVH_ABB abb = leaf.get_aabb(ref.item_id);
|
||||
|
||||
// make sure current tree is correct prior to changing
|
||||
_current_tree = _handle_get_tree_id(p_handle);
|
||||
uint32_t tree_id = _handle_get_tree_id(p_handle);
|
||||
|
||||
// remove from old tree
|
||||
node_remove_item(ref_id);
|
||||
node_remove_item(ref_id, tree_id);
|
||||
|
||||
// we must set the pairable AFTER getting the current tree
|
||||
// because the pairable status determines which tree
|
||||
ex.pairable = p_pairable;
|
||||
|
||||
// add to new tree
|
||||
_current_tree = _handle_get_tree_id(p_handle);
|
||||
create_root_node(_current_tree);
|
||||
tree_id = _handle_get_tree_id(p_handle);
|
||||
create_root_node(tree_id);
|
||||
|
||||
// we must choose where to add to tree
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[_current_tree], abb);
|
||||
ref.tnode_id = _logic_choose_item_add_node(_root_node_id[tree_id], abb);
|
||||
bool needs_refit = _node_add_item(ref.tnode_id, ref_id, abb);
|
||||
|
||||
// only need to refit from the PARENT
|
||||
if (needs_refit) {
|
||||
// only need to refit from the parent
|
||||
const TNode &add_node = _nodes[ref.tnode_id];
|
||||
if (add_node.parent_id != BVHCommon::INVALID)
|
||||
refit_upward_and_balance(add_node.parent_id);
|
||||
if (add_node.parent_id != BVHCommon::INVALID) {
|
||||
refit_upward_and_balance(add_node.parent_id, tree_id);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// always keep this up to date
|
||||
|
@@ -65,10 +65,10 @@ void refit_upward(uint32_t p_node_id) {
|
||||
}
|
||||
}
|
||||
|
||||
void refit_upward_and_balance(uint32_t p_node_id) {
|
||||
void refit_upward_and_balance(uint32_t p_node_id, uint32_t p_tree_id) {
|
||||
while (p_node_id != BVHCommon::INVALID) {
|
||||
uint32_t before = p_node_id;
|
||||
p_node_id = _logic_balance(p_node_id);
|
||||
p_node_id = _logic_balance(p_node_id, p_tree_id);
|
||||
|
||||
if (before != p_node_id) {
|
||||
VERBOSE_PRINT("REBALANCED!");
|
||||
|
@@ -161,7 +161,6 @@ enum { NUM_TREES = 2,
|
||||
// Tree 1 - Pairable
|
||||
// This is more efficient because in physics we only need check non pairable against the pairable tree.
|
||||
uint32_t _root_node_id[NUM_TREES];
|
||||
int _current_tree = 0;
|
||||
|
||||
// these values may need tweaking according to the project
|
||||
// the bound of the world, and the average velocities of the objects
|
||||
|
@@ -193,7 +193,7 @@ private:
|
||||
new_child.parent_id = p_parent_id;
|
||||
}
|
||||
|
||||
void node_remove_child(uint32_t p_parent_id, uint32_t p_child_id, bool p_prevent_sibling = false) {
|
||||
void node_remove_child(uint32_t p_parent_id, uint32_t p_child_id, uint32_t p_tree_id, bool p_prevent_sibling = false) {
|
||||
TNode &parent = _nodes[p_parent_id];
|
||||
BVH_ASSERT(!parent.is_leaf());
|
||||
|
||||
@@ -228,7 +228,7 @@ private:
|
||||
if (grandparent_id == BVHCommon::INVALID) {
|
||||
if (sibling_present) {
|
||||
// change the root node
|
||||
change_root_node(sibling_id);
|
||||
change_root_node(sibling_id, p_tree_id);
|
||||
|
||||
// delete the old root node as no longer needed
|
||||
_nodes.free(p_parent_id);
|
||||
@@ -240,16 +240,15 @@ private:
|
||||
if (sibling_present) {
|
||||
node_replace_child(grandparent_id, p_parent_id, sibling_id);
|
||||
} else {
|
||||
node_remove_child(grandparent_id, p_parent_id, true);
|
||||
node_remove_child(grandparent_id, p_parent_id, p_tree_id, true);
|
||||
}
|
||||
|
||||
// put the node on the free list to recycle
|
||||
_nodes.free(p_parent_id);
|
||||
}
|
||||
|
||||
// this relies on _current_tree being accurate
|
||||
void change_root_node(uint32_t p_new_root_id) {
|
||||
_root_node_id[_current_tree] = p_new_root_id;
|
||||
void change_root_node(uint32_t p_new_root_id, uint32_t p_tree_id) {
|
||||
_root_node_id[p_tree_id] = p_new_root_id;
|
||||
TNode &root = _nodes[p_new_root_id];
|
||||
|
||||
// mark no parent
|
||||
@@ -269,7 +268,7 @@ private:
|
||||
node.neg_leaf_id = -(int)child_leaf_id;
|
||||
}
|
||||
|
||||
void node_remove_item(uint32_t p_ref_id, BVH_ABB *r_old_aabb = nullptr) {
|
||||
void node_remove_item(uint32_t p_ref_id, uint32_t p_tree_id, BVH_ABB *r_old_aabb = nullptr) {
|
||||
// get the reference
|
||||
ItemRef &ref = _refs[p_ref_id];
|
||||
uint32_t owner_node_id = ref.tnode_id;
|
||||
@@ -332,7 +331,7 @@ private:
|
||||
|
||||
uint32_t parent_id = tnode.parent_id;
|
||||
|
||||
node_remove_child(parent_id, owner_node_id);
|
||||
node_remove_child(parent_id, owner_node_id, p_tree_id);
|
||||
refit_upward(parent_id);
|
||||
|
||||
// put the node on the free list to recycle
|
||||
|
@@ -199,8 +199,8 @@ public:
|
||||
value += 0.0;
|
||||
return value;
|
||||
}
|
||||
static _ALWAYS_INLINE_ int posmod(int p_x, int p_y) {
|
||||
int value = p_x % p_y;
|
||||
static _ALWAYS_INLINE_ int64_t posmod(int64_t p_x, int64_t p_y) {
|
||||
int64_t value = p_x % p_y;
|
||||
if ((value < 0 && p_y > 0) || (value > 0 && p_y < 0)) {
|
||||
value += p_y;
|
||||
}
|
||||
|
@@ -115,13 +115,13 @@ private:
|
||||
LocalVector<AABB> aabbs;
|
||||
LocalVector<Element *> elements;
|
||||
|
||||
void update(List<Element *, AL> &eles) {
|
||||
void update(List<Element *, AL> &p_elements) {
|
||||
// make sure local vector doesn't delete the memory
|
||||
// no need to be thrashing allocations
|
||||
aabbs.clear();
|
||||
elements.clear();
|
||||
|
||||
typename List<Element *, AL>::Element *E = eles.front();
|
||||
typename List<Element *, AL>::Element *E = p_elements.front();
|
||||
while (E) {
|
||||
Element *e = E->get();
|
||||
aabbs.push_back(e->aabb);
|
||||
|
@@ -106,18 +106,18 @@ Vector3 Quat::get_euler_yxz() const {
|
||||
return m.get_euler_yxz();
|
||||
}
|
||||
|
||||
void Quat::operator*=(const Quat &q) {
|
||||
void Quat::operator*=(const Quat &p_q) {
|
||||
|
||||
set(w * q.x + x * q.w + y * q.z - z * q.y,
|
||||
w * q.y + y * q.w + z * q.x - x * q.z,
|
||||
w * q.z + z * q.w + x * q.y - y * q.x,
|
||||
w * q.w - x * q.x - y * q.y - z * q.z);
|
||||
set(w * p_q.x + x * p_q.w + y * p_q.z - z * p_q.y,
|
||||
w * p_q.y + y * p_q.w + z * p_q.x - x * p_q.z,
|
||||
w * p_q.z + z * p_q.w + x * p_q.y - y * p_q.x,
|
||||
w * p_q.w - x * p_q.x - y * p_q.y - z * p_q.z);
|
||||
}
|
||||
|
||||
Quat Quat::operator*(const Quat &q) const {
|
||||
Quat Quat::operator*(const Quat &p_q) const {
|
||||
|
||||
Quat r = *this;
|
||||
r *= q;
|
||||
r *= p_q;
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -150,29 +150,29 @@ Quat Quat::inverse() const {
|
||||
return Quat(-x, -y, -z, w);
|
||||
}
|
||||
|
||||
Quat Quat::slerp(const Quat &q, const real_t &t) const {
|
||||
Quat Quat::slerp(const Quat &p_to, const real_t &p_weight) const {
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_V_MSG(!is_normalized(), Quat(), "The start quaternion must be normalized.");
|
||||
ERR_FAIL_COND_V_MSG(!q.is_normalized(), Quat(), "The end quaternion must be normalized.");
|
||||
ERR_FAIL_COND_V_MSG(!p_to.is_normalized(), Quat(), "The end quaternion must be normalized.");
|
||||
#endif
|
||||
Quat to1;
|
||||
real_t omega, cosom, sinom, scale0, scale1;
|
||||
|
||||
// calc cosine
|
||||
cosom = dot(q);
|
||||
cosom = dot(p_to);
|
||||
|
||||
// adjust signs (if necessary)
|
||||
if (cosom < 0.0) {
|
||||
cosom = -cosom;
|
||||
to1.x = -q.x;
|
||||
to1.y = -q.y;
|
||||
to1.z = -q.z;
|
||||
to1.w = -q.w;
|
||||
to1.x = -p_to.x;
|
||||
to1.y = -p_to.y;
|
||||
to1.z = -p_to.z;
|
||||
to1.w = -p_to.w;
|
||||
} else {
|
||||
to1.x = q.x;
|
||||
to1.y = q.y;
|
||||
to1.z = q.z;
|
||||
to1.w = q.w;
|
||||
to1.x = p_to.x;
|
||||
to1.y = p_to.y;
|
||||
to1.z = p_to.z;
|
||||
to1.w = p_to.w;
|
||||
}
|
||||
|
||||
// calculate coefficients
|
||||
@@ -181,13 +181,13 @@ Quat Quat::slerp(const Quat &q, const real_t &t) const {
|
||||
// standard case (slerp)
|
||||
omega = Math::acos(cosom);
|
||||
sinom = Math::sin(omega);
|
||||
scale0 = Math::sin((1.0 - t) * omega) / sinom;
|
||||
scale1 = Math::sin(t * omega) / sinom;
|
||||
scale0 = Math::sin((1.0 - p_weight) * omega) / sinom;
|
||||
scale1 = Math::sin(p_weight * omega) / sinom;
|
||||
} else {
|
||||
// "from" and "to" quaternions are very close
|
||||
// ... so we can do a linear interpolation
|
||||
scale0 = 1.0 - t;
|
||||
scale1 = t;
|
||||
scale0 = 1.0 - p_weight;
|
||||
scale1 = p_weight;
|
||||
}
|
||||
// calculate final values
|
||||
return Quat(
|
||||
@@ -197,37 +197,37 @@ Quat Quat::slerp(const Quat &q, const real_t &t) const {
|
||||
scale0 * w + scale1 * to1.w);
|
||||
}
|
||||
|
||||
Quat Quat::slerpni(const Quat &q, const real_t &t) const {
|
||||
Quat Quat::slerpni(const Quat &p_to, const real_t &p_weight) const {
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_V_MSG(!is_normalized(), Quat(), "The start quaternion must be normalized.");
|
||||
ERR_FAIL_COND_V_MSG(!q.is_normalized(), Quat(), "The end quaternion must be normalized.");
|
||||
ERR_FAIL_COND_V_MSG(!p_to.is_normalized(), Quat(), "The end quaternion must be normalized.");
|
||||
#endif
|
||||
const Quat &from = *this;
|
||||
|
||||
real_t dot = from.dot(q);
|
||||
real_t dot = from.dot(p_to);
|
||||
|
||||
if (Math::absf(dot) > 0.9999) return from;
|
||||
|
||||
real_t theta = Math::acos(dot),
|
||||
sinT = 1.0 / Math::sin(theta),
|
||||
newFactor = Math::sin(t * theta) * sinT,
|
||||
invFactor = Math::sin((1.0 - t) * theta) * sinT;
|
||||
newFactor = Math::sin(p_weight * theta) * sinT,
|
||||
invFactor = Math::sin((1.0 - p_weight) * theta) * sinT;
|
||||
|
||||
return Quat(invFactor * from.x + newFactor * q.x,
|
||||
invFactor * from.y + newFactor * q.y,
|
||||
invFactor * from.z + newFactor * q.z,
|
||||
invFactor * from.w + newFactor * q.w);
|
||||
return Quat(invFactor * from.x + newFactor * p_to.x,
|
||||
invFactor * from.y + newFactor * p_to.y,
|
||||
invFactor * from.z + newFactor * p_to.z,
|
||||
invFactor * from.w + newFactor * p_to.w);
|
||||
}
|
||||
|
||||
Quat Quat::cubic_slerp(const Quat &q, const Quat &prep, const Quat &postq, const real_t &t) const {
|
||||
Quat Quat::cubic_slerp(const Quat &p_b, const Quat &p_pre_a, const Quat &p_post_b, const real_t &p_weight) const {
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_V_MSG(!is_normalized(), Quat(), "The start quaternion must be normalized.");
|
||||
ERR_FAIL_COND_V_MSG(!q.is_normalized(), Quat(), "The end quaternion must be normalized.");
|
||||
ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quat(), "The end quaternion must be normalized.");
|
||||
#endif
|
||||
//the only way to do slerp :|
|
||||
real_t t2 = (1.0 - t) * t * 2;
|
||||
Quat sp = this->slerp(q, t);
|
||||
Quat sq = prep.slerpni(postq, t);
|
||||
real_t t2 = (1.0 - p_weight) * p_weight * 2;
|
||||
Quat sp = this->slerp(p_b, p_weight);
|
||||
Quat sq = p_pre_a.slerpni(p_post_b, p_weight);
|
||||
return sp.slerpni(sq, t2);
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
Quat normalized() const;
|
||||
bool is_normalized() const;
|
||||
Quat inverse() const;
|
||||
_FORCE_INLINE_ real_t dot(const Quat &q) const;
|
||||
_FORCE_INLINE_ real_t dot(const Quat &p_q) const;
|
||||
|
||||
void set_euler_xyz(const Vector3 &p_euler);
|
||||
Vector3 get_euler_xyz() const;
|
||||
@@ -59,9 +59,9 @@ public:
|
||||
void set_euler(const Vector3 &p_euler) { set_euler_yxz(p_euler); };
|
||||
Vector3 get_euler() const { return get_euler_yxz(); };
|
||||
|
||||
Quat slerp(const Quat &q, const real_t &t) const;
|
||||
Quat slerpni(const Quat &q, const real_t &t) const;
|
||||
Quat cubic_slerp(const Quat &q, const Quat &prep, const Quat &postq, const real_t &t) const;
|
||||
Quat slerp(const Quat &p_to, const real_t &p_weight) const;
|
||||
Quat slerpni(const Quat &p_to, const real_t &p_weight) const;
|
||||
Quat cubic_slerp(const Quat &p_b, const Quat &p_pre_a, const Quat &p_post_b, const real_t &p_weight) const;
|
||||
|
||||
void set_axis_angle(const Vector3 &axis, const real_t &angle);
|
||||
_FORCE_INLINE_ void get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
r_axis.z = z * r;
|
||||
}
|
||||
|
||||
void operator*=(const Quat &q);
|
||||
Quat operator*(const Quat &q) const;
|
||||
void operator*=(const Quat &p_q);
|
||||
Quat operator*(const Quat &p_q) const;
|
||||
|
||||
Quat operator*(const Vector3 &v) const {
|
||||
return Quat(w * v.x + y * v.z - z * v.y,
|
||||
@@ -91,8 +91,8 @@ public:
|
||||
return v + ((uv * w) + u.cross(uv)) * ((real_t)2);
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ void operator+=(const Quat &q);
|
||||
_FORCE_INLINE_ void operator-=(const Quat &q);
|
||||
_FORCE_INLINE_ void operator+=(const Quat &p_q);
|
||||
_FORCE_INLINE_ void operator-=(const Quat &p_q);
|
||||
_FORCE_INLINE_ void operator*=(const real_t &s);
|
||||
_FORCE_INLINE_ void operator/=(const real_t &s);
|
||||
_FORCE_INLINE_ Quat operator+(const Quat &q2) const;
|
||||
@@ -121,18 +121,18 @@ public:
|
||||
Quat(const Vector3 &axis, const real_t &angle) { set_axis_angle(axis, angle); }
|
||||
|
||||
Quat(const Vector3 &euler) { set_euler(euler); }
|
||||
Quat(const Quat &q) :
|
||||
x(q.x),
|
||||
y(q.y),
|
||||
z(q.z),
|
||||
w(q.w) {
|
||||
Quat(const Quat &p_q) :
|
||||
x(p_q.x),
|
||||
y(p_q.y),
|
||||
z(p_q.z),
|
||||
w(p_q.w) {
|
||||
}
|
||||
|
||||
Quat operator=(const Quat &q) {
|
||||
x = q.x;
|
||||
y = q.y;
|
||||
z = q.z;
|
||||
w = q.w;
|
||||
Quat operator=(const Quat &p_q) {
|
||||
x = p_q.x;
|
||||
y = p_q.y;
|
||||
z = p_q.z;
|
||||
w = p_q.w;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -166,26 +166,26 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
real_t Quat::dot(const Quat &q) const {
|
||||
return x * q.x + y * q.y + z * q.z + w * q.w;
|
||||
real_t Quat::dot(const Quat &p_q) const {
|
||||
return x * p_q.x + y * p_q.y + z * p_q.z + w * p_q.w;
|
||||
}
|
||||
|
||||
real_t Quat::length_squared() const {
|
||||
return dot(*this);
|
||||
}
|
||||
|
||||
void Quat::operator+=(const Quat &q) {
|
||||
x += q.x;
|
||||
y += q.y;
|
||||
z += q.z;
|
||||
w += q.w;
|
||||
void Quat::operator+=(const Quat &p_q) {
|
||||
x += p_q.x;
|
||||
y += p_q.y;
|
||||
z += p_q.z;
|
||||
w += p_q.w;
|
||||
}
|
||||
|
||||
void Quat::operator-=(const Quat &q) {
|
||||
x -= q.x;
|
||||
y -= q.y;
|
||||
z -= q.z;
|
||||
w -= q.w;
|
||||
void Quat::operator-=(const Quat &p_q) {
|
||||
x -= p_q.x;
|
||||
y -= p_q.y;
|
||||
z -= p_q.z;
|
||||
w -= p_q.w;
|
||||
}
|
||||
|
||||
void Quat::operator*=(const real_t &s) {
|
||||
|
@@ -134,8 +134,8 @@ Vector2 Vector2::posmodv(const Vector2 &p_modv) const {
|
||||
return Vector2(Math::fposmod(x, p_modv.x), Math::fposmod(y, p_modv.y));
|
||||
}
|
||||
|
||||
Vector2 Vector2::project(const Vector2 &p_b) const {
|
||||
return p_b * (dot(p_b) / p_b.length_squared());
|
||||
Vector2 Vector2::project(const Vector2 &p_to) const {
|
||||
return p_to * (dot(p_to) / p_to.length_squared());
|
||||
}
|
||||
|
||||
Vector2 Vector2::snapped(const Vector2 &p_by) const {
|
||||
@@ -158,14 +158,14 @@ Vector2 Vector2::clamped(real_t p_len) const {
|
||||
return v;
|
||||
}
|
||||
|
||||
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const {
|
||||
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const {
|
||||
|
||||
Vector2 p0 = p_pre_a;
|
||||
Vector2 p1 = *this;
|
||||
Vector2 p2 = p_b;
|
||||
Vector2 p3 = p_post_b;
|
||||
|
||||
real_t t = p_t;
|
||||
real_t t = p_weight;
|
||||
real_t t2 = t * t;
|
||||
real_t t3 = t2 * t;
|
||||
|
||||
|
@@ -70,22 +70,22 @@ struct Vector2 {
|
||||
real_t distance_squared_to(const Vector2 &p_vector2) const;
|
||||
real_t angle_to(const Vector2 &p_vector2) const;
|
||||
real_t angle_to_point(const Vector2 &p_vector2) const;
|
||||
_FORCE_INLINE_ Vector2 direction_to(const Vector2 &p_b) const;
|
||||
_FORCE_INLINE_ Vector2 direction_to(const Vector2 &p_to) const;
|
||||
|
||||
real_t dot(const Vector2 &p_other) const;
|
||||
real_t cross(const Vector2 &p_other) const;
|
||||
Vector2 posmod(const real_t p_mod) const;
|
||||
Vector2 posmodv(const Vector2 &p_modv) const;
|
||||
Vector2 project(const Vector2 &p_b) const;
|
||||
Vector2 project(const Vector2 &p_to) const;
|
||||
|
||||
Vector2 plane_project(real_t p_d, const Vector2 &p_vec) const;
|
||||
|
||||
Vector2 clamped(real_t p_len) const;
|
||||
|
||||
_FORCE_INLINE_ static Vector2 linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_t);
|
||||
_FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_b, real_t p_t) const;
|
||||
_FORCE_INLINE_ Vector2 slerp(const Vector2 &p_b, real_t p_t) const;
|
||||
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const;
|
||||
_FORCE_INLINE_ static Vector2 linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_weight);
|
||||
_FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_to, real_t p_weight) const;
|
||||
_FORCE_INLINE_ Vector2 slerp(const Vector2 &p_to, real_t p_weight) const;
|
||||
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const;
|
||||
Vector2 move_toward(const Vector2 &p_to, const real_t p_delta) const;
|
||||
|
||||
Vector2 slide(const Vector2 &p_normal) const;
|
||||
@@ -230,36 +230,36 @@ _FORCE_INLINE_ bool Vector2::operator!=(const Vector2 &p_vec2) const {
|
||||
return x != p_vec2.x || y != p_vec2.y;
|
||||
}
|
||||
|
||||
Vector2 Vector2::linear_interpolate(const Vector2 &p_b, real_t p_t) const {
|
||||
Vector2 Vector2::linear_interpolate(const Vector2 &p_to, real_t p_weight) const {
|
||||
|
||||
Vector2 res = *this;
|
||||
|
||||
res.x += (p_t * (p_b.x - x));
|
||||
res.y += (p_t * (p_b.y - y));
|
||||
res.x += (p_weight * (p_to.x - x));
|
||||
res.y += (p_weight * (p_to.y - y));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
Vector2 Vector2::slerp(const Vector2 &p_b, real_t p_t) const {
|
||||
Vector2 Vector2::slerp(const Vector2 &p_to, real_t p_weight) const {
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_V_MSG(!is_normalized(), Vector2(), "The start Vector2 must be normalized.");
|
||||
#endif
|
||||
real_t theta = angle_to(p_b);
|
||||
return rotated(theta * p_t);
|
||||
real_t theta = angle_to(p_to);
|
||||
return rotated(theta * p_weight);
|
||||
}
|
||||
|
||||
Vector2 Vector2::direction_to(const Vector2 &p_b) const {
|
||||
Vector2 ret(p_b.x - x, p_b.y - y);
|
||||
Vector2 Vector2::direction_to(const Vector2 &p_to) const {
|
||||
Vector2 ret(p_to.x - x, p_to.y - y);
|
||||
ret.normalize();
|
||||
return ret;
|
||||
}
|
||||
|
||||
Vector2 Vector2::linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_t) {
|
||||
Vector2 Vector2::linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_weight) {
|
||||
|
||||
Vector2 res = p_a;
|
||||
|
||||
res.x += (p_t * (p_b.x - p_a.x));
|
||||
res.y += (p_t * (p_b.y - p_a.y));
|
||||
res.x += (p_weight * (p_b.x - p_a.x));
|
||||
res.y += (p_weight * (p_b.y - p_a.y));
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ Vector3 Vector3::snapped(Vector3 p_val) const {
|
||||
return v;
|
||||
}
|
||||
|
||||
Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const {
|
||||
Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const {
|
||||
|
||||
Vector3 p0 = p_pre_a;
|
||||
Vector3 p1 = *this;
|
||||
@@ -96,7 +96,7 @@ Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a,
|
||||
p3 = p2 + (p3 - p2) * (bc / cd);
|
||||
}
|
||||
|
||||
real_t t = p_t;
|
||||
real_t t = p_weight;
|
||||
real_t t2 = t * t;
|
||||
real_t t3 = t2 * t;
|
||||
|
||||
@@ -108,14 +108,14 @@ Vector3 Vector3::cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a,
|
||||
return out;
|
||||
}
|
||||
|
||||
Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const {
|
||||
Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const {
|
||||
|
||||
Vector3 p0 = p_pre_a;
|
||||
Vector3 p1 = *this;
|
||||
Vector3 p2 = p_b;
|
||||
Vector3 p3 = p_post_b;
|
||||
|
||||
real_t t = p_t;
|
||||
real_t t = p_weight;
|
||||
real_t t2 = t * t;
|
||||
real_t t3 = t2 * t;
|
||||
|
||||
|
@@ -88,10 +88,10 @@ struct Vector3 {
|
||||
|
||||
/* Static Methods between 2 vector3s */
|
||||
|
||||
_FORCE_INLINE_ Vector3 linear_interpolate(const Vector3 &p_b, real_t p_t) const;
|
||||
_FORCE_INLINE_ Vector3 slerp(const Vector3 &p_b, real_t p_t) const;
|
||||
Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const;
|
||||
Vector3 cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_t) const;
|
||||
_FORCE_INLINE_ Vector3 linear_interpolate(const Vector3 &p_to, real_t p_weight) const;
|
||||
_FORCE_INLINE_ Vector3 slerp(const Vector3 &p_to, real_t p_weight) const;
|
||||
Vector3 cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const;
|
||||
Vector3 cubic_interpolaten(const Vector3 &p_b, const Vector3 &p_pre_a, const Vector3 &p_post_b, real_t p_weight) const;
|
||||
Vector3 move_toward(const Vector3 &p_to, const real_t p_delta) const;
|
||||
|
||||
_FORCE_INLINE_ Vector3 cross(const Vector3 &p_b) const;
|
||||
@@ -105,15 +105,15 @@ struct Vector3 {
|
||||
_FORCE_INLINE_ Vector3 ceil() const;
|
||||
_FORCE_INLINE_ Vector3 round() const;
|
||||
|
||||
_FORCE_INLINE_ real_t distance_to(const Vector3 &p_b) const;
|
||||
_FORCE_INLINE_ real_t distance_squared_to(const Vector3 &p_b) const;
|
||||
_FORCE_INLINE_ real_t distance_to(const Vector3 &p_to) const;
|
||||
_FORCE_INLINE_ real_t distance_squared_to(const Vector3 &p_to) const;
|
||||
|
||||
_FORCE_INLINE_ Vector3 posmod(const real_t p_mod) const;
|
||||
_FORCE_INLINE_ Vector3 posmodv(const Vector3 &p_modv) const;
|
||||
_FORCE_INLINE_ Vector3 project(const Vector3 &p_b) const;
|
||||
_FORCE_INLINE_ Vector3 project(const Vector3 &p_to) const;
|
||||
|
||||
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_b) const;
|
||||
_FORCE_INLINE_ Vector3 direction_to(const Vector3 &p_b) const;
|
||||
_FORCE_INLINE_ real_t angle_to(const Vector3 &p_to) const;
|
||||
_FORCE_INLINE_ Vector3 direction_to(const Vector3 &p_to) const;
|
||||
|
||||
_FORCE_INLINE_ Vector3 slide(const Vector3 &p_normal) const;
|
||||
_FORCE_INLINE_ Vector3 bounce(const Vector3 &p_normal) const;
|
||||
@@ -196,27 +196,27 @@ Vector3 Vector3::round() const {
|
||||
return Vector3(Math::round(x), Math::round(y), Math::round(z));
|
||||
}
|
||||
|
||||
Vector3 Vector3::linear_interpolate(const Vector3 &p_b, real_t p_t) const {
|
||||
Vector3 Vector3::linear_interpolate(const Vector3 &p_to, real_t p_weight) const {
|
||||
|
||||
return Vector3(
|
||||
x + (p_t * (p_b.x - x)),
|
||||
y + (p_t * (p_b.y - y)),
|
||||
z + (p_t * (p_b.z - z)));
|
||||
x + (p_weight * (p_to.x - x)),
|
||||
y + (p_weight * (p_to.y - y)),
|
||||
z + (p_weight * (p_to.z - z)));
|
||||
}
|
||||
|
||||
Vector3 Vector3::slerp(const Vector3 &p_b, real_t p_t) const {
|
||||
real_t theta = angle_to(p_b);
|
||||
return rotated(cross(p_b).normalized(), theta * p_t);
|
||||
Vector3 Vector3::slerp(const Vector3 &p_to, real_t p_weight) const {
|
||||
real_t theta = angle_to(p_to);
|
||||
return rotated(cross(p_to).normalized(), theta * p_weight);
|
||||
}
|
||||
|
||||
real_t Vector3::distance_to(const Vector3 &p_b) const {
|
||||
real_t Vector3::distance_to(const Vector3 &p_to) const {
|
||||
|
||||
return (p_b - *this).length();
|
||||
return (p_to - *this).length();
|
||||
}
|
||||
|
||||
real_t Vector3::distance_squared_to(const Vector3 &p_b) const {
|
||||
real_t Vector3::distance_squared_to(const Vector3 &p_to) const {
|
||||
|
||||
return (p_b - *this).length_squared();
|
||||
return (p_to - *this).length_squared();
|
||||
}
|
||||
|
||||
Vector3 Vector3::posmod(const real_t p_mod) const {
|
||||
@@ -227,17 +227,17 @@ Vector3 Vector3::posmodv(const Vector3 &p_modv) const {
|
||||
return Vector3(Math::fposmod(x, p_modv.x), Math::fposmod(y, p_modv.y), Math::fposmod(z, p_modv.z));
|
||||
}
|
||||
|
||||
Vector3 Vector3::project(const Vector3 &p_b) const {
|
||||
return p_b * (dot(p_b) / p_b.length_squared());
|
||||
Vector3 Vector3::project(const Vector3 &p_to) const {
|
||||
return p_to * (dot(p_to) / p_to.length_squared());
|
||||
}
|
||||
|
||||
real_t Vector3::angle_to(const Vector3 &p_b) const {
|
||||
real_t Vector3::angle_to(const Vector3 &p_to) const {
|
||||
|
||||
return Math::atan2(cross(p_b).length(), dot(p_b));
|
||||
return Math::atan2(cross(p_to).length(), dot(p_to));
|
||||
}
|
||||
|
||||
Vector3 Vector3::direction_to(const Vector3 &p_b) const {
|
||||
Vector3 ret(p_b.x - x, p_b.y - y, p_b.z - z);
|
||||
Vector3 Vector3::direction_to(const Vector3 &p_to) const {
|
||||
Vector3 ret(p_to.x - x, p_to.y - y, p_to.z - z);
|
||||
ret.normalize();
|
||||
return ret;
|
||||
}
|
||||
|
@@ -591,7 +591,7 @@ void FileAccess::store_csv_line(const Vector<String> &p_values, const String &p_
|
||||
}
|
||||
|
||||
void FileAccess::store_buffer(const uint8_t *p_src, int p_length) {
|
||||
|
||||
ERR_FAIL_COND(!p_src && p_length > 0);
|
||||
for (int i = 0; i < p_length; i++)
|
||||
store_8(p_src[i]);
|
||||
}
|
||||
|
@@ -85,7 +85,8 @@ enum JoystickList {
|
||||
JOY_BUTTON_19 = 19,
|
||||
JOY_BUTTON_20 = 20,
|
||||
JOY_BUTTON_21 = 21,
|
||||
JOY_BUTTON_MAX = 22,
|
||||
JOY_BUTTON_22 = 22,
|
||||
JOY_BUTTON_MAX = 23,
|
||||
|
||||
JOY_L = JOY_BUTTON_4,
|
||||
JOY_R = JOY_BUTTON_5,
|
||||
@@ -99,12 +100,13 @@ enum JoystickList {
|
||||
JOY_DPAD_DOWN = JOY_BUTTON_13,
|
||||
JOY_DPAD_LEFT = JOY_BUTTON_14,
|
||||
JOY_DPAD_RIGHT = JOY_BUTTON_15,
|
||||
JOY_MISC1 = JOY_BUTTON_16,
|
||||
JOY_PADDLE1 = JOY_BUTTON_17,
|
||||
JOY_PADDLE2 = JOY_BUTTON_18,
|
||||
JOY_PADDLE3 = JOY_BUTTON_19,
|
||||
JOY_PADDLE4 = JOY_BUTTON_20,
|
||||
JOY_TOUCHPAD = JOY_BUTTON_21,
|
||||
JOY_GUIDE = JOY_BUTTON_16,
|
||||
JOY_MISC1 = JOY_BUTTON_17,
|
||||
JOY_PADDLE1 = JOY_BUTTON_18,
|
||||
JOY_PADDLE2 = JOY_BUTTON_19,
|
||||
JOY_PADDLE3 = JOY_BUTTON_20,
|
||||
JOY_PADDLE4 = JOY_BUTTON_21,
|
||||
JOY_TOUCHPAD = JOY_BUTTON_22,
|
||||
|
||||
JOY_SONY_CIRCLE = JOY_BUTTON_1,
|
||||
JOY_SONY_X = JOY_BUTTON_0,
|
||||
|
@@ -372,8 +372,7 @@ String OS::get_resource_dir() const {
|
||||
}
|
||||
|
||||
// Access system-specific dirs like Documents, Downloads, etc.
|
||||
String OS::get_system_dir(SystemDir p_dir) const {
|
||||
|
||||
String OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
|
||||
return ".";
|
||||
}
|
||||
|
||||
@@ -465,6 +464,27 @@ OS::ScreenOrientation OS::get_screen_orientation() const {
|
||||
return (OS::ScreenOrientation)_orientation;
|
||||
}
|
||||
|
||||
// Internal helper function that returns the screen orientation enum value from a string
|
||||
// (generally coming from the Project Settings).
|
||||
// This is required to keep compatibility with existing projects.
|
||||
OS::ScreenOrientation OS::get_screen_orientation_from_string(const String &p_orientation) const {
|
||||
if (p_orientation == "portrait") {
|
||||
return OS::SCREEN_PORTRAIT;
|
||||
} else if (p_orientation == "reverse_landscape") {
|
||||
return OS::SCREEN_REVERSE_LANDSCAPE;
|
||||
} else if (p_orientation == "reverse_portrait") {
|
||||
return OS::SCREEN_REVERSE_PORTRAIT;
|
||||
} else if (p_orientation == "sensor_landscape") {
|
||||
return OS::SCREEN_SENSOR_LANDSCAPE;
|
||||
} else if (p_orientation == "sensor_portrait") {
|
||||
return OS::SCREEN_SENSOR_PORTRAIT;
|
||||
} else if (p_orientation == "sensor") {
|
||||
return OS::SCREEN_SENSOR;
|
||||
}
|
||||
|
||||
return OS::SCREEN_LANDSCAPE;
|
||||
}
|
||||
|
||||
void OS::ensure_user_data_dir() {
|
||||
String dd = get_user_data_dir();
|
||||
DirAccess *da = DirAccess::open(dd);
|
||||
|
@@ -453,7 +453,7 @@ public:
|
||||
SYSTEM_DIR_RINGTONES,
|
||||
};
|
||||
|
||||
virtual String get_system_dir(SystemDir p_dir) const;
|
||||
virtual String get_system_dir(SystemDir p_dir, bool p_shared_storage = true) const;
|
||||
|
||||
virtual Error move_to_trash(const String &p_path) { return FAILED; }
|
||||
|
||||
@@ -475,6 +475,7 @@ public:
|
||||
|
||||
virtual void set_screen_orientation(ScreenOrientation p_orientation);
|
||||
virtual ScreenOrientation get_screen_orientation() const;
|
||||
ScreenOrientation get_screen_orientation_from_string(const String &p_orientation) const;
|
||||
|
||||
virtual void enable_for_stealing_focus(ProcessID pid) {}
|
||||
virtual void move_window_to_foreground() {}
|
||||
|
@@ -128,6 +128,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b
|
||||
uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
|
||||
|
||||
PoolVector<uint8_t>::Read rd = data.read();
|
||||
ERR_FAIL_COND_V(!rd.ptr(), 0);
|
||||
const uint8_t *r = &rd[p_ofs];
|
||||
uint32_t type = decode_uint32(r);
|
||||
|
||||
@@ -158,6 +159,10 @@ int PackedDataContainer::_size(uint32_t p_ofs) const {
|
||||
Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, bool &err) const {
|
||||
|
||||
PoolVector<uint8_t>::Read rd = data.read();
|
||||
if (!rd.ptr()) {
|
||||
err = true;
|
||||
ERR_FAIL_COND_V(!rd.ptr(), Variant());
|
||||
}
|
||||
const uint8_t *r = &rd[p_ofs];
|
||||
uint32_t type = decode_uint32(r);
|
||||
|
||||
|
@@ -690,8 +690,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
|
||||
file->store_32(count + 1);
|
||||
//store how many properties are saved, add one for custom featuers, which must always go first
|
||||
String key = CoreStringNames::get_singleton()->_custom_features;
|
||||
file->store_32(key.length());
|
||||
file->store_string(key);
|
||||
file->store_pascal_string(key);
|
||||
|
||||
int len;
|
||||
err = encode_variant(p_custom_features, NULL, len, false);
|
||||
@@ -728,8 +727,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
|
||||
else
|
||||
value = get(key);
|
||||
|
||||
file->store_32(key.length());
|
||||
file->store_string(key);
|
||||
file->store_pascal_string(key);
|
||||
|
||||
int len;
|
||||
err = encode_variant(value, NULL, len, true);
|
||||
@@ -1059,6 +1057,7 @@ ProjectSettings::ProjectSettings() {
|
||||
extensions.push_back("gd");
|
||||
if (Engine::get_singleton()->has_singleton("GodotSharp"))
|
||||
extensions.push_back("cs");
|
||||
extensions.push_back("gdshader");
|
||||
extensions.push_back("shader");
|
||||
|
||||
GLOBAL_DEF("editor/search_in_file_extensions", extensions);
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#if !defined(NO_THREADS)
|
||||
|
||||
#include <atomic>
|
||||
#include <type_traits>
|
||||
|
||||
// Design goals for these classes:
|
||||
// - No automatic conversions or arithmetic operators,
|
||||
|
@@ -79,6 +79,7 @@ static const char *locale_list[] = {
|
||||
"ast_ES", // Asturian (Spain)
|
||||
"ayc_PE", // Southern Aymara (Peru)
|
||||
"ay_PE", // Aymara (Peru)
|
||||
"az", // Azerbaijani
|
||||
"az_AZ", // Azerbaijani (Azerbaijan)
|
||||
"be", // Belarusian
|
||||
"be_BY", // Belarusian (Belarus)
|
||||
@@ -235,6 +236,7 @@ static const char *locale_list[] = {
|
||||
"ka_GE", // Georgian (Georgia)
|
||||
"kk_KZ", // Kazakh (Kazakhstan)
|
||||
"kl_GL", // Kalaallisut (Greenland)
|
||||
"km", // Central Khmer
|
||||
"km_KH", // Central Khmer (Cambodia)
|
||||
"kn_IN", // Kannada (India)
|
||||
"kok_IN", // Konkani (India)
|
||||
@@ -385,6 +387,7 @@ static const char *locale_list[] = {
|
||||
"tr_CY", // Turkish (Cyprus)
|
||||
"tr_TR", // Turkish (Turkey)
|
||||
"ts_ZA", // Tsonga (South Africa)
|
||||
"tt", // Tatar
|
||||
"tt_RU", // Tatar (Russia)
|
||||
"tzm", // Central Atlas Tamazight
|
||||
"tzm_MA", // Central Atlas Tamazight (Marrocos)
|
||||
@@ -453,6 +456,7 @@ static const char *locale_names[] = {
|
||||
"Asturian (Spain)",
|
||||
"Southern Aymara (Peru)",
|
||||
"Aymara (Peru)",
|
||||
"Azerbaijani",
|
||||
"Azerbaijani (Azerbaijan)",
|
||||
"Belarusian",
|
||||
"Belarusian (Belarus)",
|
||||
@@ -609,6 +613,7 @@ static const char *locale_names[] = {
|
||||
"Georgian (Georgia)",
|
||||
"Kazakh (Kazakhstan)",
|
||||
"Kalaallisut (Greenland)",
|
||||
"Central Khmer",
|
||||
"Central Khmer (Cambodia)",
|
||||
"Kannada (India)",
|
||||
"Konkani (India)",
|
||||
@@ -759,6 +764,7 @@ static const char *locale_names[] = {
|
||||
"Turkish (Cyprus)",
|
||||
"Turkish (Turkey)",
|
||||
"Tsonga (South Africa)",
|
||||
"Tatar",
|
||||
"Tatar (Russia)",
|
||||
"Central Atlas Tamazight",
|
||||
"Central Atlas Tamazight (Marrocos)",
|
||||
|
@@ -151,6 +151,71 @@ void CharString::copy_from(const char *p_cstr) {
|
||||
strcpy(ptrw(), p_cstr);
|
||||
}
|
||||
|
||||
Error String::parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const {
|
||||
// Splits the URL into scheme, host, port, path. Strip credentials when present.
|
||||
String base = *this;
|
||||
r_scheme = "";
|
||||
r_host = "";
|
||||
r_port = 0;
|
||||
r_path = "";
|
||||
int pos = base.find("://");
|
||||
// Scheme
|
||||
if (pos != -1) {
|
||||
r_scheme = base.substr(0, pos + 3).to_lower();
|
||||
base = base.substr(pos + 3, base.length() - pos - 3);
|
||||
}
|
||||
pos = base.find("/");
|
||||
// Path
|
||||
if (pos != -1) {
|
||||
r_path = base.substr(pos, base.length() - pos);
|
||||
base = base.substr(0, pos);
|
||||
}
|
||||
// Host
|
||||
pos = base.find("@");
|
||||
if (pos != -1) {
|
||||
// Strip credentials
|
||||
base = base.substr(pos + 1, base.length() - pos - 1);
|
||||
}
|
||||
if (base.begins_with("[")) {
|
||||
// Literal IPv6
|
||||
pos = base.rfind("]");
|
||||
if (pos == -1) {
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
r_host = base.substr(1, pos - 1);
|
||||
base = base.substr(pos + 1, base.length() - pos - 1);
|
||||
} else {
|
||||
// Anything else
|
||||
if (base.get_slice_count(":") > 2) {
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
pos = base.rfind(":");
|
||||
if (pos == -1) {
|
||||
r_host = base;
|
||||
base = "";
|
||||
} else {
|
||||
r_host = base.substr(0, pos);
|
||||
base = base.substr(pos, base.length() - pos);
|
||||
}
|
||||
}
|
||||
if (r_host.empty()) {
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
r_host = r_host.to_lower();
|
||||
// Port
|
||||
if (base.begins_with(":")) {
|
||||
base = base.substr(1, base.length() - 1);
|
||||
if (!base.is_valid_integer()) {
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
r_port = base.to_int();
|
||||
if (r_port < 1 || r_port > 65535) {
|
||||
return ERR_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
void String::copy_from(const char *p_cstr) {
|
||||
|
||||
if (!p_cstr) {
|
||||
|
@@ -334,6 +334,7 @@ public:
|
||||
String c_unescape() const;
|
||||
String json_escape() const;
|
||||
String word_wrap(int p_chars_per_line) const;
|
||||
Error parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const;
|
||||
|
||||
String percent_encode() const;
|
||||
String percent_decode() const;
|
||||
|
@@ -632,6 +632,10 @@ struct _VariantCall {
|
||||
r_ret = decompressed;
|
||||
ERR_FAIL_MSG("Decompression buffer size must be greater than zero.");
|
||||
}
|
||||
if (ba->size() == 0) {
|
||||
r_ret = decompressed;
|
||||
ERR_FAIL_MSG("Compressed buffer size must be greater than zero.");
|
||||
}
|
||||
|
||||
decompressed.resize(buffer_size);
|
||||
int result = Compression::decompress(decompressed.write().ptr(), buffer_size, ba->read().ptr(), ba->size(), mode);
|
||||
@@ -1681,9 +1685,9 @@ void register_variant_methods() {
|
||||
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmod, REAL, "mod", varray());
|
||||
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, posmodv, VECTOR2, "modv", varray());
|
||||
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, project, VECTOR2, "b", varray());
|
||||
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "b", REAL, "t", varray());
|
||||
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "b", REAL, "t", varray());
|
||||
ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "t", varray());
|
||||
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, linear_interpolate, VECTOR2, "to", REAL, "weight", varray());
|
||||
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, slerp, VECTOR2, "to", REAL, "weight", varray());
|
||||
ADDFUNC4R(VECTOR2, VECTOR2, Vector2, cubic_interpolate, VECTOR2, "b", VECTOR2, "pre_a", VECTOR2, "post_b", REAL, "weight", varray());
|
||||
ADDFUNC2R(VECTOR2, VECTOR2, Vector2, move_toward, VECTOR2, "to", REAL, "delta", varray());
|
||||
ADDFUNC1R(VECTOR2, VECTOR2, Vector2, rotated, REAL, "phi", varray());
|
||||
ADDFUNC0R(VECTOR2, VECTOR2, Vector2, tangent, varray());
|
||||
@@ -1729,9 +1733,9 @@ void register_variant_methods() {
|
||||
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray());
|
||||
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, VECTOR3, "by", varray());
|
||||
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
|
||||
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
|
||||
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "b", REAL, "t", varray());
|
||||
ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
|
||||
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "to", REAL, "weight", varray());
|
||||
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, slerp, VECTOR3, "to", REAL, "weight", varray());
|
||||
ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "weight", varray());
|
||||
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, move_toward, VECTOR3, "to", REAL, "delta", varray());
|
||||
ADDFUNC1R(VECTOR3, REAL, Vector3, dot, VECTOR3, "b", varray());
|
||||
ADDFUNC1R(VECTOR3, VECTOR3, Vector3, cross, VECTOR3, "b", varray());
|
||||
@@ -1769,9 +1773,9 @@ void register_variant_methods() {
|
||||
ADDFUNC0R(QUAT, QUAT, Quat, inverse, varray());
|
||||
ADDFUNC1R(QUAT, REAL, Quat, dot, QUAT, "b", varray());
|
||||
ADDFUNC1R(QUAT, VECTOR3, Quat, xform, VECTOR3, "v", varray());
|
||||
ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "b", REAL, "t", varray());
|
||||
ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "b", REAL, "t", varray());
|
||||
ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "t", varray());
|
||||
ADDFUNC2R(QUAT, QUAT, Quat, slerp, QUAT, "to", REAL, "weight", varray());
|
||||
ADDFUNC2R(QUAT, QUAT, Quat, slerpni, QUAT, "to", REAL, "weight", varray());
|
||||
ADDFUNC4R(QUAT, QUAT, Quat, cubic_slerp, QUAT, "b", QUAT, "pre_a", QUAT, "post_b", REAL, "weight", varray());
|
||||
ADDFUNC0R(QUAT, VECTOR3, Quat, get_euler, varray());
|
||||
ADDFUNC1(QUAT, NIL, Quat, set_euler, VECTOR3, "euler", varray());
|
||||
ADDFUNC2(QUAT, NIL, Quat, set_axis_angle, VECTOR3, "axis", REAL, "angle", varray());
|
||||
@@ -1785,7 +1789,7 @@ void register_variant_methods() {
|
||||
ADDFUNC0R(COLOR, REAL, Color, gray, varray());
|
||||
ADDFUNC0R(COLOR, COLOR, Color, inverted, varray());
|
||||
ADDFUNC0R(COLOR, COLOR, Color, contrasted, varray());
|
||||
ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "b", REAL, "t", varray());
|
||||
ADDFUNC2R(COLOR, COLOR, Color, linear_interpolate, COLOR, "to", REAL, "weight", varray());
|
||||
ADDFUNC1R(COLOR, COLOR, Color, blend, COLOR, "over", varray());
|
||||
ADDFUNC1R(COLOR, COLOR, Color, lightened, REAL, "amount", varray());
|
||||
ADDFUNC1R(COLOR, COLOR, Color, darkened, REAL, "amount", varray());
|
||||
@@ -1988,7 +1992,7 @@ void register_variant_methods() {
|
||||
ADDFUNC1R(BASIS, VECTOR3, Basis, xform, VECTOR3, "v", varray());
|
||||
ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
|
||||
ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
|
||||
ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", REAL, "t", varray());
|
||||
ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "to", REAL, "weight", varray());
|
||||
// For complicated reasons, the epsilon argument is always discarded. See #45062.
|
||||
ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", REAL, "epsilon", varray(CMP_EPSILON));
|
||||
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());
|
||||
|
@@ -76,11 +76,10 @@ public:
|
||||
typedef Error (*ParseResourceFunc)(void *p_self, Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str);
|
||||
|
||||
struct ResourceParser {
|
||||
|
||||
void *userdata;
|
||||
ParseResourceFunc func;
|
||||
ParseResourceFunc ext_func;
|
||||
ParseResourceFunc sub_func;
|
||||
void *userdata = nullptr;
|
||||
ParseResourceFunc func = nullptr;
|
||||
ParseResourceFunc ext_func = nullptr;
|
||||
ParseResourceFunc sub_func = nullptr;
|
||||
};
|
||||
|
||||
enum TokenType {
|
||||
|
@@ -1003,7 +1003,10 @@
|
||||
<constant name="JOY_BUTTON_21" value="21" enum="JoystickList">
|
||||
Gamepad button 21.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MAX" value="22" enum="JoystickList">
|
||||
<constant name="JOY_BUTTON_22" value="22" enum="JoystickList">
|
||||
Gamepad button 22.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MAX" value="23" enum="JoystickList">
|
||||
Represents the maximum number of joystick buttons supported.
|
||||
</constant>
|
||||
<constant name="JOY_SONY_CIRCLE" value="1" enum="JoystickList">
|
||||
@@ -1081,22 +1084,25 @@
|
||||
<constant name="JOY_DPAD_RIGHT" value="15" enum="JoystickList">
|
||||
Gamepad DPad right.
|
||||
</constant>
|
||||
<constant name="JOY_MISC1" value="16" enum="JoystickList">
|
||||
<constant name="JOY_GUIDE" value="16" enum="JoystickList">
|
||||
Gamepad SDL guide button.
|
||||
</constant>
|
||||
<constant name="JOY_MISC1" value="17" enum="JoystickList">
|
||||
Gamepad SDL miscellaneous button.
|
||||
</constant>
|
||||
<constant name="JOY_PADDLE1" value="17" enum="JoystickList">
|
||||
<constant name="JOY_PADDLE1" value="18" enum="JoystickList">
|
||||
Gamepad SDL paddle 1 button.
|
||||
</constant>
|
||||
<constant name="JOY_PADDLE2" value="18" enum="JoystickList">
|
||||
<constant name="JOY_PADDLE2" value="19" enum="JoystickList">
|
||||
Gamepad SDL paddle 2 button.
|
||||
</constant>
|
||||
<constant name="JOY_PADDLE3" value="19" enum="JoystickList">
|
||||
<constant name="JOY_PADDLE3" value="20" enum="JoystickList">
|
||||
Gamepad SDL paddle 3 button.
|
||||
</constant>
|
||||
<constant name="JOY_PADDLE4" value="20" enum="JoystickList">
|
||||
<constant name="JOY_PADDLE4" value="21" enum="JoystickList">
|
||||
Gamepad SDL paddle 4 button.
|
||||
</constant>
|
||||
<constant name="JOY_TOUCHPAD" value="21" enum="JoystickList">
|
||||
<constant name="JOY_TOUCHPAD" value="22" enum="JoystickList">
|
||||
Gamepad SDL touchpad button.
|
||||
</constant>
|
||||
<constant name="JOY_L" value="4" enum="JoystickList">
|
||||
|
@@ -15,192 +15,154 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="AABB">
|
||||
<return type="AABB">
|
||||
</return>
|
||||
<argument index="0" name="position" type="Vector3">
|
||||
</argument>
|
||||
<argument index="1" name="size" type="Vector3">
|
||||
</argument>
|
||||
<return type="AABB" />
|
||||
<argument index="0" name="position" type="Vector3" />
|
||||
<argument index="1" name="size" type="Vector3" />
|
||||
<description>
|
||||
Constructs an [AABB] from a position and size.
|
||||
</description>
|
||||
</method>
|
||||
<method name="abs">
|
||||
<return type="AABB">
|
||||
</return>
|
||||
<return type="AABB" />
|
||||
<description>
|
||||
Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="encloses">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="with" type="AABB">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="with" type="AABB" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this [AABB] completely encloses another one.
|
||||
</description>
|
||||
</method>
|
||||
<method name="expand">
|
||||
<return type="AABB">
|
||||
</return>
|
||||
<argument index="0" name="to_point" type="Vector3">
|
||||
</argument>
|
||||
<return type="AABB" />
|
||||
<argument index="0" name="to_point" type="Vector3" />
|
||||
<description>
|
||||
Returns this [AABB] expanded to include a given point.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_area">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the volume of the [AABB].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_endpoint">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Gets the position of the 8 endpoints of the [AABB] in space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_longest_axis">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the normalized longest axis of the [AABB].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_longest_axis_index">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_longest_axis_size">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the scalar length of the longest axis of the [AABB].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_shortest_axis">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the normalized shortest axis of the [AABB].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_shortest_axis_index">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_shortest_axis_size">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the scalar length of the shortest axis of the [AABB].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_support">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<argument index="0" name="dir" type="Vector3">
|
||||
</argument>
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="dir" type="Vector3" />
|
||||
<description>
|
||||
Returns the support point in a given direction. This is useful for collision detection algorithms.
|
||||
</description>
|
||||
</method>
|
||||
<method name="grow">
|
||||
<return type="AABB">
|
||||
</return>
|
||||
<argument index="0" name="by" type="float">
|
||||
</argument>
|
||||
<return type="AABB" />
|
||||
<argument index="0" name="by" type="float" />
|
||||
<description>
|
||||
Returns a copy of the [AABB] grown a given amount of units towards all the sides.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_no_area">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] is flat or empty.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_no_surface">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] is empty.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_point">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="point" type="Vector3">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="point" type="Vector3" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] contains a point.
|
||||
</description>
|
||||
</method>
|
||||
<method name="intersection">
|
||||
<return type="AABB">
|
||||
</return>
|
||||
<argument index="0" name="with" type="AABB">
|
||||
</argument>
|
||||
<return type="AABB" />
|
||||
<argument index="0" name="with" type="AABB" />
|
||||
<description>
|
||||
Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure.
|
||||
</description>
|
||||
</method>
|
||||
<method name="intersects">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="with" type="AABB">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="with" type="AABB" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] overlaps with another.
|
||||
</description>
|
||||
</method>
|
||||
<method name="intersects_plane">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="plane" type="Plane">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="plane" type="Plane" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] is on both sides of a plane.
|
||||
</description>
|
||||
</method>
|
||||
<method name="intersects_segment">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="from" type="Vector3">
|
||||
</argument>
|
||||
<argument index="1" name="to" type="Vector3">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="from" type="Vector3" />
|
||||
<argument index="1" name="to" type="Vector3" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_equal_approx">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="aabb" type="AABB">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="aabb" type="AABB" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component.
|
||||
</description>
|
||||
</method>
|
||||
<method name="merge">
|
||||
<return type="AABB">
|
||||
</return>
|
||||
<argument index="0" name="with" type="AABB">
|
||||
</argument>
|
||||
<return type="AABB" />
|
||||
<argument index="0" name="with" type="AABB" />
|
||||
<description>
|
||||
Returns a larger [AABB] that contains both this [AABB] and [code]with[/code].
|
||||
</description>
|
||||
|
@@ -12,36 +12,31 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_anchor_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the name given to this anchor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_is_active" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the anchor is being tracked and [code]false[/code] if no anchor with this ID is currently known.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mesh" qualifiers="const">
|
||||
<return type="Mesh">
|
||||
</return>
|
||||
<return type="Mesh" />
|
||||
<description>
|
||||
If provided by the [ARVRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_plane" qualifiers="const">
|
||||
<return type="Plane">
|
||||
</return>
|
||||
<return type="Plane" />
|
||||
<description>
|
||||
Returns a plane aligned with our anchor; handy for intersection testing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_size" qualifiers="const">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.
|
||||
</description>
|
||||
@@ -54,8 +49,7 @@
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="mesh_updated">
|
||||
<argument index="0" name="mesh" type="Mesh">
|
||||
</argument>
|
||||
<argument index="0" name="mesh" type="Mesh" />
|
||||
<description>
|
||||
Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being [code]mesh_updated[/code].
|
||||
</description>
|
||||
|
@@ -13,54 +13,45 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_controller_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
If active, returns the name of the associated controller if provided by the AR/VR SDK used.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hand" qualifiers="const">
|
||||
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
|
||||
</return>
|
||||
<return type="int" enum="ARVRPositionalTracker.TrackerHand" />
|
||||
<description>
|
||||
Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_is_active" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the bound controller is active. ARVR systems attempt to track active controllers.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_joystick_axis" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="axis" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="axis" type="int" />
|
||||
<description>
|
||||
Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_joystick_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the ID of the joystick object bound to this. Every controller tracked by the [ARVRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mesh" qualifiers="const">
|
||||
<return type="Mesh">
|
||||
</return>
|
||||
<return type="Mesh" />
|
||||
<description>
|
||||
If provided by the [ARVRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_button_pressed" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="button" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="button" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants.
|
||||
</description>
|
||||
@@ -80,22 +71,19 @@
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="button_pressed">
|
||||
<argument index="0" name="button" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="button" type="int" />
|
||||
<description>
|
||||
Emitted when a button on this controller is pressed.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="button_release">
|
||||
<argument index="0" name="button" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="button" type="int" />
|
||||
<description>
|
||||
Emitted when a button on this controller is released.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="mesh_updated">
|
||||
<argument index="0" name="mesh" type="Mesh">
|
||||
</argument>
|
||||
<argument index="0" name="mesh" type="Mesh" />
|
||||
<description>
|
||||
Emitted when the mesh associated with the controller changes or when one becomes available. Generally speaking this will be a static mesh after becoming available.
|
||||
</description>
|
||||
|
@@ -12,43 +12,37 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_camera_feed_id">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [CameraServer] for this interface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_capabilities" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_render_targetsize">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tracking_status" qualifiers="const">
|
||||
<return type="int" enum="ARVRInterface.Tracking_status">
|
||||
</return>
|
||||
<return type="int" enum="ARVRInterface.Tracking_status" />
|
||||
<description>
|
||||
If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking.
|
||||
</description>
|
||||
</method>
|
||||
<method name="initialize">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.
|
||||
After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.
|
||||
@@ -58,15 +52,13 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_stereo">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the current output of this interface is in stereo.
|
||||
</description>
|
||||
</method>
|
||||
<method name="uninitialize">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Turns the interface off.
|
||||
</description>
|
||||
|
@@ -13,80 +13,68 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_hand" qualifiers="const">
|
||||
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
|
||||
</return>
|
||||
<return type="int" enum="ARVRPositionalTracker.TrackerHand" />
|
||||
<description>
|
||||
Returns the hand holding this tracker, if known. See [enum TrackerHand] constants.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_joy_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mesh" qualifiers="const">
|
||||
<return type="Mesh">
|
||||
</return>
|
||||
<return type="Mesh" />
|
||||
<description>
|
||||
Returns the mesh related to a controller or anchor point if one is available.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the controller or anchor point's name if available.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_orientation" qualifiers="const">
|
||||
<return type="Basis">
|
||||
</return>
|
||||
<return type="Basis" />
|
||||
<description>
|
||||
Returns the controller's orientation matrix.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_position" qualifiers="const">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
Returns the world-space controller position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tracker_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [ARVRController] and [ARVRAnchor] nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tracks_orientation" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this device tracks orientation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tracks_position" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this device tracks position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transform" qualifiers="const">
|
||||
<return type="Transform">
|
||||
</return>
|
||||
<argument index="0" name="adjust_by_reference_frame" type="bool">
|
||||
</argument>
|
||||
<return type="Transform" />
|
||||
<argument index="0" name="adjust_by_reference_frame" type="bool" />
|
||||
<description>
|
||||
Returns the transform combining this device's orientation and position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_type" qualifiers="const">
|
||||
<return type="int" enum="ARVRServer.TrackerType">
|
||||
</return>
|
||||
<return type="int" enum="ARVRServer.TrackerType" />
|
||||
<description>
|
||||
Returns the tracker's type.
|
||||
</description>
|
||||
|
@@ -11,12 +11,9 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="center_on_hmd">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="rotation_mode" type="int" enum="ARVRServer.RotationMode">
|
||||
</argument>
|
||||
<argument index="1" name="keep_height" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="rotation_mode" type="int" enum="ARVRServer.RotationMode" />
|
||||
<argument index="1" name="keep_height" type="bool" />
|
||||
<description>
|
||||
This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.
|
||||
For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.
|
||||
@@ -27,84 +24,70 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_interface" qualifiers="const">
|
||||
<return type="ARVRInterface">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="ARVRInterface" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_hmd_transform">
|
||||
<return type="Transform">
|
||||
</return>
|
||||
<return type="Transform" />
|
||||
<description>
|
||||
Returns the primary interface's transformation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_interface" qualifiers="const">
|
||||
<return type="ARVRInterface">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="ARVRInterface" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the interface registered at a given index in our list of interfaces.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_interface_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_interfaces" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of available interfaces the ID and name of each interface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_last_commit_usec">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the absolute timestamp (in μs) of the last [ARVRServer] commit of the AR/VR eyes to [VisualServer]. The value comes from an internal call to [method OS.get_ticks_usec].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_last_frame_usec">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_last_process_usec">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the absolute timestamp (in μs) of the last [ARVRServer] process callback. The value comes from an internal call to [method OS.get_ticks_usec].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_reference_frame" qualifiers="const">
|
||||
<return type="Transform">
|
||||
</return>
|
||||
<return type="Transform" />
|
||||
<description>
|
||||
Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tracker" qualifiers="const">
|
||||
<return type="ARVRPositionalTracker">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="ARVRPositionalTracker" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the positional tracker at the given ID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_tracker_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of trackers currently registered.
|
||||
</description>
|
||||
@@ -120,37 +103,29 @@
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="interface_added">
|
||||
<argument index="0" name="interface_name" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="interface_name" type="String" />
|
||||
<description>
|
||||
Emitted when a new interface has been added.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="interface_removed">
|
||||
<argument index="0" name="interface_name" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="interface_name" type="String" />
|
||||
<description>
|
||||
Emitted when an interface is removed.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="tracker_added">
|
||||
<argument index="0" name="tracker_name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="type" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="tracker_name" type="String" />
|
||||
<argument index="1" name="type" type="int" />
|
||||
<argument index="2" name="id" type="int" />
|
||||
<description>
|
||||
Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [ARVRAnchor]s for an AR solution, it is important to react to this signal to add the appropriate [ARVRController] or [ARVRAnchor] nodes related to this new tracker.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="tracker_removed">
|
||||
<argument index="0" name="tracker_name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="type" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="tracker_name" type="String" />
|
||||
<argument index="1" name="type" type="int" />
|
||||
<argument index="2" name="id" type="int" />
|
||||
<description>
|
||||
Emitted when a tracker is removed. You should remove any [ARVRController] or [ARVRAnchor] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one).
|
||||
</description>
|
||||
|
@@ -18,44 +18,34 @@
|
||||
return min(0, abs(u - v) - 1)
|
||||
[/codeblock]
|
||||
[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
|
||||
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest cost paths. Here, the cost of a path equals to the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the end points of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals to the sum of Euclidean distances of all segments in the path.
|
||||
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the endpoints of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals the sum of Euclidean distances of all segments in the path.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_compute_cost" qualifiers="virtual">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Called when computing the cost between two connected points.
|
||||
Note that this function is hidden in the default [code]AStar[/code] class.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_estimate_cost" qualifiers="virtual">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Called when estimating the cost between a point and the path's ending point.
|
||||
Note that this function is hidden in the default [code]AStar[/code] class.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="Vector3">
|
||||
</argument>
|
||||
<argument index="2" name="weight_scale" type="float" default="1.0">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<argument index="2" name="weight_scale" type="float" default="1.0" />
|
||||
<description>
|
||||
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
|
||||
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
|
||||
@@ -67,34 +57,25 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="are_points_connected" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="bidirectional" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<argument index="2" name="bidirectional" type="bool" default="true" />
|
||||
<description>
|
||||
Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears all the points and segments.
|
||||
</description>
|
||||
</method>
|
||||
<method name="connect_points">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="bidirectional" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<argument index="2" name="bidirectional" type="bool" default="true" />
|
||||
<description>
|
||||
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
|
||||
[codeblock]
|
||||
@@ -106,42 +87,32 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="disconnect_points">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="bidirectional" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<argument index="2" name="bidirectional" type="bool" default="true" />
|
||||
<description>
|
||||
Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_available_point_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the next available point ID with no point associated to it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_point" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="Vector3">
|
||||
</argument>
|
||||
<argument index="1" name="include_disabled" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="to_position" type="Vector3" />
|
||||
<argument index="1" name="include_disabled" type="bool" default="false" />
|
||||
<description>
|
||||
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
|
||||
[b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_position_in_segment" qualifiers="const">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="Vector3">
|
||||
</argument>
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="to_position" type="Vector3" />
|
||||
<description>
|
||||
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
|
||||
[codeblock]
|
||||
@@ -155,12 +126,9 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_id_path">
|
||||
<return type="PoolIntArray">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
[codeblock]
|
||||
@@ -181,17 +149,14 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_capacity" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_connections">
|
||||
<return type="PoolIntArray">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the connection with the given point.
|
||||
[codeblock]
|
||||
@@ -209,114 +174,88 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of points currently in the points pool.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_path">
|
||||
<return type="PoolVector3Array">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="PoolVector3Array" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector3Array] and will print an error message.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_position" qualifiers="const">
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="Vector3" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns the position of the point associated with the given [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_weight_scale" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns the weight scale of the point associated with the given [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_points">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns an array of all points.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_point" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns whether a point associated with the given [code]id[/code] exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_point_disabled" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Removes the point associated with the given [code]id[/code] from the points pool.
|
||||
</description>
|
||||
</method>
|
||||
<method name="reserve_space">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="num_nodes" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="num_nodes" type="int" />
|
||||
<description>
|
||||
Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_disabled">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="disabled" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="disabled" type="bool" default="true" />
|
||||
<description>
|
||||
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="Vector3">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="position" type="Vector3" />
|
||||
<description>
|
||||
Sets the [code]position[/code] for the point with the given [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_weight_scale">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="weight_scale" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="weight_scale" type="float" />
|
||||
<description>
|
||||
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
|
||||
</description>
|
||||
|
@@ -10,38 +10,28 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_compute_cost" qualifiers="virtual">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Called when computing the cost between two connected points.
|
||||
Note that this function is hidden in the default [code]AStar2D[/code] class.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_estimate_cost" qualifiers="virtual">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Called when estimating the cost between a point and the path's ending point.
|
||||
Note that this function is hidden in the default [code]AStar2D[/code] class.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<argument index="2" name="weight_scale" type="float" default="1.0">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<argument index="2" name="weight_scale" type="float" default="1.0" />
|
||||
<description>
|
||||
Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger.
|
||||
The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path.
|
||||
@@ -53,32 +43,24 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="are_points_connected" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Returns whether there is a connection/segment between the given points.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears all the points and segments.
|
||||
</description>
|
||||
</method>
|
||||
<method name="connect_points">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="bidirectional" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<argument index="2" name="bidirectional" type="bool" default="true" />
|
||||
<description>
|
||||
Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction.
|
||||
[codeblock]
|
||||
@@ -90,40 +72,31 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="disconnect_points">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Deletes the segment between the given points.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_available_point_id" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the next available point ID with no point associated to it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_point" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="Vector2">
|
||||
</argument>
|
||||
<argument index="1" name="include_disabled" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="to_position" type="Vector2" />
|
||||
<argument index="1" name="include_disabled" type="bool" default="false" />
|
||||
<description>
|
||||
Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.
|
||||
[b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_closest_position_in_segment" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="Vector2">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="to_position" type="Vector2" />
|
||||
<description>
|
||||
Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points.
|
||||
[codeblock]
|
||||
@@ -137,12 +110,9 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_id_path">
|
||||
<return type="PoolIntArray">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
[codeblock]
|
||||
@@ -163,17 +133,14 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_capacity" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_connections">
|
||||
<return type="PoolIntArray">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns an array with the IDs of the points that form the connection with the given point.
|
||||
[codeblock]
|
||||
@@ -191,114 +158,88 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of points currently in the points pool.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_path">
|
||||
<return type="PoolVector2Array">
|
||||
</return>
|
||||
<argument index="0" name="from_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_id" type="int">
|
||||
</argument>
|
||||
<return type="PoolVector2Array" />
|
||||
<argument index="0" name="from_id" type="int" />
|
||||
<argument index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
|
||||
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PoolVector2Array] and will print an error message.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_position" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns the position of the point associated with the given [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_weight_scale" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns the weight scale of the point associated with the given [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_points">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns an array of all points.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_point" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns whether a point associated with the given [code]id[/code] exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_point_disabled" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Returns whether a point is disabled or not for pathfinding. By default, all points are enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<description>
|
||||
Removes the point associated with the given [code]id[/code] from the points pool.
|
||||
</description>
|
||||
</method>
|
||||
<method name="reserve_space">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="num_nodes" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="num_nodes" type="int" />
|
||||
<description>
|
||||
Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_disabled">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="disabled" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="disabled" type="bool" default="true" />
|
||||
<description>
|
||||
Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the [code]position[/code] for the point with the given [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_point_weight_scale">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="weight_scale" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="int" />
|
||||
<argument index="1" name="weight_scale" type="float" />
|
||||
<description>
|
||||
Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
|
||||
</description>
|
||||
|
@@ -10,47 +10,37 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_button">
|
||||
<return type="Button">
|
||||
</return>
|
||||
<argument index="0" name="text" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="right" type="bool" default="false">
|
||||
</argument>
|
||||
<argument index="2" name="action" type="String" default="""">
|
||||
</argument>
|
||||
<return type="Button" />
|
||||
<argument index="0" name="text" type="String" />
|
||||
<argument index="1" name="right" type="bool" default="false" />
|
||||
<argument index="2" name="action" type="String" default="""" />
|
||||
<description>
|
||||
Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed.
|
||||
If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_cancel">
|
||||
<return type="Button">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Button" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_label">
|
||||
<return type="Label">
|
||||
</return>
|
||||
<return type="Label" />
|
||||
<description>
|
||||
Returns the label used for built-in text.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_ok">
|
||||
<return type="Button">
|
||||
</return>
|
||||
<return type="Button" />
|
||||
<description>
|
||||
Returns the OK [Button] instance.
|
||||
</description>
|
||||
</method>
|
||||
<method name="register_text_enter">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="line_edit" type="Node">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="line_edit" type="Node" />
|
||||
<description>
|
||||
Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
|
||||
</description>
|
||||
@@ -76,8 +66,7 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="custom_action">
|
||||
<argument index="0" name="action" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="action" type="String" />
|
||||
<description>
|
||||
Emitted when a custom button is pressed. See [method add_button].
|
||||
</description>
|
||||
|
@@ -13,26 +13,21 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="is_playing" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if an animation is currently being played.
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="anim" type="String" default="""">
|
||||
</argument>
|
||||
<argument index="1" name="backwards" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="anim" type="String" default="""" />
|
||||
<argument index="1" name="backwards" type="bool" default="false" />
|
||||
<description>
|
||||
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the current animation (does not reset the frame counter).
|
||||
</description>
|
||||
|
@@ -11,24 +11,20 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="is_playing" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if an animation is currently being played.
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="anim" type="String" default="""">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="anim" type="String" default="""" />
|
||||
<description>
|
||||
Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the current animation (does not reset the frame counter).
|
||||
</description>
|
||||
|
@@ -13,30 +13,23 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_frame_delay" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="frame" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="frame" type="int" />
|
||||
<description>
|
||||
Returns the given frame's delay value.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_frame_texture" qualifiers="const">
|
||||
<return type="Texture">
|
||||
</return>
|
||||
<argument index="0" name="frame" type="int">
|
||||
</argument>
|
||||
<return type="Texture" />
|
||||
<argument index="0" name="frame" type="int" />
|
||||
<description>
|
||||
Returns the given frame's [Texture].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_frame_delay">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="frame" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="delay" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="frame" type="int" />
|
||||
<argument index="1" name="delay" type="float" />
|
||||
<description>
|
||||
Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code].
|
||||
For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:
|
||||
@@ -49,12 +42,9 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_frame_texture">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="frame" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="texture" type="Texture">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="frame" type="int" />
|
||||
<argument index="1" name="texture" type="Texture" />
|
||||
<description>
|
||||
Assigns a [Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1.
|
||||
You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation.
|
||||
|
@@ -21,673 +21,487 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_track">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="type" type="int" enum="Animation.TrackType">
|
||||
</argument>
|
||||
<argument index="1" name="at_position" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="type" type="int" enum="Animation.TrackType" />
|
||||
<argument index="1" name="at_position" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a track to the Animation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_track_get_key_animation" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_track_insert_key">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="animation" type="String">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="animation" type="String" />
|
||||
<description>
|
||||
Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_track_set_key_animation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="animation" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="animation" type="String" />
|
||||
<description>
|
||||
Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_get_key_end_offset" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
End offset is the number of seconds cut off at the ending of the audio stream.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_get_key_start_offset" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
Start offset is the number of seconds cut off at the beginning of the audio stream.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_get_key_stream" qualifiers="const">
|
||||
<return type="Resource">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="Resource" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_insert_key">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="stream" type="Resource">
|
||||
</argument>
|
||||
<argument index="3" name="start_offset" type="float" default="0">
|
||||
</argument>
|
||||
<argument index="4" name="end_offset" type="float" default="0">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="stream" type="Resource" />
|
||||
<argument index="3" name="start_offset" type="float" default="0" />
|
||||
<argument index="4" name="end_offset" type="float" default="0" />
|
||||
<description>
|
||||
Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
[code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_set_key_end_offset">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="offset" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="offset" type="float" />
|
||||
<description>
|
||||
Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_set_key_start_offset">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="offset" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="offset" type="float" />
|
||||
<description>
|
||||
Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="audio_track_set_key_stream">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="stream" type="Resource">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="stream" type="Resource" />
|
||||
<description>
|
||||
Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_get_key_in_handle" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_get_key_out_handle" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_get_key_value" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_insert_key">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="value" type="float">
|
||||
</argument>
|
||||
<argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )">
|
||||
</argument>
|
||||
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="value" type="float" />
|
||||
<argument index="3" name="in_handle" type="Vector2" default="Vector2( 0, 0 )" />
|
||||
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )" />
|
||||
<description>
|
||||
Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
[code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_interpolate" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<description>
|
||||
Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_set_key_in_handle">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="in_handle" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="in_handle" type="Vector2" />
|
||||
<description>
|
||||
Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_set_key_out_handle">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="out_handle" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="out_handle" type="Vector2" />
|
||||
<description>
|
||||
Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bezier_track_set_key_value">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="value" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="value" type="float" />
|
||||
<description>
|
||||
Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clear the animation (clear all tracks and reset all).
|
||||
</description>
|
||||
</method>
|
||||
<method name="copy_track">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_animation" type="Animation">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="to_animation" type="Animation" />
|
||||
<description>
|
||||
Adds a new track that is a copy of the given track from [code]to_animation[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_track" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="path" type="NodePath">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
Returns the index of the specified track. If the track is not found, return -1.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_track_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the amount of tracks in the animation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="method_track_get_key_indices" qualifiers="const">
|
||||
<return type="PoolIntArray">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="delta" type="float">
|
||||
</argument>
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<argument index="2" name="delta" type="float" />
|
||||
<description>
|
||||
Returns all the key indices of a method track, given a position and delta time.
|
||||
</description>
|
||||
</method>
|
||||
<method name="method_track_get_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the method name of a method track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="method_track_get_params" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the arguments values to be called on a method track for a given key in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_track">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Removes a track by specifying the track index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_find_key" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="exact" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="exact" type="bool" default="false" />
|
||||
<description>
|
||||
Finds the key index by time in a given track. Optionally, only find it if the exact time is given.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_interpolation_loop_wrap" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_interpolation_type" qualifiers="const">
|
||||
<return type="int" enum="Animation.InterpolationType">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" enum="Animation.InterpolationType" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Returns the interpolation type of a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_key_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Returns the amount of keys in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_key_time" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the time at which the key is located.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_key_transition" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_key_value" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Returns the value of a given key in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_path" qualifiers="const">
|
||||
<return type="NodePath">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="NodePath" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Gets the path of a track. For more information on the path format, see [method track_set_path].
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_get_type" qualifiers="const">
|
||||
<return type="int" enum="Animation.TrackType">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" enum="Animation.TrackType" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Gets the type of a track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_insert_key">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="key" type="Variant">
|
||||
</argument>
|
||||
<argument index="3" name="transition" type="float" default="1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="key" type="Variant" />
|
||||
<argument index="3" name="transition" type="float" default="1" />
|
||||
<description>
|
||||
Insert a generic key in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_is_enabled" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the track at index [code]idx[/code] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_is_imported" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_move_down">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Moves a track down.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_move_to">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="to_idx" type="int" />
|
||||
<description>
|
||||
Changes the index position of track [code]idx[/code] to the one defined in [code]to_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_move_up">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Moves a track up.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_remove_key">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<description>
|
||||
Removes a key by index in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_remove_key_at_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="position" type="float" />
|
||||
<description>
|
||||
Removes a key by position (seconds) in a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_enabled">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="enabled" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="enabled" type="bool" />
|
||||
<description>
|
||||
Enables/disables the given track. Tracks are enabled by default.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_imported">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="imported" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="imported" type="bool" />
|
||||
<description>
|
||||
Sets the given track as imported or not.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_interpolation_loop_wrap">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="interpolation" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="interpolation" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_interpolation_type">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType" />
|
||||
<description>
|
||||
Sets the interpolation type of a given track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_key_time">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="time" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="time" type="float" />
|
||||
<description>
|
||||
Sets the time of an existing key.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_key_transition">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="transition" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key_idx" type="int" />
|
||||
<argument index="2" name="transition" type="float" />
|
||||
<description>
|
||||
Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_key_value">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="key" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="key" type="int" />
|
||||
<argument index="2" name="value" type="Variant" />
|
||||
<description>
|
||||
Sets the value of an existing key.
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_set_path">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="path" type="NodePath">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="path" type="NodePath" />
|
||||
<description>
|
||||
Sets the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
|
||||
Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code].
|
||||
For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="track_swap">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="with_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="with_idx" type="int" />
|
||||
<description>
|
||||
Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transform_track_insert_key">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="location" type="Vector3">
|
||||
</argument>
|
||||
<argument index="3" name="rotation" type="Quat">
|
||||
</argument>
|
||||
<argument index="4" name="scale" type="Vector3">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="location" type="Vector3" />
|
||||
<argument index="3" name="rotation" type="Quat" />
|
||||
<argument index="4" name="scale" type="Vector3" />
|
||||
<description>
|
||||
Insert a transform key for a transform track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="transform_track_interpolate" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<description>
|
||||
Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quat]) and scale ([Vector3]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="value_track_get_key_indices" qualifiers="const">
|
||||
<return type="PoolIntArray">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="delta" type="float">
|
||||
</argument>
|
||||
<return type="PoolIntArray" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<argument index="2" name="delta" type="float" />
|
||||
<description>
|
||||
Returns all the key indices of a value track, given a position and delta time.
|
||||
</description>
|
||||
</method>
|
||||
<method name="value_track_get_update_mode" qualifiers="const">
|
||||
<return type="int" enum="Animation.UpdateMode">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" enum="Animation.UpdateMode" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<description>
|
||||
Returns the update mode of a value track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="value_track_interpolate" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<description>
|
||||
Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track.
|
||||
</description>
|
||||
</method>
|
||||
<method name="value_track_set_update_mode">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="track_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="track_idx" type="int" />
|
||||
<argument index="1" name="mode" type="int" enum="Animation.UpdateMode" />
|
||||
<description>
|
||||
Sets the update mode (see [enum UpdateMode]) of a value track.
|
||||
</description>
|
||||
|
@@ -12,158 +12,117 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_input">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree].
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend_animation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="animation" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="delta" type="float">
|
||||
</argument>
|
||||
<argument index="3" name="seeked" type="bool">
|
||||
</argument>
|
||||
<argument index="4" name="blend" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="animation" type="String" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="delta" type="float" />
|
||||
<argument index="3" name="seeked" type="bool" />
|
||||
<argument index="4" name="blend" type="float" />
|
||||
<description>
|
||||
Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened.
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend_input">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="input_index" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="seek" type="bool">
|
||||
</argument>
|
||||
<argument index="3" name="blend" type="float">
|
||||
</argument>
|
||||
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0">
|
||||
</argument>
|
||||
<argument index="5" name="optimize" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="input_index" type="int" />
|
||||
<argument index="1" name="time" type="float" />
|
||||
<argument index="2" name="seek" type="bool" />
|
||||
<argument index="3" name="blend" type="float" />
|
||||
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
|
||||
<argument index="5" name="optimize" type="bool" default="true" />
|
||||
<description>
|
||||
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend_node">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="node" type="AnimationNode">
|
||||
</argument>
|
||||
<argument index="2" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="3" name="seek" type="bool">
|
||||
</argument>
|
||||
<argument index="4" name="blend" type="float">
|
||||
</argument>
|
||||
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0">
|
||||
</argument>
|
||||
<argument index="6" name="optimize" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<argument index="2" name="time" type="float" />
|
||||
<argument index="3" name="seek" type="bool" />
|
||||
<argument index="4" name="blend" type="float" />
|
||||
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
|
||||
<argument index="6" name="optimize" type="bool" default="true" />
|
||||
<description>
|
||||
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_caption" qualifiers="virtual">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Gets the text caption for this node (used by some editors).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_child_by_name" qualifiers="virtual">
|
||||
<return type="Object">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Object" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_child_nodes" qualifiers="virtual">
|
||||
<return type="Dictionary">
|
||||
</return>
|
||||
<return type="Dictionary" />
|
||||
<description>
|
||||
Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_input_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_input_name">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="input" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<description>
|
||||
Gets the name of an input by index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parameter" qualifiers="const">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parameter_default_value" qualifiers="virtual">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Variant" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_parameter_list" qualifiers="virtual">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_filter" qualifiers="virtual">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_path_filtered" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="path" type="NodePath">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<description>
|
||||
Returns [code]true[/code] whether a given path is filtered.
|
||||
</description>
|
||||
</method>
|
||||
<method name="process" qualifiers="virtual">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="time" type="float">
|
||||
</argument>
|
||||
<argument index="1" name="seek" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="time" type="float" />
|
||||
<argument index="1" name="seek" type="bool" />
|
||||
<description>
|
||||
User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
|
||||
Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
|
||||
@@ -171,32 +130,24 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_input">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="index" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<description>
|
||||
Removes an input, call this only when inactive.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_filter_path">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="path" type="NodePath">
|
||||
</argument>
|
||||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="path" type="NodePath" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
Adds or removes a path for the filter.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_parameter">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes.
|
||||
</description>
|
||||
|
@@ -14,70 +14,53 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_blend_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="node" type="AnimationRootNode">
|
||||
</argument>
|
||||
<argument index="1" name="pos" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="at_index" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="AnimationRootNode" />
|
||||
<argument index="1" name="pos" type="float" />
|
||||
<argument index="2" name="at_index" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of points on the blend axis.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_node" qualifiers="const">
|
||||
<return type="AnimationRootNode">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<return type="AnimationRootNode" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the [AnimationNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_position" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the position of the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_blend_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Removes the point at index [code]point[/code] from the blend axis.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="node" type="AnimationRootNode">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="node" type="AnimationRootNode" />
|
||||
<description>
|
||||
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="pos" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="pos" type="float" />
|
||||
<description>
|
||||
Updates the position of the point at index [code]point[/code] on the blend axis.
|
||||
</description>
|
||||
|
@@ -14,112 +14,84 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_blend_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="node" type="AnimationRootNode">
|
||||
</argument>
|
||||
<argument index="1" name="pos" type="Vector2">
|
||||
</argument>
|
||||
<argument index="2" name="at_index" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="AnimationRootNode" />
|
||||
<argument index="1" name="pos" type="Vector2" />
|
||||
<argument index="2" name="at_index" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_triangle">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="x" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="y" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="z" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="at_index" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="x" type="int" />
|
||||
<argument index="1" name="y" type="int" />
|
||||
<argument index="2" name="z" type="int" />
|
||||
<argument index="3" name="at_index" type="int" default="-1" />
|
||||
<description>
|
||||
Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of points in the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_node" qualifiers="const">
|
||||
<return type="AnimationRootNode">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<return type="AnimationRootNode" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the [AnimationRootNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_point_position" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Returns the position of the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_triangle_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of triangles in the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_triangle_point">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="triangle" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="point" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="triangle" type="int" />
|
||||
<argument index="1" name="point" type="int" />
|
||||
<description>
|
||||
Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_blend_point">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<description>
|
||||
Removes the point at index [code]point[/code] from the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_triangle">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="triangle" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="triangle" type="int" />
|
||||
<description>
|
||||
Removes the triangle at index [code]triangle[/code] from the blend space.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="node" type="AnimationRootNode">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="node" type="AnimationRootNode" />
|
||||
<description>
|
||||
Changes the [AnimationNode] referenced by the point at index [code]point[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_point_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="point" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="pos" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="point" type="int" />
|
||||
<argument index="1" name="pos" type="Vector2" />
|
||||
<description>
|
||||
Updates the position of the point at index [code]point[/code] on the blend axis.
|
||||
</description>
|
||||
|
@@ -11,96 +11,71 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="node" type="AnimationNode">
|
||||
</argument>
|
||||
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
|
||||
<description>
|
||||
Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
|
||||
</description>
|
||||
</method>
|
||||
<method name="connect_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="input_node" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="input_index" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="output_node" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="input_node" type="String" />
|
||||
<argument index="1" name="input_index" type="int" />
|
||||
<argument index="2" name="output_node" type="String" />
|
||||
<description>
|
||||
Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="disconnect_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="input_node" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="input_index" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="input_node" type="String" />
|
||||
<argument index="1" name="input_index" type="int" />
|
||||
<description>
|
||||
Disconnects the node connected to the specified input.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node" qualifiers="const">
|
||||
<return type="AnimationNode">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="AnimationNode" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the sub-node with the specified [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_position" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the position of the sub-node with the specified [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_node" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Removes a sub-node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="new_name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
Changes the name of a sub-node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_node_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Modifies the position of a sub-node.
|
||||
</description>
|
||||
|
@@ -12,16 +12,13 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_mix_mode" qualifiers="const">
|
||||
<return type="int" enum="AnimationNodeOneShot.MixMode">
|
||||
</return>
|
||||
<return type="int" enum="AnimationNodeOneShot.MixMode" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_mix_mode">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
@@ -16,218 +16,167 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="node" type="AnimationNode">
|
||||
</argument>
|
||||
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )" />
|
||||
<description>
|
||||
Adds a new node to the graph. The [code]position[/code] is used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_transition">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="from" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="to" type="String">
|
||||
</argument>
|
||||
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="from" type="String" />
|
||||
<argument index="1" name="to" type="String" />
|
||||
<argument index="2" name="transition" type="AnimationNodeStateMachineTransition" />
|
||||
<description>
|
||||
Adds a transition between the given nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_end_node" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the graph's end node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_graph_offset" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
Returns the draw offset of the graph. Used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node" qualifiers="const">
|
||||
<return type="AnimationNode">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="AnimationNode" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the animation node with the given name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="node" type="AnimationNode">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="node" type="AnimationNode" />
|
||||
<description>
|
||||
Returns the given animation node's name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_position" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the given node's coordinates. Used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_start_node" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the graph's end node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition" qualifiers="const">
|
||||
<return type="AnimationNodeStateMachineTransition">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="AnimationNodeStateMachineTransition" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the given transition.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of connections in the graph.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition_from" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the given transition's start node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_transition_to" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the given transition's end node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_node" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the graph contains the given node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_transition" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="from" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="to" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="from" type="String" />
|
||||
<argument index="1" name="to" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if there is a transition between the given nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Deletes the given node from the graph.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_transition">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="from" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="to" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="from" type="String" />
|
||||
<argument index="1" name="to" type="String" />
|
||||
<description>
|
||||
Deletes the transition between the two specified nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_transition_by_index">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="idx" type="int" />
|
||||
<description>
|
||||
Deletes the given transition by index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="new_name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
Renames the given node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="replace_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="node" type="AnimationNode">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="node" type="AnimationNode" />
|
||||
<description>
|
||||
Replaces the node and keeps its transitions unchanged.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_end_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Sets the given node as the graph end point.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_graph_offset">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="offset" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="offset" type="Vector2" />
|
||||
<description>
|
||||
Sets the draw offset of the graph. Used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_node_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="position" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="position" type="Vector2" />
|
||||
<description>
|
||||
Sets the node's coordinates. Used for display in the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_start_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Sets the given node as the graph start point.
|
||||
</description>
|
||||
|
@@ -16,60 +16,50 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_current_length" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_node" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the currently playing animation state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_current_play_position" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the playback position within the current animation state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_travel_path" qualifiers="const">
|
||||
<return type="PoolStringArray">
|
||||
</return>
|
||||
<return type="PoolStringArray" />
|
||||
<description>
|
||||
Returns the current travel path as computed internally by the A* algorithm.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_playing" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if an animation is playing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="start">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="node" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="node" type="String" />
|
||||
<description>
|
||||
Starts playing the given animation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the currently playing animation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="travel">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="to_node" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="to_node" type="String" />
|
||||
<description>
|
||||
Transitions from the current state to another one, following the shortest path.
|
||||
</description>
|
||||
|
@@ -13,38 +13,28 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_input_caption" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="input" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_input_set_as_auto_advance" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="input" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_input_as_auto_advance">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="input" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_input_caption">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="input" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="caption" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="input" type="int" />
|
||||
<argument index="1" name="caption" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
@@ -15,136 +15,106 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_animation">
|
||||
<return type="int" enum="Error">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="animation" type="Animation">
|
||||
</argument>
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="animation" type="Animation" />
|
||||
<description>
|
||||
Adds [code]animation[/code] to the player accessible with the key [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="advance">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="delta" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_get_next" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="anim_from" type="String">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="anim_from" type="String" />
|
||||
<description>
|
||||
Returns the name of the next animation in the queue.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_set_next">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="anim_from" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="anim_to" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="anim_from" type="String" />
|
||||
<argument index="1" name="anim_to" type="String" />
|
||||
<description>
|
||||
Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_caches">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
[AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_queue">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears all queued, unplayed animations.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_animation" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="animation" type="Animation">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="animation" type="Animation" />
|
||||
<description>
|
||||
Returns the name of [code]animation[/code] or an empty string if not found.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_animation" qualifiers="const">
|
||||
<return type="Animation">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="Animation" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_animation_list" qualifiers="const">
|
||||
<return type="PoolStringArray">
|
||||
</return>
|
||||
<return type="PoolStringArray" />
|
||||
<description>
|
||||
Returns the list of stored animation names.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_time" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="anim_from" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="anim_to" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="anim_from" type="String" />
|
||||
<argument index="1" name="anim_to" type="String" />
|
||||
<description>
|
||||
Gets the blend time (in seconds) between two animations, referenced by their names.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_playing_speed" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_queue">
|
||||
<return type="PoolStringArray">
|
||||
</return>
|
||||
<return type="PoolStringArray" />
|
||||
<description>
|
||||
Returns a list of the animation names that are currently queued to play.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_animation" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_playing" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if playing an animation.
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String" default="""">
|
||||
</argument>
|
||||
<argument index="1" name="custom_blend" type="float" default="-1">
|
||||
</argument>
|
||||
<argument index="2" name="custom_speed" type="float" default="1.0">
|
||||
</argument>
|
||||
<argument index="3" name="from_end" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" default="""" />
|
||||
<argument index="1" name="custom_blend" type="float" default="-1" />
|
||||
<argument index="2" name="custom_speed" type="float" default="1.0" />
|
||||
<argument index="3" name="from_end" type="bool" default="false" />
|
||||
<description>
|
||||
Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).
|
||||
The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing.
|
||||
@@ -152,76 +122,57 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="play_backwards">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String" default="""">
|
||||
</argument>
|
||||
<argument index="1" name="custom_blend" type="float" default="-1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" default="""" />
|
||||
<argument index="1" name="custom_blend" type="float" default="-1" />
|
||||
<description>
|
||||
Plays the animation with key [code]name[/code] in reverse.
|
||||
This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
|
||||
</description>
|
||||
</method>
|
||||
<method name="queue">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Queues an animation for playback once the current one is done.
|
||||
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_animation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Removes the animation with key [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_animation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="newname" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<argument index="1" name="newname" type="String" />
|
||||
<description>
|
||||
Renames an existing animation with key [code]name[/code] to [code]newname[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="seek">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="seconds" type="float">
|
||||
</argument>
|
||||
<argument index="1" name="update" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="seconds" type="float" />
|
||||
<argument index="1" name="update" type="bool" default="false" />
|
||||
<description>
|
||||
Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_blend_time">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="anim_from" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="anim_to" type="String">
|
||||
</argument>
|
||||
<argument index="2" name="sec" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="anim_from" type="String" />
|
||||
<argument index="1" name="anim_to" type="String" />
|
||||
<argument index="2" name="sec" type="float" />
|
||||
<description>
|
||||
Specifies a blend time (in seconds) between two animations, referenced by their names.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="reset" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="reset" type="bool" default="true" />
|
||||
<description>
|
||||
Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code].
|
||||
If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation.
|
||||
@@ -266,24 +217,20 @@
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="animation_changed">
|
||||
<argument index="0" name="old_name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="new_name" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="old_name" type="String" />
|
||||
<argument index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
If the currently being played animation changes, this signal will notify of such change.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="animation_finished">
|
||||
<argument index="0" name="anim_name" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="anim_name" type="String" />
|
||||
<description>
|
||||
Notifies when an animation finished playing.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="animation_started">
|
||||
<argument index="0" name="anim_name" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="anim_name" type="String" />
|
||||
<description>
|
||||
Notifies when an animation starts playing.
|
||||
</description>
|
||||
|
@@ -7,33 +7,27 @@
|
||||
Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">https://docs.godotengine.org/en/3.3/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">https://docs.godotengine.org/en/3.3/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="advance">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="delta" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Manually advance the animations by the specified time (in seconds).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_root_motion_transform" qualifiers="const">
|
||||
<return type="Transform">
|
||||
</return>
|
||||
<return type="Transform" />
|
||||
<description>
|
||||
Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation.
|
||||
Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation. See also [member root_motion_track] and [RootMotionView].
|
||||
</description>
|
||||
</method>
|
||||
<method name="rename_parameter">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="old_name" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="new_name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="old_name" type="String" />
|
||||
<argument index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
@@ -50,7 +44,7 @@
|
||||
</member>
|
||||
<member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")">
|
||||
The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
|
||||
If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place.
|
||||
If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
|
||||
</member>
|
||||
<member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
|
||||
The root animation node of this [AnimationTree]. See [AnimationNode].
|
||||
|
@@ -13,116 +13,86 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType">
|
||||
</argument>
|
||||
<argument index="1" name="id" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType" />
|
||||
<argument index="1" name="id" type="String" />
|
||||
<description>
|
||||
Adds a [code]type[/code] node to the graph with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="advance">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="delta" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="delta" type="float" />
|
||||
<description>
|
||||
Shifts position in the animation timeline. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_node_get_animation" qualifiers="const">
|
||||
<return type="Animation">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="Animation" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the [AnimationPlayer]'s [Animation] bound to the [AnimationTreePlayer]'s animation node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_node_get_master_animation" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the name of the [member master_player]'s [Animation] bound to this animation node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_node_get_position" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the absolute playback timestamp of the animation node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_node_set_animation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="animation" type="Animation">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="animation" type="Animation" />
|
||||
<description>
|
||||
Binds a new [Animation] from the [member master_player] to the [AnimationTreePlayer]'s animation node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_node_set_filter_path">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="path" type="NodePath">
|
||||
</argument>
|
||||
<argument index="2" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="path" type="NodePath" />
|
||||
<argument index="2" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]enable[/code] is [code]true[/code], the animation node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
|
||||
</description>
|
||||
</method>
|
||||
<method name="animation_node_set_master_animation">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="source" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="source" type="String" />
|
||||
<description>
|
||||
Binds the [Animation] named [code]source[/code] from [member master_player] to the animation node [code]id[/code]. Recalculates caches.
|
||||
</description>
|
||||
</method>
|
||||
<method name="are_nodes_connected" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="dst_id" type="String">
|
||||
</argument>
|
||||
<argument index="2" name="dst_input_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="dst_id" type="String" />
|
||||
<argument index="2" name="dst_input_idx" type="int" />
|
||||
<description>
|
||||
Returns whether node [code]id[/code] and [code]dst_id[/code] are connected at the specified slot.
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend2_node_get_amount" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the blend amount of a Blend2 node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend2_node_set_amount">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="blend" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="blend" type="float" />
|
||||
<description>
|
||||
Sets the blend amount of a Blend2 node given its name and value.
|
||||
A Blend2 node blends two animations (A and B) with the amount between 0 and 1.
|
||||
@@ -130,34 +100,25 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend2_node_set_filter_path">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="path" type="NodePath">
|
||||
</argument>
|
||||
<argument index="2" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="path" type="NodePath" />
|
||||
<argument index="2" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]enable[/code] is [code]true[/code], the Blend2 node with name [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend3_node_get_amount" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the blend amount of a Blend3 node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend3_node_set_amount">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="blend" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="blend" type="float" />
|
||||
<description>
|
||||
Sets the blend amount of a Blend3 node given its name and value.
|
||||
A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1.
|
||||
@@ -165,21 +126,16 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend4_node_get_amount" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the blend amount of a Blend4 node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="blend4_node_set_amount">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="blend" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="blend" type="Vector2" />
|
||||
<description>
|
||||
Sets the blend amount of a Blend4 node given its name and value.
|
||||
A Blend4 Node blends two pairs of animations.
|
||||
@@ -187,305 +143,231 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="connect_nodes">
|
||||
<return type="int" enum="Error">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="dst_id" type="String">
|
||||
</argument>
|
||||
<argument index="2" name="dst_input_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="dst_id" type="String" />
|
||||
<argument index="2" name="dst_input_idx" type="int" />
|
||||
<description>
|
||||
Connects node [code]id[/code] to [code]dst_id[/code] at the specified input slot.
|
||||
</description>
|
||||
</method>
|
||||
<method name="disconnect_nodes">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="dst_input_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="dst_input_idx" type="int" />
|
||||
<description>
|
||||
Disconnects nodes connected to [code]id[/code] at the specified input slot.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_node_list">
|
||||
<return type="PoolStringArray">
|
||||
</return>
|
||||
<return type="PoolStringArray" />
|
||||
<description>
|
||||
Returns a [PoolStringArray] containing the name of all nodes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="mix_node_get_amount" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the mix amount of a Mix node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="mix_node_set_amount">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="ratio" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="ratio" type="float" />
|
||||
<description>
|
||||
Sets the mix amount of a Mix node given its name and value.
|
||||
A Mix node adds input b to input a by the amount given by ratio.
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_exists" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="node" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="node" type="String" />
|
||||
<description>
|
||||
Check if a node exists (by name).
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_get_input_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the input count for a given node. Different types of nodes have different amount of inputs.
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_get_input_source" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="idx" type="int" />
|
||||
<description>
|
||||
Returns the input source for a given node input.
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_get_position" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns position of a node in the graph given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_get_type" qualifiers="const">
|
||||
<return type="int" enum="AnimationTreePlayer.NodeType">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="int" enum="AnimationTreePlayer.NodeType" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Gets the node type, will return from [enum NodeType] enum.
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_rename">
|
||||
<return type="int" enum="Error">
|
||||
</return>
|
||||
<argument index="0" name="node" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="new_name" type="String">
|
||||
</argument>
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="node" type="String" />
|
||||
<argument index="1" name="new_name" type="String" />
|
||||
<description>
|
||||
Renames a node in the graph.
|
||||
</description>
|
||||
</method>
|
||||
<method name="node_set_position">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="screen_position" type="Vector2">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="screen_position" type="Vector2" />
|
||||
<description>
|
||||
Sets the position of a node in the graph given its name and position.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_get_autorestart_delay" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the autostart delay of a OneShot node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_get_autorestart_random_delay" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the autostart random delay of a OneShot node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_get_fadein_time" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the fade in time of a OneShot node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_get_fadeout_time" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the fade out time of a OneShot node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_has_autorestart" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns whether a OneShot node will auto restart given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_is_active" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns whether a OneShot node is active given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_set_autorestart">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
Sets the autorestart property of a OneShot node given its name and value.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_set_autorestart_delay">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="delay_sec" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="delay_sec" type="float" />
|
||||
<description>
|
||||
Sets the autorestart delay of a OneShot node given its name and value in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_set_autorestart_random_delay">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="rand_sec" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="rand_sec" type="float" />
|
||||
<description>
|
||||
Sets the autorestart random delay of a OneShot node given its name and value in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_set_fadein_time">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<description>
|
||||
Sets the fade in time of a OneShot node given its name and value in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_set_fadeout_time">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<description>
|
||||
Sets the fade out time of a OneShot node given its name and value in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_set_filter_path">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="path" type="NodePath">
|
||||
</argument>
|
||||
<argument index="2" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="path" type="NodePath" />
|
||||
<argument index="2" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]enable[/code] is [code]true[/code], the OneShot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_start">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Starts a OneShot node given its name.
|
||||
</description>
|
||||
</method>
|
||||
<method name="oneshot_node_stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Stops the OneShot node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="recompute_caches">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_node">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Removes the animation node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="reset">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Resets this [AnimationTreePlayer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="timescale_node_get_scale" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the time scale value of the TimeScale node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="timescale_node_set_scale">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="scale" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="scale" type="float" />
|
||||
<description>
|
||||
Sets the time scale of the TimeScale node with name [code]id[/code] to [code]scale[/code].
|
||||
The TimeScale node is used to speed [Animation]s up if the scale is above 1 or slow them down if it is below 1.
|
||||
@@ -493,108 +375,80 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="timeseek_node_seek">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="seconds" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="seconds" type="float" />
|
||||
<description>
|
||||
Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code].
|
||||
This functions as a seek in the [Animation] or the blend or mix of [Animation]s input in it.
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_delete_input">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="input_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="input_idx" type="int" />
|
||||
<description>
|
||||
Deletes the input at [code]input_idx[/code] for the transition node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_get_current" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the index of the currently evaluated input for the transition node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_get_input_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the number of inputs for the transition node with name [code]id[/code]. You can add inputs by right-clicking on the transition node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_get_xfade_time" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<description>
|
||||
Returns the cross fade time for the transition node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_has_input_auto_advance" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="input_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="input_idx" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the input at [code]input_idx[/code] on the transition node with name [code]id[/code] is set to automatically advance to the next input upon completion.
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_set_current">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="input_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="input_idx" type="int" />
|
||||
<description>
|
||||
The transition node with name [code]id[/code] sets its current input at [code]input_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_set_input_auto_advance">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="input_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="input_idx" type="int" />
|
||||
<argument index="2" name="enable" type="bool" />
|
||||
<description>
|
||||
The transition node with name [code]id[/code] advances to its next input automatically when the input at [code]input_idx[/code] completes.
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_set_input_count">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="count" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="count" type="int" />
|
||||
<description>
|
||||
Resizes the number of inputs available for the transition node with name [code]id[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="transition_node_set_xfade_time">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="id" type="String">
|
||||
</argument>
|
||||
<argument index="1" name="time_sec" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="id" type="String" />
|
||||
<argument index="1" name="time_sec" type="float" />
|
||||
<description>
|
||||
The transition node with name [code]id[/code] sets its cross fade time to [code]time_sec[/code].
|
||||
</description>
|
||||
|
@@ -12,52 +12,42 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_collision_layer_bit" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns an individual bit on the layer mask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_mask_bit" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns an individual bit on the collision mask.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_overlapping_areas" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of intersecting [Area]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_overlapping_bodies" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of intersecting [PhysicsBody]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="overlaps_area" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="area" type="Node">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="area" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], the given area overlaps the Area.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="overlaps_body" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="body" type="Node">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], the given physics body overlaps the Area.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
@@ -65,23 +55,17 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_layer_bit">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Set/clear individual bits on the layer mask. This simplifies editing this [Area]'s layers.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_mask_bit">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Set/clear individual bits on the collision mask. This simplifies editing which [Area] layers this [Area] scans.
|
||||
</description>
|
||||
@@ -105,7 +89,7 @@
|
||||
The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8">
|
||||
The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
|
||||
The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
|
||||
</member>
|
||||
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
|
||||
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
|
||||
@@ -147,30 +131,24 @@
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="area_entered">
|
||||
<argument index="0" name="area" type="Area">
|
||||
</argument>
|
||||
<argument index="0" name="area" type="Area" />
|
||||
<description>
|
||||
Emitted when another Area enters this Area. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area[/code] the other Area.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_exited">
|
||||
<argument index="0" name="area" type="Area">
|
||||
</argument>
|
||||
<argument index="0" name="area" type="Area" />
|
||||
<description>
|
||||
Emitted when another Area exits this Area. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area[/code] the other Area.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_shape_entered">
|
||||
<argument index="0" name="area_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="area" type="Area">
|
||||
</argument>
|
||||
<argument index="2" name="area_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="area_id" type="int" />
|
||||
<argument index="1" name="area" type="Area" />
|
||||
<argument index="2" name="area_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
|
||||
@@ -180,14 +158,10 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_shape_exited">
|
||||
<argument index="0" name="area_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="area" type="Area">
|
||||
</argument>
|
||||
<argument index="2" name="area_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="area_id" type="int" />
|
||||
<argument index="1" name="area" type="Area" />
|
||||
<argument index="2" name="area_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of another Area's [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area_id[/code] the [RID] of the other Area's [CollisionObject] used by the [PhysicsServer].
|
||||
@@ -197,30 +171,24 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_entered">
|
||||
<argument index="0" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
Emitted when a [PhysicsBody] or [GridMap] enters this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_exited">
|
||||
<argument index="0" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
Emitted when a [PhysicsBody] or [GridMap] exits this Area. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody] or [GridMap].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_shape_entered">
|
||||
<argument index="0" name="body_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="2" name="body_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="body_id" type="int" />
|
||||
<argument index="1" name="body" type="Node" />
|
||||
<argument index="2" name="body_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
|
||||
@@ -230,14 +198,10 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_shape_exited">
|
||||
<argument index="0" name="body_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="2" name="body_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="body_id" type="int" />
|
||||
<argument index="1" name="body" type="Node" />
|
||||
<argument index="2" name="body_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of a [PhysicsBody] or [GridMap]'s [Shape]s enters one of this Area's [Shape]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape]s.
|
||||
[code]body_id[/code] the [RID] of the [PhysicsBody] or [MeshLibrary]'s [CollisionObject] used by the [PhysicsServer].
|
||||
|
@@ -14,76 +14,60 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_collision_layer_bit" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns an individual bit on the layer mask. Describes whether other areas will collide with this one on the given layer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_collision_mask_bit" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<description>
|
||||
Returns an individual bit on the collision mask. Describes whether this area will collide with others on the given layer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_overlapping_areas" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of intersecting [Area2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_overlapping_bodies" qualifiers="const">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="overlaps_area" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="area" type="Node">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="area" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], the given area overlaps the Area2D.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="overlaps_body" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="body" type="Node">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
If [code]true[/code], the given physics body overlaps the Area2D.
|
||||
[b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.
|
||||
The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body).
|
||||
The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body).
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_layer_bit">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Set/clear individual bits on the layer mask. This makes getting an area in/out of only one layer easier.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_collision_mask_bit">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bit" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bit" type="int" />
|
||||
<argument index="1" name="value" type="bool" />
|
||||
<description>
|
||||
Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier.
|
||||
</description>
|
||||
@@ -107,7 +91,7 @@
|
||||
The physics layers this area scans to determine collision detection. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
|
||||
</member>
|
||||
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0">
|
||||
The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
|
||||
The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
|
||||
</member>
|
||||
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0">
|
||||
The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
|
||||
@@ -137,30 +121,24 @@
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="area_entered">
|
||||
<argument index="0" name="area" type="Area2D">
|
||||
</argument>
|
||||
<argument index="0" name="area" type="Area2D" />
|
||||
<description>
|
||||
Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area[/code] the other Area2D.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_exited">
|
||||
<argument index="0" name="area" type="Area2D">
|
||||
</argument>
|
||||
<argument index="0" name="area" type="Area2D" />
|
||||
<description>
|
||||
Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area[/code] the other Area2D.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_shape_entered">
|
||||
<argument index="0" name="area_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="area" type="Area2D">
|
||||
</argument>
|
||||
<argument index="2" name="area_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="area_id" type="int" />
|
||||
<argument index="1" name="area" type="Area2D" />
|
||||
<argument index="2" name="area_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [Physics2DServer].
|
||||
@@ -170,14 +148,10 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="area_shape_exited">
|
||||
<argument index="0" name="area_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="area" type="Area2D">
|
||||
</argument>
|
||||
<argument index="2" name="area_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="area_id" type="int" />
|
||||
<argument index="1" name="area" type="Area2D" />
|
||||
<argument index="2" name="area_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code].
|
||||
[code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [Physics2DServer].
|
||||
@@ -187,30 +161,24 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_entered">
|
||||
<argument index="0" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_exited">
|
||||
<argument index="0" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="0" name="body" type="Node" />
|
||||
<description>
|
||||
Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
|
||||
[code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_shape_entered">
|
||||
<argument index="0" name="body_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="2" name="body_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="body_id" type="int" />
|
||||
<argument index="1" name="body" type="Node" />
|
||||
<argument index="2" name="body_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
|
||||
[code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [Physics2DServer].
|
||||
@@ -220,14 +188,10 @@
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="body_shape_exited">
|
||||
<argument index="0" name="body_id" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="body" type="Node">
|
||||
</argument>
|
||||
<argument index="2" name="body_shape" type="int">
|
||||
</argument>
|
||||
<argument index="3" name="local_shape" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="body_id" type="int" />
|
||||
<argument index="1" name="body" type="Node" />
|
||||
<argument index="2" name="body_shape" type="int" />
|
||||
<argument index="3" name="local_shape" type="int" />
|
||||
<description>
|
||||
Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s.
|
||||
[code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [Physics2DServer].
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Array" version="3.3">
|
||||
<brief_description>
|
||||
Generic array datatype.
|
||||
A generic array datatype.
|
||||
</brief_description>
|
||||
<description>
|
||||
Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.).
|
||||
A generic array that can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 is the second to last, etc.).
|
||||
[b]Example:[/b]
|
||||
[codeblock]
|
||||
var array = ["One", 2, 3, "Four"]
|
||||
@@ -21,85 +21,69 @@
|
||||
print(array1 + array2) # ["One", 2, 3, "Four"]
|
||||
[/codeblock]
|
||||
[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 which can be modified independently of the original array, use [method duplicate].
|
||||
[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] 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>
|
||||
<methods>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolColorArray">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolColorArray" />
|
||||
<description>
|
||||
Constructs an array from a [PoolColorArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolVector3Array">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolVector3Array" />
|
||||
<description>
|
||||
Constructs an array from a [PoolVector3Array].
|
||||
</description>
|
||||
</method>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolVector2Array">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolVector2Array" />
|
||||
<description>
|
||||
Constructs an array from a [PoolVector2Array].
|
||||
</description>
|
||||
</method>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolStringArray">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolStringArray" />
|
||||
<description>
|
||||
Constructs an array from a [PoolStringArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolRealArray">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolRealArray" />
|
||||
<description>
|
||||
Constructs an array from a [PoolRealArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolIntArray">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolIntArray" />
|
||||
<description>
|
||||
Constructs an array from a [PoolIntArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="Array">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="from" type="PoolByteArray">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="from" type="PoolByteArray" />
|
||||
<description>
|
||||
Constructs an array from a [PoolByteArray].
|
||||
</description>
|
||||
</method>
|
||||
<method name="append">
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Appends an element at the end of the array (alias of [method push_back]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="append_array">
|
||||
<argument index="0" name="array" type="Array">
|
||||
</argument>
|
||||
<argument index="0" name="array" type="Array" />
|
||||
<description>
|
||||
Appends another array at the end of this array.
|
||||
[codeblock]
|
||||
@@ -111,36 +95,27 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="back">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Returns the last element of the array. Prints an error and returns [code]null[/code] if the array is empty.
|
||||
[b]Note:[/b] Calling this function is not the same as writing [code]array[-1][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bsearch">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="1" name="before" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<argument index="1" name="before" type="bool" default="true" />
|
||||
<description>
|
||||
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
|
||||
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
|
||||
</description>
|
||||
</method>
|
||||
<method name="bsearch_custom">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="1" name="obj" type="Object">
|
||||
</argument>
|
||||
<argument index="2" name="func" type="String">
|
||||
</argument>
|
||||
<argument index="3" name="before" type="bool" default="true">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<argument index="1" name="obj" type="Object" />
|
||||
<argument index="2" name="func" type="String" />
|
||||
<argument index="3" name="before" type="bool" default="true" />
|
||||
<description>
|
||||
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method declared in the [code]obj[/code]. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
|
||||
[codeblock]
|
||||
@@ -174,34 +149,28 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="count">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Returns the number of times an element is in the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="duplicate">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="deep" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="deep" type="bool" default="false" />
|
||||
<description>
|
||||
Returns a copy of the array.
|
||||
If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="empty">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the array is empty.
|
||||
</description>
|
||||
</method>
|
||||
<method name="erase">
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead.
|
||||
[b]Note:[/b] This method acts in-place and doesn't return a value.
|
||||
@@ -209,38 +178,30 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="find">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="what" type="Variant">
|
||||
</argument>
|
||||
<argument index="1" name="from" type="int" default="0">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="what" type="Variant" />
|
||||
<argument index="1" name="from" type="int" default="0" />
|
||||
<description>
|
||||
Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="find_last">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found.
|
||||
</description>
|
||||
</method>
|
||||
<method name="front">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Returns the first element of the array. Prints an error and returns [code]null[/code] if the array is empty.
|
||||
[b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the array contains the given value.
|
||||
[codeblock]
|
||||
@@ -258,18 +219,15 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="hash">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns a hashed integer value representing the array and its contents.
|
||||
[b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value.
|
||||
</description>
|
||||
</method>
|
||||
<method name="insert">
|
||||
<argument index="0" name="position" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="0" name="position" type="int" />
|
||||
<argument index="1" name="value" type="Variant" />
|
||||
<description>
|
||||
Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]).
|
||||
[b]Note:[/b] This method acts in-place and doesn't return a value.
|
||||
@@ -282,52 +240,45 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="max">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="min">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="pop_back">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front].
|
||||
</description>
|
||||
</method>
|
||||
<method name="pop_front">
|
||||
<return type="Variant">
|
||||
</return>
|
||||
<return type="Variant" />
|
||||
<description>
|
||||
Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back].
|
||||
[b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_back">
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Appends an element at the end of the array. See also [method push_front].
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_front">
|
||||
<argument index="0" name="value" type="Variant">
|
||||
</argument>
|
||||
<argument index="0" name="value" type="Variant" />
|
||||
<description>
|
||||
Adds an element at the beginning of the array. See also [method push_back].
|
||||
[b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove">
|
||||
<argument index="0" name="position" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="position" type="int" />
|
||||
<description>
|
||||
Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.
|
||||
[b]Note:[/b] This method acts in-place and doesn't return a value.
|
||||
@@ -335,19 +286,15 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
<argument index="0" name="size" type="int">
|
||||
</argument>
|
||||
<argument index="0" name="size" type="int" />
|
||||
<description>
|
||||
Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="rfind">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="what" type="Variant">
|
||||
</argument>
|
||||
<argument index="1" name="from" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="what" type="Variant" />
|
||||
<argument index="1" name="from" type="int" default="-1" />
|
||||
<description>
|
||||
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
|
||||
</description>
|
||||
@@ -358,23 +305,17 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="size">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of elements in the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="slice">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<argument index="0" name="begin" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="end" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="step" type="int" default="1">
|
||||
</argument>
|
||||
<argument index="3" name="deep" type="bool" default="false">
|
||||
</argument>
|
||||
<return type="Array" />
|
||||
<argument index="0" name="begin" type="int" />
|
||||
<argument index="1" name="end" type="int" />
|
||||
<argument index="2" name="step" type="int" default="1" />
|
||||
<argument index="3" name="deep" type="bool" default="false" />
|
||||
<description>
|
||||
Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing.
|
||||
</description>
|
||||
@@ -391,12 +332,11 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="sort_custom">
|
||||
<argument index="0" name="obj" type="Object">
|
||||
</argument>
|
||||
<argument index="1" name="func" type="String">
|
||||
</argument>
|
||||
<argument index="0" name="obj" type="Object" />
|
||||
<argument index="1" name="func" type="String" />
|
||||
<description>
|
||||
Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code].
|
||||
For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.
|
||||
[b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
|
||||
[codeblock]
|
||||
class MyCustomSorter:
|
||||
|
@@ -30,156 +30,119 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_blend_shape">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_surface_from_arrays">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
|
||||
</argument>
|
||||
<argument index="1" name="arrays" type="Array">
|
||||
</argument>
|
||||
<argument index="2" name="blend_shapes" type="Array" default="[ ]">
|
||||
</argument>
|
||||
<argument index="3" name="compress_flags" type="int" default="97280">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" />
|
||||
<argument index="1" name="arrays" type="Array" />
|
||||
<argument index="2" name="blend_shapes" type="Array" default="[ ]" />
|
||||
<argument index="3" name="compress_flags" type="int" default="97280" />
|
||||
<description>
|
||||
Creates a new surface.
|
||||
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
|
||||
Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
|
||||
The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.
|
||||
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_blend_shapes">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Removes all blend shapes from this [ArrayMesh].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_shape_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of blend shapes that the [ArrayMesh] holds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_blend_shape_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="index" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<description>
|
||||
Returns the name of the blend shape at this index.
|
||||
</description>
|
||||
</method>
|
||||
<method name="lightmap_unwrap">
|
||||
<return type="int" enum="Error">
|
||||
</return>
|
||||
<argument index="0" name="transform" type="Transform">
|
||||
</argument>
|
||||
<argument index="1" name="texel_size" type="float">
|
||||
</argument>
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="transform" type="Transform" />
|
||||
<argument index="1" name="texel_size" type="float" />
|
||||
<description>
|
||||
Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping.
|
||||
</description>
|
||||
</method>
|
||||
<method name="regen_normalmaps">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Will regenerate normal maps for the [ArrayMesh].
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_find_by_name" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned.
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_get_array_index_len" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<description>
|
||||
Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_get_array_len" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<description>
|
||||
Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_get_format" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<description>
|
||||
Returns the format mask of the requested surface (see [method add_surface_from_arrays]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_get_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<description>
|
||||
Gets the name assigned to this surface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_get_primitive_type" qualifiers="const">
|
||||
<return type="int" enum="Mesh.PrimitiveType">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" enum="Mesh.PrimitiveType" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<description>
|
||||
Returns the primitive type of the requested surface (see [method add_surface_from_arrays]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_remove">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<description>
|
||||
Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down.
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_set_name">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<argument index="1" name="name" type="String" />
|
||||
<description>
|
||||
Sets a name for a given surface.
|
||||
</description>
|
||||
</method>
|
||||
<method name="surface_update_region">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="surf_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="offset" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="data" type="PoolByteArray">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="surf_idx" type="int" />
|
||||
<argument index="1" name="offset" type="int" />
|
||||
<argument index="2" name="data" type="PoolByteArray" />
|
||||
<description>
|
||||
Updates a specified region of mesh arrays on the GPU.
|
||||
[b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments.
|
||||
|
@@ -11,55 +11,46 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="can_get_buffer" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="frames" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="frames" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_buffer">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears the internal ring buffer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_buffer">
|
||||
<return type="PoolVector2Array">
|
||||
</return>
|
||||
<argument index="0" name="frames" type="int">
|
||||
</argument>
|
||||
<return type="PoolVector2Array" />
|
||||
<argument index="0" name="frames" type="int" />
|
||||
<description>
|
||||
Gets the next [code]frames[/code] audio samples from the internal ring buffer.
|
||||
Returns a [PoolVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PoolVector2Array] if insufficient data was available.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_buffer_length_frames" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the total size of the internal ring buffer in frames.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_discarded_frames" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of audio frames discarded from the audio bus due to full buffer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_frames_available" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of frames available to read using [method get_buffer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_pushed_frames" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of audio frames inserted from the audio bus.
|
||||
</description>
|
||||
|
@@ -10,110 +10,80 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_voice_cutoff_hz" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_voice_delay_ms" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_voice_depth_ms" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_voice_level_db" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_voice_pan" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_voice_rate_hz" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_voice_cutoff_hz">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="cutoff_hz" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<argument index="1" name="cutoff_hz" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_voice_delay_ms">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="delay_ms" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<argument index="1" name="delay_ms" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_voice_depth_ms">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="depth_ms" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<argument index="1" name="depth_ms" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_voice_level_db">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="level_db" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<argument index="1" name="level_db" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_voice_pan">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="pan" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<argument index="1" name="pan" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_voice_rate_hz">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="voice_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="rate_hz" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="voice_idx" type="int" />
|
||||
<argument index="1" name="rate_hz" type="float" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
@@ -11,28 +11,22 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_band_count" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the number of bands of the equalizer.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_band_gain_db" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="band_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="band_idx" type="int" />
|
||||
<description>
|
||||
Returns the band's gain at the specified index, in dB.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_band_gain_db">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="band_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="volume_db" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="band_idx" type="int" />
|
||||
<argument index="1" name="volume_db" type="float" />
|
||||
<description>
|
||||
Sets band's gain at the specified index, in dB.
|
||||
</description>
|
||||
|
@@ -12,24 +12,20 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_recording" qualifiers="const">
|
||||
<return type="AudioStreamSample">
|
||||
</return>
|
||||
<return type="AudioStreamSample" />
|
||||
<description>
|
||||
Returns the recorded sample.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_recording_active" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns whether the recording is active or not.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_recording_active">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="record" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="record" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
|
||||
</description>
|
||||
|
@@ -8,14 +8,10 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_magnitude_for_frequency_range" qualifiers="const">
|
||||
<return type="Vector2">
|
||||
</return>
|
||||
<argument index="0" name="from_hz" type="float">
|
||||
</argument>
|
||||
<argument index="1" name="to_hz" type="float">
|
||||
</argument>
|
||||
<argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1">
|
||||
</argument>
|
||||
<return type="Vector2" />
|
||||
<argument index="0" name="from_hz" type="float" />
|
||||
<argument index="1" name="to_hz" type="float" />
|
||||
<argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
@@ -14,380 +14,291 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_bus">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="at_position" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="at_position" type="int" default="-1" />
|
||||
<description>
|
||||
Adds a bus at [code]at_position[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_bus_effect">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect" type="AudioEffect">
|
||||
</argument>
|
||||
<argument index="2" name="at_position" type="int" default="-1">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect" type="AudioEffect" />
|
||||
<argument index="2" name="at_position" type="int" default="-1" />
|
||||
<description>
|
||||
Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="capture_get_device">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Name of the current device for audio input (see [method capture_get_device_list]).
|
||||
</description>
|
||||
</method>
|
||||
<method name="capture_get_device_list">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the names of all audio input devices detected on the system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="capture_set_device">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="name" type="String" />
|
||||
<description>
|
||||
Sets which audio input device is used for audio capture.
|
||||
</description>
|
||||
</method>
|
||||
<method name="generate_bus_layout" qualifiers="const">
|
||||
<return type="AudioBusLayout">
|
||||
</return>
|
||||
<return type="AudioBusLayout" />
|
||||
<description>
|
||||
Generates an [AudioBusLayout] using the available buses and effects.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_channels" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
Returns the amount of channels of the bus at index [code]bus_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_effect">
|
||||
<return type="AudioEffect">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect_idx" type="int">
|
||||
</argument>
|
||||
<return type="AudioEffect" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect_idx" type="int" />
|
||||
<description>
|
||||
Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_effect_count">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
Returns the number of effects on the bus at [code]bus_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_effect_instance">
|
||||
<return type="AudioEffectInstance">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="channel" type="int" default="0">
|
||||
</argument>
|
||||
<return type="AudioEffectInstance" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect_idx" type="int" />
|
||||
<argument index="2" name="channel" type="int" default="0" />
|
||||
<description>
|
||||
Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_index" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="bus_name" type="String">
|
||||
</argument>
|
||||
<return type="int" />
|
||||
<argument index="0" name="bus_name" type="String" />
|
||||
<description>
|
||||
Returns the index of the bus with the name [code]bus_name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_name" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
Returns the name of the bus with the index [code]bus_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_peak_volume_left_db" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="channel" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="channel" type="int" />
|
||||
<description>
|
||||
Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_peak_volume_right_db" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="channel" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="channel" type="int" />
|
||||
<description>
|
||||
Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_send" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="String" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bus_volume_db" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="float" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
Returns the volume of the bus at index [code]bus_idx[/code] in dB.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_device_list">
|
||||
<return type="Array">
|
||||
</return>
|
||||
<return type="Array" />
|
||||
<description>
|
||||
Returns the names of all audio devices detected on the system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_mix_rate" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the sample rate at the output of the [AudioServer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_output_latency" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the audio driver's output latency.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_speaker_mode" qualifiers="const">
|
||||
<return type="int" enum="AudioServer.SpeakerMode">
|
||||
</return>
|
||||
<return type="int" enum="AudioServer.SpeakerMode" />
|
||||
<description>
|
||||
Returns the speaker configuration.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_time_since_last_mix" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the relative time since the last mix occurred.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_time_to_next_mix" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the relative time until the next mix occurs.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_bus_bypassing_effects" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_bus_effect_enabled" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect_idx" type="int" />
|
||||
<description>
|
||||
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_bus_mute" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_bus_solo" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<description>
|
||||
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
|
||||
</description>
|
||||
</method>
|
||||
<method name="lock">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Locks the audio driver's main loop.
|
||||
[b]Note:[/b] Remember to unlock it afterwards.
|
||||
</description>
|
||||
</method>
|
||||
<method name="move_bus">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="index" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="to_index" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<argument index="1" name="to_index" type="int" />
|
||||
<description>
|
||||
Moves the bus from index [code]index[/code] to index [code]to_index[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_bus">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="index" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="index" type="int" />
|
||||
<description>
|
||||
Removes the bus at index [code]index[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_bus_effect">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect_idx" type="int" />
|
||||
<description>
|
||||
Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_bypass_effects">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_effect_enabled">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="enabled" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect_idx" type="int" />
|
||||
<argument index="2" name="enabled" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_layout">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_layout" type="AudioBusLayout">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_layout" type="AudioBusLayout" />
|
||||
<description>
|
||||
Overwrites the currently used [AudioBusLayout].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_mute">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the bus at index [code]bus_idx[/code] is muted.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_name">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="name" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="name" type="String" />
|
||||
<description>
|
||||
Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_send">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="send" type="String">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="send" type="String" />
|
||||
<description>
|
||||
Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_solo">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="enable" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="enable" type="bool" />
|
||||
<description>
|
||||
If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bus_volume_db">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="volume_db" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="volume_db" type="float" />
|
||||
<description>
|
||||
Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="swap_bus_effects">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="bus_idx" type="int">
|
||||
</argument>
|
||||
<argument index="1" name="effect_idx" type="int">
|
||||
</argument>
|
||||
<argument index="2" name="by_effect_idx" type="int">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="bus_idx" type="int" />
|
||||
<argument index="1" name="effect_idx" type="int" />
|
||||
<argument index="2" name="by_effect_idx" type="int" />
|
||||
<description>
|
||||
Swaps the position of two effects in bus [code]bus_idx[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="unlock">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)
|
||||
</description>
|
||||
|
@@ -14,8 +14,7 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_length" qualifiers="const">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the length of the audio stream in seconds.
|
||||
</description>
|
||||
|
@@ -9,44 +9,35 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="can_push_buffer" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="amount" type="int">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="amount" type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear_buffer">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_frames_available" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_skips" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_buffer">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="frames" type="PoolVector2Array">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="frames" type="PoolVector2Array" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_frame">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="frame" type="Vector2">
|
||||
</argument>
|
||||
<return type="bool" />
|
||||
<argument index="0" name="frame" type="Vector2" />
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
|
@@ -5,6 +5,7 @@
|
||||
</brief_description>
|
||||
<description>
|
||||
Plays an audio stream non-positionally.
|
||||
To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Audio streams">https://docs.godotengine.org/en/3.3/tutorials/audio/audio_streams.html</link>
|
||||
@@ -16,40 +17,33 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_playback_position">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the position in the [AudioStream] in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_stream_playback">
|
||||
<return type="AudioStreamPlayback">
|
||||
</return>
|
||||
<return type="AudioStreamPlayback" />
|
||||
<description>
|
||||
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer].
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="from_position" type="float" default="0.0">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="from_position" type="float" default="0.0" />
|
||||
<description>
|
||||
Plays the audio from the given [code]from_position[/code], in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="seek">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="to_position" type="float" />
|
||||
<description>
|
||||
Sets the position from which audio will be played, in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the audio.
|
||||
</description>
|
||||
|
@@ -1,50 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AudioStreamPlayer2D" inherits="Node2D" version="3.3">
|
||||
<brief_description>
|
||||
Plays audio in 2D.
|
||||
Plays positional sound in 2D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
Plays audio that dampens with distance from screen center.
|
||||
See also [AudioStreamPlayer] to play a sound non-positionally.
|
||||
[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>https://docs.godotengine.org/en/3.3/tutorials/audio/audio_streams.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_playback_position">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the position in the [AudioStream].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_stream_playback">
|
||||
<return type="AudioStreamPlayback">
|
||||
</return>
|
||||
<return type="AudioStreamPlayback" />
|
||||
<description>
|
||||
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="from_position" type="float" default="0.0">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="from_position" type="float" default="0.0" />
|
||||
<description>
|
||||
Plays the audio from the given position [code]from_position[/code], in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="seek">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="to_position" type="float" />
|
||||
<description>
|
||||
Sets the position from which audio will be played, in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the audio.
|
||||
</description>
|
||||
|
@@ -1,51 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AudioStreamPlayer3D" inherits="Spatial" version="3.3">
|
||||
<brief_description>
|
||||
Plays 3D sound in 3D space.
|
||||
Plays positional sound in 3D space.
|
||||
</brief_description>
|
||||
<description>
|
||||
Plays a sound effect with directed sound effects, dampens with distance if needed, generates effect of hearable position in space. For greater realism, a low-pass filter is automatically applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].
|
||||
By default, audio is heard from the camera position. This can be changed by adding a [Listener] node to the scene and enabling it by calling [method Listener.make_current] on it.
|
||||
See also [AudioStreamPlayer] to play a sound non-positionally.
|
||||
[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
|
||||
</description>
|
||||
<tutorials>
|
||||
<link>https://docs.godotengine.org/en/3.3/tutorials/audio/audio_streams.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_playback_position">
|
||||
<return type="float">
|
||||
</return>
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the position in the [AudioStream].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_stream_playback">
|
||||
<return type="AudioStreamPlayback">
|
||||
</return>
|
||||
<return type="AudioStreamPlayback" />
|
||||
<description>
|
||||
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D].
|
||||
</description>
|
||||
</method>
|
||||
<method name="play">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="from_position" type="float" default="0.0">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="from_position" type="float" default="0.0" />
|
||||
<description>
|
||||
Plays the audio from the given position [code]from_position[/code], in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="seek">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="to_position" type="float">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="to_position" type="float" />
|
||||
<description>
|
||||
Sets the position from which audio will be played, in seconds.
|
||||
</description>
|
||||
</method>
|
||||
<method name="stop">
|
||||
<return type="void">
|
||||
</return>
|
||||
<return type="void" />
|
||||
<description>
|
||||
Stops the audio.
|
||||
</description>
|
||||
|
@@ -11,10 +11,8 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="save_to_wav">
|
||||
<return type="int" enum="Error">
|
||||
</return>
|
||||
<argument index="0" name="path" type="String">
|
||||
</argument>
|
||||
<return type="int" enum="Error" />
|
||||
<argument index="0" name="path" type="String" />
|
||||
<description>
|
||||
Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved.
|
||||
[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing.
|
||||
|
@@ -11,12 +11,9 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="bake">
|
||||
<return type="int" enum="BakedLightmap.BakeError">
|
||||
</return>
|
||||
<argument index="0" name="from_node" type="Node" default="null">
|
||||
</argument>
|
||||
<argument index="1" name="data_save_path" type="String" default="""">
|
||||
</argument>
|
||||
<return type="int" enum="BakedLightmap.BakeError" />
|
||||
<argument index="0" name="from_node" type="Node" default="null" />
|
||||
<argument index="1" name="data_save_path" type="String" default="""" />
|
||||
<description>
|
||||
Bakes the lightmap, scanning from the given [code]from_node[/code] root and saves the resulting [BakedLightmapData] in [code]data_save_path[/code]. If no save path is provided it will try to match the path from the current [member light_data].
|
||||
</description>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user