summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS.md2
-rw-r--r--DONORS.md51
-rw-r--r--core/global_constants.cpp150
-rw-r--r--core/math/a_star.cpp1
-rw-r--r--core/os/input_event.h4
-rw-r--r--doc/classes/@Global Scope.xml154
-rw-r--r--doc/classes/ARVRAnchor.xml1
-rw-r--r--doc/classes/ARVRController.xml2
-rw-r--r--doc/classes/ARVROrigin.xml2
-rw-r--r--doc/classes/ARVRPositionalTracker.xml4
-rw-r--r--doc/classes/ARVRServer.xml1
-rw-r--r--doc/classes/BaseButton.xml11
-rw-r--r--doc/classes/Curve2D.xml3
-rw-r--r--doc/classes/EditorScript.xml4
-rw-r--r--doc/classes/Node2D.xml36
-rw-r--r--doc/classes/ParallaxBackground.xml8
-rw-r--r--doc/classes/ParallaxLayer.xml6
-rw-r--r--doc/classes/Path2D.xml5
-rw-r--r--doc/classes/Quat.xml15
-rw-r--r--doc/classes/Rect2.xml24
-rw-r--r--doc/classes/Rect3.xml43
-rw-r--r--doc/classes/RemoteTransform.xml8
-rw-r--r--doc/classes/RemoteTransform2D.xml8
-rw-r--r--doc/classes/SpatialMaterial.xml2
-rw-r--r--doc/classes/String.xml143
-rw-r--r--doc/classes/Vector3.xml23
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp2
-rw-r--r--drivers/gles3/shaders/scene.glsl10
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp45
-rw-r--r--editor/script_editor_debugger.cpp63
-rw-r--r--editor/script_editor_debugger.h2
-rw-r--r--main/performance.cpp38
-rw-r--r--main/performance.h8
-rw-r--r--modules/mono/editor/bindings_generator.cpp8
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp12
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp16
-rw-r--r--modules/mono/mono_gd/gd_mono_method.cpp41
-rw-r--r--modules/regex/SCsub2
-rw-r--r--platform/osx/os_osx.h3
-rw-r--r--platform/osx/os_osx.mm17
-rw-r--r--scene/2d/ray_cast_2d.cpp18
-rw-r--r--scene/2d/ray_cast_2d.h3
-rw-r--r--scene/3d/ray_cast.cpp18
-rw-r--r--scene/3d/ray_cast.h3
-rw-r--r--scene/resources/environment.cpp5
-rw-r--r--scene/resources/material.cpp8
-rw-r--r--scene/resources/material.h2
-rw-r--r--servers/visual/shader_types.cpp2
49 files changed, 762 insertions, 277 deletions
diff --git a/AUTHORS.md b/AUTHORS.md
index bf833d1435..3fd8227fa7 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -47,9 +47,11 @@ name is available.
Geequlim
Gen (dbsGen)
George Marques (vnen)
+ Gerrit Großkopf (Grosskopf)
Gilles Roudiere (groud)
Guilherme Felipe (guilhermefelipecgs)
Hein-Pieter van Braam (hpvb)
+ Hiroshi Ogawa (hi-ogawa)
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ignacio Etcheverry (neikeq)
diff --git a/DONORS.md b/DONORS.md
index 57902fb2fc..784cf58255 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -20,28 +20,38 @@ None so far, but your company could be the first! :)
## Mini sponsors
- Arron Washington
- Chris Phyffer
+ Andreas
+ Andreas Hirschauer
Christian Uldall Pedersen
+ E Hewert
Hein-Pieter van Braam
Matthieu Huvé
+ Nathan Warden
Neal Gompa (Conan Kudo)
Olimpiu Metiu
Ruslan Mustakov
+ Slobodan Milnovic
## Gold donors
Alexander Otto
+ Asdf
+ Blair Allen
+ cheese65536
Jake Bo
Javier
- Nathan Warden
+ Manuele Finocchiaro
+ Officine Pixel S.n.c.
Ranoller
Rémi Verschelde
Stephan Lanfermann
Andreas Schüle
+ Austen McRae
Bernhard Liebl
+ Gerald E Butler
Jordan M Lucas
+ Kris Michael
BanjoNode2D
Chris Serino
@@ -53,16 +63,20 @@ None so far, but your company could be the first! :)
Henrique Alves
Laurence Bannister
Leo
+ mhilbrunner
Przemysław Gołąb (n-pigeon)
Robert Willes
Robin Arys
+ ScottMakesGames
summerblind
Testus Maximus
Thomas Bjarnelöf
+ Xavier Tan
Amanda Haldy
Andreas Haas
Bryanna M
+ Chris Brown
Cody Parker
D
Ezra Theunissen
@@ -70,25 +84,32 @@ None so far, but your company could be the first! :)
François Cantin
Hendrik Mans
Jeppe Zapp
- Johannes Wuensch
Justin Arnold
Justo Delgado Baudí
Leandro Voltolino
+ Lucien Boudy
Myles
- Robert Podgorski
- Scott Beacon
+ Noah
+ Trent McPheron
x1212
## Silver donors
+ 1D_Inc
+ Alessandro Senese
Alex Barsukov
+ Anthony Bongiovanni
Avencherus
Bastian Böhm
Ben Vercammen
Bryan Stevenson
+ Christian Baune
+ Christian Winter
Collin Shooltz
+ Dominik Wetzel
Fabian Becker
fengjiongmax
+ Fredy Romero Sam
Geequlim
Gerrit Großkopf
Guldoman
@@ -96,14 +117,16 @@ None so far, but your company could be the first! :)
HeartBeast
Heribert Hirth
Hunter Jones
- imekon
- Jacob McKenney
Jonathon
Josh 'Cheeseness' Bush
+ JuDelCo
Julian Murgia
Juraj Móza
+ KC Chan
Kevin Boyer
+ Kevin Kamper Meejach Petersen
Klavdij Voncina
+ Kobi Malul
Lisandro Lorea
magodev
Martin Novák
@@ -113,26 +136,36 @@ None so far, but your company could be the first! :)
Max R.R. Collada
Michael Gringauz
Mikael Olsson
+ MoM
Moritz Laass
nee
+ Neil Blakey-Milner
+ Nik Lee
+ Niko Leopold
nvgrod
Pablo Seibelt
Pan Ip
+ Patrick Nafarrete
Paul Mason
Paweł Kowal
+ Pete Goodwin
Pietro Vertechi
rayos
Richman Stewart
Roger Smith
+ Ryan Estes
Sam Van Campenhout
Sam Vila
Sasori Olkof
+ Scott D. Yelich
Sootstone
Tavo Tell
+ TheHappieCat
+ Theo Cranmore
Tom Larrow
- Trent McPheron
Troy Bonneau
UltyX
+ Wout Standaert
Xananax & karroffel
## Bronze donors
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index 6f58af2ccf..8bddeae69a 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -86,6 +86,8 @@ static Vector<_GlobalConstant> _global_constants;
VARIANT_ENUM_CAST(KeyList);
VARIANT_ENUM_CAST(KeyModifierMask);
+VARIANT_ENUM_CAST(ButtonList);
+VARIANT_ENUM_CAST(JoystickList);
void register_global_constants() {
@@ -367,82 +369,82 @@ void register_global_constants() {
BIND_GLOBAL_ENUM_CONSTANT(KEY_MASK_GROUP_SWITCH);
// mouse
- BIND_GLOBAL_CONSTANT(BUTTON_LEFT);
- BIND_GLOBAL_CONSTANT(BUTTON_RIGHT);
- BIND_GLOBAL_CONSTANT(BUTTON_MIDDLE);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_UP);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_DOWN);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_LEFT);
- BIND_GLOBAL_CONSTANT(BUTTON_WHEEL_RIGHT);
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_LEFT);
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_RIGHT);
- BIND_GLOBAL_CONSTANT(BUTTON_MASK_MIDDLE);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MIDDLE);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_UP);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_DOWN);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_WHEEL_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_LEFT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_RIGHT);
+ BIND_GLOBAL_ENUM_CONSTANT(BUTTON_MASK_MIDDLE);
//joypads
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_0);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_1);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_2);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_3);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_4);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_5);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_6);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_7);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_8);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_9);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_10);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_11);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_12);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_13);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_14);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_15);
- BIND_GLOBAL_CONSTANT(JOY_BUTTON_MAX);
-
- BIND_GLOBAL_CONSTANT(JOY_SONY_CIRCLE);
- BIND_GLOBAL_CONSTANT(JOY_SONY_X);
- BIND_GLOBAL_CONSTANT(JOY_SONY_SQUARE);
- BIND_GLOBAL_CONSTANT(JOY_SONY_TRIANGLE);
-
- BIND_GLOBAL_CONSTANT(JOY_XBOX_B);
- BIND_GLOBAL_CONSTANT(JOY_XBOX_A);
- BIND_GLOBAL_CONSTANT(JOY_XBOX_X);
- BIND_GLOBAL_CONSTANT(JOY_XBOX_Y);
-
- BIND_GLOBAL_CONSTANT(JOY_DS_A);
- BIND_GLOBAL_CONSTANT(JOY_DS_B);
- BIND_GLOBAL_CONSTANT(JOY_DS_X);
- BIND_GLOBAL_CONSTANT(JOY_DS_Y);
-
- BIND_GLOBAL_CONSTANT(JOY_SELECT);
- BIND_GLOBAL_CONSTANT(JOY_START);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_UP);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_DOWN);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_LEFT);
- BIND_GLOBAL_CONSTANT(JOY_DPAD_RIGHT);
- BIND_GLOBAL_CONSTANT(JOY_L);
- BIND_GLOBAL_CONSTANT(JOY_L2);
- BIND_GLOBAL_CONSTANT(JOY_L3);
- BIND_GLOBAL_CONSTANT(JOY_R);
- BIND_GLOBAL_CONSTANT(JOY_R2);
- BIND_GLOBAL_CONSTANT(JOY_R3);
-
- BIND_GLOBAL_CONSTANT(JOY_AXIS_0);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_1);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_2);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_3);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_4);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_5);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_6);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_7);
- BIND_GLOBAL_CONSTANT(JOY_AXIS_MAX);
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_LX);
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_LY);
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_RX);
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_RY);
-
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_L2);
- BIND_GLOBAL_CONSTANT(JOY_ANALOG_R2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_0);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_1);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_4);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_5);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_6);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_7);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_8);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_9);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_10);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_11);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_12);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_13);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_14);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_15);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_BUTTON_MAX);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_CIRCLE);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_SQUARE);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SONY_TRIANGLE);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_B);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_A);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_XBOX_Y);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_A);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_B);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_X);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DS_Y);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_SELECT);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_START);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_DPAD_UP);
+ 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_L);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_L2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_L3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_R);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_R2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_R3);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_0);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_1);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_3);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_4);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_5);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_6);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_7);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_AXIS_MAX);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LX);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_LY);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RX);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_RY);
+
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_L2);
+ BIND_GLOBAL_ENUM_CONSTANT(JOY_ANALOG_R2);
// error list
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 4f80fb2491..ffe1089965 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -443,4 +443,5 @@ AStar::AStar() {
AStar::~AStar() {
pass = 1;
+ clear();
}
diff --git a/core/os/input_event.h b/core/os/input_event.h
index 5dc0f91d5f..f2c8cc802d 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -44,7 +44,7 @@
* The events are pretty obvious.
*/
-enum {
+enum ButtonList {
BUTTON_LEFT = 1,
BUTTON_RIGHT = 2,
BUTTON_MIDDLE = 3,
@@ -58,7 +58,7 @@ enum {
};
-enum {
+enum JoystickList {
JOY_BUTTON_0 = 0,
JOY_BUTTON_1 = 1,
diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml
index 0d509e6e51..9d0133faf4 100644
--- a/doc/classes/@Global Scope.xml
+++ b/doc/classes/@Global Scope.xml
@@ -30,6 +30,7 @@
[Geometry] singleton
</member>
<member name="GodotSharp" type="GodotSharp" setter="" getter="">
+ [GodotSharp] singleton
</member>
<member name="IP" type="IP" setter="" getter="">
[IP] singleton
@@ -41,6 +42,7 @@
[InputMap] singleton
</member>
<member name="JSON" type="JSON" setter="" getter="">
+ [JSON] singleton
</member>
<member name="Marshalls" type="Reference" setter="" getter="">
[Marshalls] singleton
@@ -144,8 +146,10 @@
Printscreen Key
</constant>
<constant name="KEY_SYSREQ" value="16777227">
+ System Request Key
</constant>
<constant name="KEY_CLEAR" value="16777228">
+ Clear Key
</constant>
<constant name="KEY_HOME" value="16777229">
Home Key
@@ -178,6 +182,7 @@
Control Key
</constant>
<constant name="KEY_META" value="16777239">
+ Meta Key
</constant>
<constant name="KEY_ALT" value="16777240">
Alt Key
@@ -285,24 +290,28 @@
Number 9 on Numpad
</constant>
<constant name="KEY_SUPER_L" value="16777260">
- Super Left key (windows key)
+ Left Super Key (Windows Key)
</constant>
<constant name="KEY_SUPER_R" value="16777261">
- Super Left key (windows key)
+ Right Super Key (Windows Key)
</constant>
<constant name="KEY_MENU" value="16777262">
Context menu key
</constant>
<constant name="KEY_HYPER_L" value="16777263">
+ Left Hyper Key
</constant>
<constant name="KEY_HYPER_R" value="16777264">
+ Right Hyper Key
</constant>
<constant name="KEY_HELP" value="16777265">
Help key
</constant>
<constant name="KEY_DIRECTION_L" value="16777266">
+ Left Direction Key
</constant>
<constant name="KEY_DIRECTION_R" value="16777267">
+ Right Direction Key
</constant>
<constant name="KEY_BACK" value="16777280">
Back key
@@ -326,14 +335,19 @@
Volume up key
</constant>
<constant name="KEY_BASSBOOST" value="16777287">
+ Bass Boost Key
</constant>
<constant name="KEY_BASSUP" value="16777288">
+ Bass Up Key
</constant>
<constant name="KEY_BASSDOWN" value="16777289">
+ Bass Down Key
</constant>
<constant name="KEY_TREBLEUP" value="16777290">
+ Treble Up Key
</constant>
<constant name="KEY_TREBLEDOWN" value="16777291">
+ Treble Down Key
</constant>
<constant name="KEY_MEDIAPLAY" value="16777292">
Media play key
@@ -360,46 +374,67 @@
Search key
</constant>
<constant name="KEY_STANDBY" value="16777300">
+ Standby Key
</constant>
<constant name="KEY_OPENURL" value="16777301">
+ Open URL / Launch Browser Key
</constant>
<constant name="KEY_LAUNCHMAIL" value="16777302">
+ Launch Mail Key
</constant>
<constant name="KEY_LAUNCHMEDIA" value="16777303">
+ Launch Media Key
</constant>
<constant name="KEY_LAUNCH0" value="16777304">
+ Launch Shortcut 0 Key
</constant>
<constant name="KEY_LAUNCH1" value="16777305">
+ Launch Shortcut 1 Key
</constant>
<constant name="KEY_LAUNCH2" value="16777306">
+ Launch Shortcut 2 Key
</constant>
<constant name="KEY_LAUNCH3" value="16777307">
+ Launch Shortcut 3 Key
</constant>
<constant name="KEY_LAUNCH4" value="16777308">
+ Launch Shortcut 4 Key
</constant>
<constant name="KEY_LAUNCH5" value="16777309">
+ Launch Shortcut 5 Key
</constant>
<constant name="KEY_LAUNCH6" value="16777310">
+ Launch Shortcut 6 Key
</constant>
<constant name="KEY_LAUNCH7" value="16777311">
+ Launch Shortcut 7 Key
</constant>
<constant name="KEY_LAUNCH8" value="16777312">
+ Launch Shortcut 8 Key
</constant>
<constant name="KEY_LAUNCH9" value="16777313">
+ Launch Shortcut 9 Key
</constant>
<constant name="KEY_LAUNCHA" value="16777314">
+ Launch Shortcut A Key
</constant>
<constant name="KEY_LAUNCHB" value="16777315">
+ Launch Shortcut B Key
</constant>
<constant name="KEY_LAUNCHC" value="16777316">
+ Launch Shortcut C Key
</constant>
<constant name="KEY_LAUNCHD" value="16777317">
+ Launch Shortcut D Key
</constant>
<constant name="KEY_LAUNCHE" value="16777318">
+ Launch Shortcut E Key
</constant>
<constant name="KEY_LAUNCHF" value="16777319">
+ Launch Shortcut F Key
</constant>
<constant name="KEY_UNKNOWN" value="33554431">
+ Unknown Key
</constant>
<constant name="KEY_SPACE" value="32">
Space Key
@@ -594,6 +629,7 @@
_ key
</constant>
<constant name="KEY_QUOTELEFT" value="96">
+ Left Quote Key
</constant>
<constant name="KEY_BRACELEFT" value="123">
{ key
@@ -619,6 +655,7 @@
<constant name="KEY_CURRENCY" value="164">
</constant>
<constant name="KEY_YEN" value="165">
+ Yen Key
</constant>
<constant name="KEY_BROKENBAR" value="166">
¦ key
@@ -647,6 +684,7 @@
® key
</constant>
<constant name="KEY_MACRON" value="175">
+ Macron Key
</constant>
<constant name="KEY_DEGREE" value="176">
° key
@@ -667,6 +705,7 @@
µ key
</constant>
<constant name="KEY_PARAGRAPH" value="182">
+ Paragraph Key
</constant>
<constant name="KEY_PERIODCENTERED" value="183">
· key
@@ -675,105 +714,154 @@
¬ key
</constant>
<constant name="KEY_ONESUPERIOR" value="185">
+ ¹ key
</constant>
<constant name="KEY_MASCULINE" value="186">
+ ♂ key
</constant>
<constant name="KEY_GUILLEMOTRIGHT" value="187">
+ » key
</constant>
<constant name="KEY_ONEQUARTER" value="188">
+ ¼ key
</constant>
<constant name="KEY_ONEHALF" value="189">
½ key
</constant>
<constant name="KEY_THREEQUARTERS" value="190">
+ ¾ key
</constant>
<constant name="KEY_QUESTIONDOWN" value="191">
+ ¿ key
</constant>
<constant name="KEY_AGRAVE" value="192">
+ à key
</constant>
<constant name="KEY_AACUTE" value="193">
+ á key
</constant>
<constant name="KEY_ACIRCUMFLEX" value="194">
+ â key
</constant>
<constant name="KEY_ATILDE" value="195">
+ ã key
</constant>
<constant name="KEY_ADIAERESIS" value="196">
+ ä key
</constant>
<constant name="KEY_ARING" value="197">
+ å key
</constant>
<constant name="KEY_AE" value="198">
+ æ key
</constant>
<constant name="KEY_CCEDILLA" value="199">
+ ç key
</constant>
<constant name="KEY_EGRAVE" value="200">
+ è key
</constant>
<constant name="KEY_EACUTE" value="201">
+ é key
</constant>
<constant name="KEY_ECIRCUMFLEX" value="202">
+ ê key
</constant>
<constant name="KEY_EDIAERESIS" value="203">
+ ë key
</constant>
<constant name="KEY_IGRAVE" value="204">
+ ì key
</constant>
<constant name="KEY_IACUTE" value="205">
+ í key
</constant>
<constant name="KEY_ICIRCUMFLEX" value="206">
+ î key
</constant>
<constant name="KEY_IDIAERESIS" value="207">
+ ë key
</constant>
<constant name="KEY_ETH" value="208">
+ ð key
</constant>
<constant name="KEY_NTILDE" value="209">
+ ñ key
</constant>
<constant name="KEY_OGRAVE" value="210">
+ ò key
</constant>
<constant name="KEY_OACUTE" value="211">
+ ó key
</constant>
<constant name="KEY_OCIRCUMFLEX" value="212">
+ ô key
</constant>
<constant name="KEY_OTILDE" value="213">
+ õ key
</constant>
<constant name="KEY_ODIAERESIS" value="214">
+ ö key
</constant>
<constant name="KEY_MULTIPLY" value="215">
+ × key
</constant>
<constant name="KEY_OOBLIQUE" value="216">
+ ø key
</constant>
<constant name="KEY_UGRAVE" value="217">
+ ù key
</constant>
<constant name="KEY_UACUTE" value="218">
+ ú key
</constant>
<constant name="KEY_UCIRCUMFLEX" value="219">
+ û key
</constant>
<constant name="KEY_UDIAERESIS" value="220">
+ ü key
</constant>
<constant name="KEY_YACUTE" value="221">
+ ý key
</constant>
<constant name="KEY_THORN" value="222">
+ þ key
</constant>
<constant name="KEY_SSHARP" value="223">
+ ß key
</constant>
<constant name="KEY_DIVISION" value="247">
+ ÷ key
</constant>
<constant name="KEY_YDIAERESIS" value="255">
+ ÿ key
</constant>
<constant name="KEY_CODE_MASK" value="33554431">
+ Key Code Mask
</constant>
<constant name="KEY_MODIFIER_MASK" value="-16777216">
+ Modifier Key Mask
</constant>
<constant name="KEY_MASK_SHIFT" value="33554432">
+ Shift Key Mask
</constant>
<constant name="KEY_MASK_ALT" value="67108864">
+ Alt Key Mask
</constant>
<constant name="KEY_MASK_META" value="134217728">
+ Meta Key Mask
</constant>
<constant name="KEY_MASK_CTRL" value="268435456">
+ CTRL Key Mask
</constant>
<constant name="KEY_MASK_CMD" value="268435456">
+ CMD Key Mask
</constant>
<constant name="KEY_MASK_KPAD" value="536870912">
+ Keypad Key Mask
</constant>
<constant name="KEY_MASK_GROUP_SWITCH" value="1073741824">
+ Group Switch Key Mask
</constant>
<constant name="BUTTON_LEFT" value="1" enum="">
Left Mouse Button
@@ -797,10 +885,13 @@
Mouse wheel right button
</constant>
<constant name="BUTTON_MASK_LEFT" value="1" enum="">
+ Left Mouse Button Mask
</constant>
<constant name="BUTTON_MASK_RIGHT" value="2" enum="">
+ Right Mouse Button Mask
</constant>
<constant name="BUTTON_MASK_MIDDLE" value="4" enum="">
+ Middle Mouse Button Mask
</constant>
<constant name="JOY_BUTTON_0" value="0" enum="">
Joypad Button 0
@@ -878,12 +969,16 @@
XBOX controller Y button
</constant>
<constant name="JOY_DS_A" value="1" enum="">
+ DualShock controller A button
</constant>
<constant name="JOY_DS_B" value="0" enum="">
+ DualShock controller B button
</constant>
<constant name="JOY_DS_X" value="3" enum="">
+ DualShock controller X button
</constant>
<constant name="JOY_DS_Y" value="2" enum="">
+ DualShock controller Y button
</constant>
<constant name="JOY_SELECT" value="10" enum="">
Joypad Button Select
@@ -958,94 +1053,136 @@
Joypad Right Stick Vertical Axis
</constant>
<constant name="JOY_ANALOG_L2" value="6" enum="">
+ Joypad Left Analog Trigger
</constant>
<constant name="JOY_ANALOG_R2" value="7" enum="">
+ Joypad Right Analog Trigger
</constant>
<constant name="OK" value="0">
- Functions that return Error return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout.
+ Functions that return Error return OK when no error occured. Most functions don't return errors and/or just print errors to STDOUT.
</constant>
<constant name="FAILED" value="1">
- Generic fail return error.
+ Generic error.
</constant>
<constant name="ERR_UNAVAILABLE" value="2">
+ Unavailable error
</constant>
<constant name="ERR_UNCONFIGURED" value="3">
+ Unconfigured error
</constant>
<constant name="ERR_UNAUTHORIZED" value="4">
+ Unauthorized error
</constant>
<constant name="ERR_PARAMETER_RANGE_ERROR" value="5">
+ Parameter range error
</constant>
<constant name="ERR_OUT_OF_MEMORY" value="6">
+ Out of memory (OOM) error
</constant>
<constant name="ERR_FILE_NOT_FOUND" value="7">
+ File: Not found error
</constant>
<constant name="ERR_FILE_BAD_DRIVE" value="8">
+ File: Bad drive error
</constant>
<constant name="ERR_FILE_BAD_PATH" value="9">
+ File: Bad path error
</constant>
<constant name="ERR_FILE_NO_PERMISSION" value="10">
+ File: No permission error
</constant>
<constant name="ERR_FILE_ALREADY_IN_USE" value="11">
+ File: Already in use error
</constant>
<constant name="ERR_FILE_CANT_OPEN" value="12">
+ File: Can't open error
</constant>
<constant name="ERR_FILE_CANT_WRITE" value="13">
+ File: Can't write error
</constant>
<constant name="ERR_FILE_CANT_READ" value="14">
+ File: Can't read error
</constant>
<constant name="ERR_FILE_UNRECOGNIZED" value="15">
+ File: Unrecognized error
</constant>
<constant name="ERR_FILE_CORRUPT" value="16">
+ File: Corrupt error
</constant>
<constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17">
+ File: Missing dependencies error
</constant>
<constant name="ERR_FILE_EOF" value="18">
+ File: End of file (EOF) error
</constant>
<constant name="ERR_CANT_OPEN" value="19">
+ Can't open error
</constant>
<constant name="ERR_CANT_CREATE" value="20">
+ Can't create error
</constant>
<constant name="ERR_PARSE_ERROR" value="43">
+ Parse error
</constant>
<constant name="ERR_QUERY_FAILED" value="21">
+ Query failed error
</constant>
<constant name="ERR_ALREADY_IN_USE" value="22">
+ Already in use error
</constant>
<constant name="ERR_LOCKED" value="23">
+ Locked error
</constant>
<constant name="ERR_TIMEOUT" value="24">
+ Timeout error
</constant>
<constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28">
+ Can't acquire resource error
</constant>
<constant name="ERR_INVALID_DATA" value="30">
+ Invalid data error
</constant>
<constant name="ERR_INVALID_PARAMETER" value="31">
+ Invalid parameter error
</constant>
<constant name="ERR_ALREADY_EXISTS" value="32">
+ Already exists error
</constant>
<constant name="ERR_DOES_NOT_EXIST" value="33">
+ Does not exist error
</constant>
<constant name="ERR_DATABASE_CANT_READ" value="34">
+ Database: Read error
</constant>
<constant name="ERR_DATABASE_CANT_WRITE" value="35">
+ Database: Write error
</constant>
<constant name="ERR_COMPILATION_FAILED" value="36">
+ Compilation failed error
</constant>
<constant name="ERR_METHOD_NOT_FOUND" value="37">
+ Method not found error
</constant>
<constant name="ERR_LINK_FAILED" value="38">
+ Linking failed error
</constant>
<constant name="ERR_SCRIPT_FAILED" value="39">
+ Script failed error
</constant>
<constant name="ERR_CYCLIC_LINK" value="40">
+ Cycling link (import cycle) error
</constant>
<constant name="ERR_BUSY" value="44">
+ Busy error
</constant>
<constant name="ERR_HELP" value="46">
+ Help error
</constant>
<constant name="ERR_BUG" value="47">
+ Bug error
</constant>
<constant name="ERR_WTF" value="49">
+ WTF error (something probably went really wrong)
</constant>
<constant name="PROPERTY_HINT_NONE" value="0">
No hint for edited property.
@@ -1094,8 +1231,10 @@
<constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="19">
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="20">
+ Hints that the image is compressed using lossy compression.
</constant>
<constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="21">
+ Hints that the image is compressed using lossless compression.
</constant>
<constant name="PROPERTY_USAGE_STORAGE" value="1">
Property will be used as storage (default).
@@ -1135,20 +1274,26 @@
<constant name="PROPERTY_USAGE_NOEDITOR" value="5">
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1">
+ Flag for normal method
</constant>
<constant name="METHOD_FLAG_EDITOR" value="2">
+ Flag for editor method
</constant>
<constant name="METHOD_FLAG_NOSCRIPT" value="4">
</constant>
<constant name="METHOD_FLAG_CONST" value="8">
+ Flag for constant method
</constant>
<constant name="METHOD_FLAG_REVERSE" value="16">
</constant>
<constant name="METHOD_FLAG_VIRTUAL" value="32">
+ Flag for virtual method
</constant>
<constant name="METHOD_FLAG_FROM_SCRIPT" value="64">
+ Flag for method from script
</constant>
<constant name="METHOD_FLAGS_DEFAULT" value="1">
+ Default method flags
</constant>
<constant name="TYPE_NIL" value="0">
Variable is of type nil (only applied for null).
@@ -1233,5 +1378,6 @@
</constant>
<constant name="TYPE_MAX" value="27">
</constant>
+ Marker for end of type constants.
</constants>
</class>
diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml
index 6e11034073..ecd882cdb0 100644
--- a/doc/classes/ARVRAnchor.xml
+++ b/doc/classes/ARVRAnchor.xml
@@ -60,6 +60,7 @@
</methods>
<members>
<member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id">
+ The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of [code]1[/code], the second an id of [code]2[/code], etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them.
</member>
</members>
<constants>
diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml
index 557f915c1d..af1deda2f0 100644
--- a/doc/classes/ARVRController.xml
+++ b/doc/classes/ARVRController.xml
@@ -31,6 +31,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<description>
+ Returns the hand holding this controller, if known. See TRACKER_* constants in [ARVRPositionalTracker].
</description>
</method>
<method name="get_is_active" qualifiers="const">
@@ -77,6 +78,7 @@
</methods>
<members>
<member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id">
+ The controller's id. The first controller that the [ARVRServer] detects will have id 1, the second id 2, the third id 3, etc. When a controller is turned off, it's slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off.
</member>
</members>
<signals>
diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml
index 28864bb3ae..226a69dea4 100644
--- a/doc/classes/ARVROrigin.xml
+++ b/doc/classes/ARVROrigin.xml
@@ -35,6 +35,8 @@
</methods>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
+ Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
+ Note that this method is a passthrough to the [ARVRServer] itself.
</member>
</members>
<constants>
diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml
index 1379677344..686ac1db77 100644
--- a/doc/classes/ARVRPositionalTracker.xml
+++ b/doc/classes/ARVRPositionalTracker.xml
@@ -17,6 +17,7 @@
<return type="int" enum="ARVRPositionalTracker.TrackerHand">
</return>
<description>
+ Returns the hand holding this tracker, if known. See TRACKER_* constants.
</description>
</method>
<method name="get_joy_id" qualifiers="const">
@@ -80,10 +81,13 @@
</methods>
<constants>
<constant name="TRACKER_HAND_UNKNOWN" value="0">
+ The hand this tracker is held in is unknown or not applicable.
</constant>
<constant name="TRACKER_LEFT_HAND" value="1">
+ This tracker is the left hand controller.
</constant>
<constant name="TRACKER_RIGHT_HAND" value="2">
+ This tracker is the right hand controller.
</constant>
</constants>
</class>
diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml
index 0693851203..bb7ac2c052 100644
--- a/doc/classes/ARVRServer.xml
+++ b/doc/classes/ARVRServer.xml
@@ -121,6 +121,7 @@
</methods>
<members>
<member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale">
+ Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world.
</member>
</members>
<signals>
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 2ad46579b2..1b6583a834 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="BaseButton" inherits="Control" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Provides a base class for different kinds of buttons.
+ Base class for different kinds of buttons.
</brief_description>
<description>
- BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesn't display anything). Other types of buttons inherit from it.
+ BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it.
</description>
<tutorials>
</tutorials>
@@ -152,18 +152,25 @@
</methods>
<members>
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
+ Determines when the button is considered clicked, one of the ACTION_MODE_* constants.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
+ If [code]true[/code] the button is in disabled state and can't be clicked or toggled.
</member>
<member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode">
+ Focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [member disabled]).
</member>
<member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
+ [ButtonGroup] associated to the button.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed">
+ If [code]true[/code] the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).
</member>
<member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut">
+ [Shortcut] associated to the button.
</member>
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode">
+ If [code]true[/code] the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
</member>
</members>
<signals>
diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml
index 4362887be3..99ec2b7d94 100644
--- a/doc/classes/Curve2D.xml
+++ b/doc/classes/Curve2D.xml
@@ -32,6 +32,7 @@
<return type="void">
</return>
<description>
+ Removes all points from the curve.
</description>
</method>
<method name="get_bake_interval" qualifiers="const">
@@ -191,8 +192,10 @@
</methods>
<members>
<member name="_data" type="Dictionary" setter="_set_data" getter="_get_data">
+ The points describing the curve. Value is a [Dictionary] with the keys [code]in[/code], [code]out[/code], and [code]pos[/code]. The key pos is the position of a vertex of the curve, the key in is the vector from that position to the control point before this vertex, the key out is the vector from that position to the controlpoint after this vertex.
</member>
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval">
+ The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care.
</member>
</members>
<constants>
diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml
index 8856e3362a..245dbc078d 100644
--- a/doc/classes/EditorScript.xml
+++ b/doc/classes/EditorScript.xml
@@ -11,9 +11,9 @@
extends EditorScript
func _run():
- print("Hello from the Godot Editor!")
+ print("Hello from the Godot Editor!")
[/codeblock]
- Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot *Output* dock.
+ Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot [i]Output[/i] dock.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 084bee92df..b00020b227 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -26,7 +26,7 @@
<argument index="0" name="pivot" type="Vector2">
</argument>
<description>
- Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method.
+ Sets the node's pivot position.
</description>
</method>
<method name="get_angle_to" qualifiers="const">
@@ -143,7 +143,7 @@
<argument index="1" name="scaled" type="bool" default="false">
</argument>
<description>
- Apply a local translation on the node's X axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement.
+ Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is false, normalizes the movement.
</description>
</method>
<method name="move_local_y">
@@ -154,7 +154,7 @@
<argument index="1" name="scaled" type="bool" default="false">
</argument>
<description>
- Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement.
+ Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is false, normalizes the movement.
</description>
</method>
<method name="rotate">
@@ -163,7 +163,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Apply a rotation to the node, in radians, starting from its current rotation.
+ Applies a rotation to the node, in radians, starting from its current rotation.
</description>
</method>
<method name="set_global_position">
@@ -172,7 +172,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Set the node's global position.
+ Sets the node's global position.
</description>
</method>
<method name="set_global_rotation">
@@ -181,7 +181,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Set the node's global rotation in radians.
+ Sets the node's global rotation in radians.
</description>
</method>
<method name="set_global_rotation_in_degrees">
@@ -190,7 +190,7 @@
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Set the node's global rotation in degrees.
+ Sets the node's global rotation in degrees.
</description>
</method>
<method name="set_global_scale">
@@ -199,7 +199,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the node's global scale.
+ Sets the node's global scale.
</description>
</method>
<method name="set_global_transform">
@@ -208,7 +208,7 @@
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
- Set the node's global [Transform2D].
+ Sets the node's global [Transform2D].
</description>
</method>
<method name="set_position">
@@ -217,7 +217,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
- Set the node's position.
+ Sets the node's position.
</description>
</method>
<method name="set_rotation">
@@ -226,7 +226,7 @@
<argument index="0" name="radians" type="float">
</argument>
<description>
- Set the node's rotation in radians.
+ Sets the node's rotation in radians.
</description>
</method>
<method name="set_rotation_in_degrees">
@@ -235,7 +235,7 @@
<argument index="0" name="degrees" type="float">
</argument>
<description>
- Set the node's rotation in degrees.
+ Sets the node's rotation in degrees.
</description>
</method>
<method name="set_scale">
@@ -244,7 +244,7 @@
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
- Set the node's scale.
+ Sets the node's scale.
</description>
</method>
<method name="set_transform">
@@ -253,7 +253,7 @@
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
- Set the node's local [Transform2D].
+ Sets the node's local [Transform2D].
</description>
</method>
<method name="set_z">
@@ -262,7 +262,7 @@
<argument index="0" name="z" type="int">
</argument>
<description>
- Set the node's Z-index.
+ Sets the node's Z-index.
</description>
</method>
<method name="set_z_as_relative">
@@ -271,7 +271,7 @@
<argument index="0" name="enable" type="bool">
</argument>
<description>
- Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
+ Makes the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
</description>
</method>
<method name="to_global" qualifiers="const">
@@ -280,6 +280,7 @@
<argument index="0" name="local_point" type="Vector2">
</argument>
<description>
+ Converts a local point's coordinates to global coordinates.
</description>
</method>
<method name="to_local" qualifiers="const">
@@ -288,6 +289,7 @@
<argument index="0" name="global_point" type="Vector2">
</argument>
<description>
+ Converts a global point's coordinates to local coordinates.
</description>
</method>
<method name="translate">
@@ -296,7 +298,7 @@
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
- Translate the node locally by the 'offset' vector, starting from its current local position.
+ Translates the node by the given [code]offset[/code] in local coordinates.
</description>
</method>
</methods>
diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml
index a7d616129a..21b6150900 100644
--- a/doc/classes/ParallaxBackground.xml
+++ b/doc/classes/ParallaxBackground.xml
@@ -4,7 +4,7 @@
A node used to create a parallax scrolling background.
</brief_description>
<description>
- A ParallaxBackground will use one or more [ParallaxLayer] nodes to create a parallax scrolling background. Each [ParallaxLayer] can be set to move at different speeds relative to the camera movement, this can be used to create an illusion of depth in a 2D game.
+ A ParallaxBackground uses one or more [ParallaxLayer] child nodes to create a parallax effect. Each [ParallaxLayer] can move at a different speed using [member ParallaxLayer.motion_offset]. This creates an illusion of depth in a 2D game. If not used with a [Camera2D], you must manually calculate the [member scroll_offset].
</description>
<tutorials>
</tutorials>
@@ -108,16 +108,22 @@
</methods>
<members>
<member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset">
+ Base position offset of all [ParallaxLayer] children.
</member>
<member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale">
+ Base motion scale of all [ParallaxLayer] children.
</member>
<member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom">
+ If [code]true[/code] elements in [ParallaxLayer] child aren't affected by the zoom level of the camera.
</member>
<member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin">
+ Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than [member scroll_limit_end] to work.
</member>
<member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end">
+ Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work.
</member>
<member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset">
+ The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present.
</member>
</members>
<constants>
diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml
index 6cf5549c8f..8de7e05578 100644
--- a/doc/classes/ParallaxLayer.xml
+++ b/doc/classes/ParallaxLayer.xml
@@ -4,7 +4,8 @@
A parallax scrolling layer to be used with [ParallaxBackground].
</brief_description>
<description>
- A ParallaxLayer must be the child of a [ParallaxBackground] node. All child nodes will be affected by the parallax scrolling of this layer.
+ A ParallaxLayer must be the child of a [ParallaxBackground] node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the [member ParallaxBackground.scroll_offset] value.
+ This node's children will be affected by its scroll offset.
</description>
<tutorials>
</tutorials>
@@ -60,10 +61,13 @@
</methods>
<members>
<member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring">
+ The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code] the [Texture] will not be mirrored. Default value: [code](0, 0)[/code].
</member>
<member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset">
+ The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset].
</member>
<member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale">
+ Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code] it will not scroll.
</member>
</members>
<constants>
diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml
index 839e617375..722e0c1240 100644
--- a/doc/classes/Path2D.xml
+++ b/doc/classes/Path2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Path2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Container for a [Curve2D].
+ Contains a [Curve2D] path for [PathFollow2D] nodes to follow.
</brief_description>
<description>
- This class is a container/Node-ification of a [Curve2D], so it can have [Node2D] properties and [Node] info.
+ Can have [PathFollow2D] child-nodes moving along the [Curve2D]. See [PathFollow2D] for more information on this usage.
</description>
<tutorials>
</tutorials>
@@ -30,6 +30,7 @@
</methods>
<members>
<member name="curve" type="Curve2D" setter="set_curve" getter="get_curve">
+ A [Curve2D] describing the path.
</member>
</members>
<constants>
diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml
index f07e143aa0..d351cdfbc0 100644
--- a/doc/classes/Quat.xml
+++ b/doc/classes/Quat.xml
@@ -4,7 +4,10 @@
Quaternion.
</brief_description>
<description>
- Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.
+ A 4-dimensional vector representing a rotation.
+ The vector represents a 4 dimensional complex number where multiplication of the basis elements is not commutative (multiplying i with j gives a different result than multiplying j with i).
+ Multiplying quaternions reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.
+ It can be used to perform SLERP (spherical-linear interpolation) between two rotations.
</description>
<tutorials>
</tutorials>
@@ -23,6 +26,7 @@
<argument index="3" name="w" type="float">
</argument>
<description>
+ Returns a quaternion defined by these values.
</description>
</method>
<method name="Quat">
@@ -57,6 +61,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
+ Performs a cubic spherical-linear interpolation with another quaternion.
</description>
</method>
<method name="dot">
@@ -111,7 +116,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
- Perform a spherical-linear interpolation with another quaternion.
+ Performs a spherical-linear interpolation with another quaternion.
</description>
</method>
<method name="slerpni">
@@ -122,6 +127,7 @@
<argument index="1" name="t" type="float">
</argument>
<description>
+ Performs a spherical-linear interpolation with another quaterion without checking if the rotation path is not bigger than 90°.
</description>
</method>
<method name="xform">
@@ -130,17 +136,22 @@
<argument index="0" name="v" type="Vector3">
</argument>
<description>
+ Transforms the vector [code]v[/code] by this quaternion.
</description>
</method>
</methods>
<members>
<member name="w" type="float" setter="" getter="">
+ W component of the quaternion. Default value: [code]1[/code]
</member>
<member name="x" type="float" setter="" getter="">
+ X component of the quaternion. Default value: [code]0[/code]
</member>
<member name="y" type="float" setter="" getter="">
+ Y component of the quaternion. Default value: [code]0[/code]
</member>
<member name="z" type="float" setter="" getter="">
+ Z component of the quaternion. Default value: [code]0[/code]
</member>
</members>
<constants>
diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml
index 13b786908e..5af8c82a7b 100644
--- a/doc/classes/Rect2.xml
+++ b/doc/classes/Rect2.xml
@@ -4,7 +4,7 @@
2D Axis-aligned bounding box.
</brief_description>
<description>
- Rect2 provides an 2D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
+ Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
</tutorials>
@@ -19,7 +19,7 @@
<argument index="1" name="size" type="Vector2">
</argument>
<description>
- Construct a [code]Rect2[/code] by position and size.
+ Constructs a [code]Rect2[/code] by position and size.
</description>
</method>
<method name="Rect2">
@@ -34,7 +34,7 @@
<argument index="3" name="height" type="float">
</argument>
<description>
- Construct a [code]Rect2[/code] by x, y, width and height.
+ Constructs a [code]Rect2[/code] by x, y, width, and height.
</description>
</method>
<method name="clip">
@@ -52,7 +52,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Returns true if this [code]Rect2[/code] completely encloses another one.
+ Returns [code]true[/code] if this [code]Rect2[/code] completely encloses another one.
</description>
</method>
<method name="expand">
@@ -61,14 +61,14 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
- Return this [code]Rect2[/code] expanded to include a given point.
+ Returns this [code]Rect2[/code] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<description>
- Get the area of the [code]Rect2[/code].
+ Returns the area of the [code]Rect2[/code].
</description>
</method>
<method name="grow">
@@ -77,7 +77,7 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the [code]Rect2[/code] grown a given amount of units towards all the sides.
+ Returns a copy of the [code]Rect2[/code] grown a given amount of units towards all the sides.
</description>
</method>
<method name="grow_individual">
@@ -92,6 +92,7 @@
<argument index="3" name=" bottom" type="float">
</argument>
<description>
+ Returns a copy of the [code]Rect2[/code] grown a given amount of units towards each direction individually.
</description>
</method>
<method name="grow_margin">
@@ -102,13 +103,14 @@
<argument index="1" name="by" type="float">
</argument>
<description>
+ Returns a copy of the [code]Rect2[/code] grown a given amount of units towards the [Margin] direction.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<description>
- Return true if the [code]Rect2[/code] is flat or empty.
+ Returns [code]true[/code] if the [code]Rect2[/code] is flat or empty.
</description>
</method>
<method name="has_point">
@@ -117,7 +119,7 @@
<argument index="0" name="point" type="Vector2">
</argument>
<description>
- Return true if the [code]Rect2[/code] contains a point.
+ Returns [code]true[/code] if the [code]Rect2[/code] contains a point.
</description>
</method>
<method name="intersects">
@@ -126,7 +128,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Return true if the [code]Rect2[/code] overlaps with another.
+ Returns [code]true[/code] if the [code]Rect2[/code] overlaps with another.
</description>
</method>
<method name="merge">
@@ -135,7 +137,7 @@
<argument index="0" name="b" type="Rect2">
</argument>
<description>
- Combine this [code]Rect2[/code] with another, a larger one is returned that contains both.
+ Returns a larger Rect2 that contains this Rect2 and [code]with[/code].
</description>
</method>
</methods>
diff --git a/doc/classes/Rect3.xml b/doc/classes/Rect3.xml
index 7adf4377aa..a56dac57c7 100644
--- a/doc/classes/Rect3.xml
+++ b/doc/classes/Rect3.xml
@@ -4,7 +4,7 @@
Axis-Aligned Bounding Box.
</brief_description>
<description>
- Rect3 provides an 3D Axis-Aligned Bounding Box. It consists of a position, a size, and several utility functions. It is typically used for simple (fast) overlap tests.
+ Rect3 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.
</description>
<tutorials>
</tutorials>
@@ -28,7 +28,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Return true if this [code]Rect3[/code] completely encloses another one.
+ Returns [code]true[/code] if this [code]Rect3[/code] completely encloses another one.
</description>
</method>
<method name="expand">
@@ -37,14 +37,14 @@
<argument index="0" name="to_point" type="Vector3">
</argument>
<description>
- Return this [code]Rect3[/code] expanded to include a given point.
+ Returns this [code]Rect3[/code] expanded to include a given point.
</description>
</method>
<method name="get_area">
<return type="float">
</return>
<description>
- Get the area of the [code]Rect3[/code].
+ Gets the area of the [code]Rect3[/code].
</description>
</method>
<method name="get_endpoint">
@@ -53,49 +53,49 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Get the position of the 8 endpoints of the [code]Rect3[/code] in space.
+ Gets the position of the 8 endpoints of the [code]Rect3[/code] in space.
</description>
</method>
<method name="get_longest_axis">
<return type="Vector3">
</return>
<description>
- Return the normalized longest axis of the [code]Rect3[/code].
+ Returns the normalized longest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_longest_axis_index">
<return type="int">
</return>
<description>
- Return the index of the longest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum).
+ Returns the index of the longest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_longest_axis_size">
<return type="float">
</return>
<description>
- Return the scalar length of the longest axis of the [code]Rect3[/code].
+ Returns the scalar length of the longest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_shortest_axis">
<return type="Vector3">
</return>
<description>
- Return the normalized shortest axis of the [code]Rect3[/code].
+ Returns the normalized shortest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_shortest_axis_index">
<return type="int">
</return>
<description>
- Return the index of the shortest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum).
+ Returns the index of the shortest axis of the [code]Rect3[/code] (according to [Vector3]::AXIS* enum).
</description>
</method>
<method name="get_shortest_axis_size">
<return type="float">
</return>
<description>
- Return the scalar length of the shortest axis of the [code]Rect3[/code].
+ Returns the scalar length of the shortest axis of the [code]Rect3[/code].
</description>
</method>
<method name="get_support">
@@ -104,7 +104,7 @@
<argument index="0" name="dir" type="Vector3">
</argument>
<description>
- Return the support point in a given direction. This is useful for collision detection algorithms.
+ Returns the support point in a given direction. This is useful for collision detection algorithms.
</description>
</method>
<method name="grow">
@@ -113,21 +113,21 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the [code]Rect3[/code] grown a given amount of units towards all the sides.
+ Returns a copy of the [code]Rect3[/code] grown a given amount of units towards all the sides.
</description>
</method>
<method name="has_no_area">
<return type="bool">
</return>
<description>
- Return true if the [code]Rect3[/code] is flat or empty.
+ Returns [code]true[/code] if the [code]Rect3[/code] is flat or empty.
</description>
</method>
<method name="has_no_surface">
<return type="bool">
</return>
<description>
- Return true if the [code]Rect3[/code] is empty.
+ Returns [code]true[/code] if the [code]Rect3[/code] is empty.
</description>
</method>
<method name="has_point">
@@ -136,7 +136,7 @@
<argument index="0" name="point" type="Vector3">
</argument>
<description>
- Return true if the [code]Rect3[/code] contains a point.
+ Returns [code]true[/code] if the [code]Rect3[/code] contains a point.
</description>
</method>
<method name="intersection">
@@ -145,7 +145,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Return the intersection between two [code]Rect3[/code]. An empty Rect3 (size 0,0,0) is returned on failure.
+ Returns the intersection between two [code]Rect3[/code]. An empty Rect3 (size 0,0,0) is returned on failure.
</description>
</method>
<method name="intersects">
@@ -154,7 +154,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Return true if the [code]Rect3[/code] overlaps with another.
+ Returns [code]true[/code] if the [code]Rect3[/code] overlaps with another.
</description>
</method>
<method name="intersects_plane">
@@ -163,7 +163,7 @@
<argument index="0" name="plane" type="Plane">
</argument>
<description>
- Return true if the [code]Rect3[/code] is at both sides of a plane.
+ Returns [code]true[/code] if the [code]Rect3[/code] is on both sides of a plane.
</description>
</method>
<method name="intersects_segment">
@@ -174,7 +174,7 @@
<argument index="1" name="to" type="Vector3">
</argument>
<description>
- Return true if the [code]Rect3[/code] intersects the line segment between from and to
+ Returns [code]true[/code] if the [code]Rect3[/code] intersects the line segment between [code]from[/code] and [code]to[/code].
</description>
</method>
<method name="merge">
@@ -183,7 +183,7 @@
<argument index="0" name="with" type="Rect3">
</argument>
<description>
- Combine this [code]Rect3[/code] with another, a larger one is returned that contains both.
+ Returns a larger Rect3 that contains this Rect3 and [code]with[/code].
</description>
</method>
</methods>
@@ -192,6 +192,7 @@
Ending corner.
</member>
<member name="position" type="Vector3" setter="" getter="">
+ Beginning corner.
</member>
<member name="size" type="Vector3" setter="" getter="">
Size from position to end.
diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml
index ecc136055e..67679bc9df 100644
--- a/doc/classes/RemoteTransform.xml
+++ b/doc/classes/RemoteTransform.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RemoteTransform" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ RemoteTransform mirrors the [Transform] of another [Spatial] derived Node in the scene.
</brief_description>
<description>
+ RemoteTransform mirrors the [Transform] of another [Spatial] derived Node (called the remote node) in the scene.
+ It can be set to track another Node's position, rotation and/or scale and update its own accordingly, using either global or local coordinates.
</description>
<tutorials>
</tutorials>
@@ -82,14 +85,19 @@
</methods>
<members>
<member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node">
+ The remote node's [NodePath].
</member>
<member name="update_position" type="bool" setter="set_update_position" getter="get_update_position">
+ If [code]true[/code] the remote node's position is mirrored.
</member>
<member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation">
+ If [code]true[/code] the remote node's rotation is mirrored.
</member>
<member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale">
+ If [code]true[/code] the remote node's scale is mirrored.
</member>
<member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates">
+ If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml
index 346b8de621..eac7427f9f 100644
--- a/doc/classes/RemoteTransform2D.xml
+++ b/doc/classes/RemoteTransform2D.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RemoteTransform2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ RemoteTransform2D mirrors the [Transform2D] of another [CanvasItem] derived Node in the scene.
</brief_description>
<description>
+ RemoteTransform2D mirrors the [Transform2D] of another [CanvasItem] derived Node (called the remote node) in the scene.
+ It can be set to track another Node's position, rotation and/or and update its own accordingly, using either global or local coordinates.
</description>
<tutorials>
</tutorials>
@@ -82,14 +85,19 @@
</methods>
<members>
<member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node">
+ The remote node's [NodePath].
</member>
<member name="update_position" type="bool" setter="set_update_position" getter="get_update_position">
+ If [code]true[/code] the remote node's position is mirrored.
</member>
<member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation">
+ If [code]true[/code] the remote node's rotation is mirrored.
</member>
<member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale">
+ If [code]true[/code] the remote node's scale is mirrored.
</member>
<member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates">
+ If [code]true[/code] global coordinates are used. If [code]false[/code] local coordinates are used. Default value: [code]true[/code].
</member>
</members>
<constants>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index da89c37ff4..db47875050 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -1085,7 +1085,7 @@
</constant>
<constant name="DIFFUSE_TOON" value="4">
</constant>
- <constant name="SPECULAR_GGX" value="0">
+ <constant name="SPECULAR_SCHLICK_GGX" value="0">
</constant>
<constant name="SPECULAR_BLINN" value="1">
</constant>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index c7c19997b9..546712f223 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -17,6 +17,7 @@
<argument index="0" name="from" type="bool">
</argument>
<description>
+ Constructs a new String from the given [bool].
</description>
</method>
<method name="String">
@@ -25,6 +26,7 @@
<argument index="0" name="from" type="int">
</argument>
<description>
+ Constructs a new String from the given [int].
</description>
</method>
<method name="String">
@@ -33,6 +35,7 @@
<argument index="0" name="from" type="float">
</argument>
<description>
+ Constructs a new String from the given [float].
</description>
</method>
<method name="String">
@@ -41,6 +44,7 @@
<argument index="0" name="from" type="Vector2">
</argument>
<description>
+ Constructs a new String from the given [Vector2].
</description>
</method>
<method name="String">
@@ -49,6 +53,7 @@
<argument index="0" name="from" type="Rect2">
</argument>
<description>
+ Constructs a new String from the given [Rect2].
</description>
</method>
<method name="String">
@@ -57,6 +62,7 @@
<argument index="0" name="from" type="Vector3">
</argument>
<description>
+ Constructs a new String from the given [Vector3].
</description>
</method>
<method name="String">
@@ -65,6 +71,7 @@
<argument index="0" name="from" type="Transform2D">
</argument>
<description>
+ Constructs a new String from the given [Transform2D].
</description>
</method>
<method name="String">
@@ -73,6 +80,7 @@
<argument index="0" name="from" type="Plane">
</argument>
<description>
+ Constructs a new String from the given [Plane].
</description>
</method>
<method name="String">
@@ -81,6 +89,7 @@
<argument index="0" name="from" type="Quat">
</argument>
<description>
+ Constructs a new String from the given [Quat].
</description>
</method>
<method name="String">
@@ -89,6 +98,7 @@
<argument index="0" name="from" type="Rect3">
</argument>
<description>
+ Constructs a new String from the given [Rect3].
</description>
</method>
<method name="String">
@@ -97,6 +107,7 @@
<argument index="0" name="from" type="Basis">
</argument>
<description>
+ Constructs a new String from the given [Basis].
</description>
</method>
<method name="String">
@@ -105,6 +116,7 @@
<argument index="0" name="from" type="Transform">
</argument>
<description>
+ Constructs a new String from the given [Transform].
</description>
</method>
<method name="String">
@@ -113,6 +125,7 @@
<argument index="0" name="from" type="Color">
</argument>
<description>
+ Constructs a new String from the given [Color].
</description>
</method>
<method name="String">
@@ -121,6 +134,7 @@
<argument index="0" name="from" type="NodePath">
</argument>
<description>
+ Constructs a new String from the given [NodePath].
</description>
</method>
<method name="String">
@@ -129,6 +143,7 @@
<argument index="0" name="from" type="RID">
</argument>
<description>
+ Constructs a new String from the given [RID].
</description>
</method>
<method name="String">
@@ -137,6 +152,7 @@
<argument index="0" name="from" type="Dictionary">
</argument>
<description>
+ Constructs a new String from the given [Dictionary].
</description>
</method>
<method name="String">
@@ -145,6 +161,7 @@
<argument index="0" name="from" type="Array">
</argument>
<description>
+ Constructs a new String from the given [Array].
</description>
</method>
<method name="String">
@@ -153,6 +170,7 @@
<argument index="0" name="from" type="PoolByteArray">
</argument>
<description>
+ Constructs a new String from the given [PoolByteArray].
</description>
</method>
<method name="String">
@@ -161,6 +179,7 @@
<argument index="0" name="from" type="PoolIntArray">
</argument>
<description>
+ Constructs a new String from the given [PoolIntArray].
</description>
</method>
<method name="String">
@@ -169,6 +188,7 @@
<argument index="0" name="from" type="PoolRealArray">
</argument>
<description>
+ Constructs a new String from the given [PoolRealArray].
</description>
</method>
<method name="String">
@@ -177,6 +197,7 @@
<argument index="0" name="from" type="PoolStringArray">
</argument>
<description>
+ Constructs a new String from the given [PoolStringArray].
</description>
</method>
<method name="String">
@@ -185,6 +206,7 @@
<argument index="0" name="from" type="PoolVector2Array">
</argument>
<description>
+ Constructs a new String from the given [PoolVector2Array].
</description>
</method>
<method name="String">
@@ -193,6 +215,7 @@
<argument index="0" name="from" type="PoolVector3Array">
</argument>
<description>
+ Constructs a new String from the given [PoolVector3Array].
</description>
</method>
<method name="String">
@@ -201,6 +224,7 @@
<argument index="0" name="from" type="PoolColorArray">
</argument>
<description>
+ Constructs a new String from the given [PoolColorArray].
</description>
</method>
<method name="begins_with">
@@ -209,35 +233,35 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Return true if the strings begins with the given string.
+ Returns [code]true[/code] if the string begins with the given string.
</description>
</method>
<method name="bigrams">
<return type="PoolStringArray">
</return>
<description>
- Return the bigrams (pairs of consecutive letters) of this string.
+ Returns the bigrams (pairs of consecutive letters) of this string.
</description>
</method>
<method name="c_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the C language standard.
+ Returns a copy of the string with special characters escaped using the C language standard.
</description>
</method>
<method name="c_unescape">
<return type="String">
</return>
<description>
- Return a copy of the string with escaped characters replaced by their meanings according to the C language standard.
+ Returns a copy of the string with escaped characters replaced by their meanings according to the C language standard.
</description>
</method>
<method name="capitalize">
<return type="String">
</return>
<description>
- Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
+ Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
</description>
</method>
<method name="casecmp_to">
@@ -246,14 +270,14 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
- Return true if the string is empty.
+ Returns [code]true[/code] if the string is empty.
</description>
</method>
<method name="ends_with">
@@ -262,7 +286,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Return true if the strings ends with the given string.
+ Returns [code]true[/code] if the string ends with the given string.
</description>
</method>
<method name="erase">
@@ -271,7 +295,7 @@
<argument index="1" name="chars" type="int">
</argument>
<description>
- Erase [code]chars[/code] characters from the string starting from [code]position[/code].
+ Erases [code]chars[/code] characters from the string starting from [code]position[/code].
</description>
</method>
<method name="find">
@@ -282,7 +306,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Finds the first occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="find_last">
@@ -291,7 +315,7 @@
<argument index="0" name="what" type="String">
</argument>
<description>
- Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Finds the last occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="findn">
@@ -302,7 +326,7 @@
<argument index="1" name="from" type="int" default="0">
</argument>
<description>
- Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
+ Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<method name="format">
@@ -313,48 +337,49 @@
<argument index="1" name="placeholder" type="String" default="{_}">
</argument>
<description>
+ Formats the string by replacing all occurences of [code]placeholder[/code] with [code]values[/code].
</description>
</method>
<method name="get_base_dir">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the base directory.
+ If the string is a valid file path, returns the base directory name.
</description>
</method>
<method name="get_basename">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the path to the file without the extension.
+ If the string is a valid file path, returns the full file path without the extension.
</description>
</method>
<method name="get_extension">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the extension.
+ If the string is a valid file path, returns the extension.
</description>
</method>
<method name="get_file">
<return type="String">
</return>
<description>
- If the string is a path to a file, return the file and ignore the base directory.
+ If the string is a valid file path, returns the filename.
</description>
</method>
<method name="hash">
<return type="int">
</return>
<description>
- Hash the string and return a 32 bits integer.
+ Hashes the string and returns a 32-bit integer.
</description>
</method>
<method name="hex_to_int">
<return type="int">
</return>
<description>
- Convert a string containing a hexadecimal number into an int.
+ Converts a string containing a hexadecimal number into an integer.
</description>
</method>
<method name="insert">
@@ -365,21 +390,21 @@
<argument index="1" name="what" type="String">
</argument>
<description>
- Insert a substring at a given position.
+ Inserts a substring at a given position.
</description>
</method>
<method name="is_abs_path">
<return type="bool">
</return>
<description>
- If the string is a path to a file or directory, return true if the path is absolute.
+ If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute.
</description>
</method>
<method name="is_rel_path">
<return type="bool">
</return>
<description>
- If the string is a path to a file or directory, return true if the path is relative.
+ If the string is a path to a file or directory, returns [code]true[/code] if the path is relative.
</description>
</method>
<method name="is_subsequence_of">
@@ -388,7 +413,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Check whether this string is a subsequence of the given string.
+ Returns [code]true[/code] if this string is a subsequence of the given string.
</description>
</method>
<method name="is_subsequence_ofi">
@@ -397,49 +422,49 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Check whether this string is a subsequence of the given string, without considering case.
+ Returns [code]true[/code] if this string is a subsequence of the given string, without considering case.
</description>
</method>
<method name="is_valid_float">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid float.
+ Returns [code]true[/code] if this string contains a valid float.
</description>
</method>
<method name="is_valid_html_color">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid color in HTML notation.
+ Returns [code]true[/code] if this string contains a valid color in HTML notation.
</description>
</method>
<method name="is_valid_identifier">
<return type="bool">
</return>
<description>
- Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
+ Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
</description>
</method>
<method name="is_valid_integer">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid integer.
+ Returns [code]true[/code] if this string contains a valid integer.
</description>
</method>
<method name="is_valid_ip_address">
<return type="bool">
</return>
<description>
- Check whether the string contains a valid IP address.
+ Returns [code]true[/code] if this string contains a valid IP address.
</description>
</method>
<method name="json_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the JSON standard.
+ Returns a copy of the string with special characters escaped using the JSON standard.
</description>
</method>
<method name="left">
@@ -448,14 +473,14 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Return an amount of characters from the left of the string.
+ Returns a number of characters from the left of the string.
</description>
</method>
<method name="length">
<return type="int">
</return>
<description>
- Return the length of the string in characters.
+ Returns the string's amount of characters.
</description>
</method>
<method name="match">
@@ -464,7 +489,7 @@
<argument index="0" name="expr" type="String">
</argument>
<description>
- Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
+ Does a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
</description>
</method>
<method name="matchn">
@@ -473,21 +498,21 @@
<argument index="0" name="expr" type="String">
</argument>
<description>
- Do a simple case insensitive expression match, using ? and * wildcards (see [method match]).
+ Does a simple case insensitive expression match, using ? and * wildcards (see [method match]).
</description>
</method>
<method name="md5_buffer">
<return type="PoolByteArray">
</return>
<description>
- Return the MD5 hash of the string as an array of bytes.
+ Returns the MD5 hash of the string as an array of bytes.
</description>
</method>
<method name="md5_text">
<return type="String">
</return>
<description>
- Return the MD5 hash of the string as a string.
+ Returns the MD5 hash of the string as a string.
</description>
</method>
<method name="nocasecmp_to">
@@ -496,7 +521,7 @@
<argument index="0" name="to" type="String">
</argument>
<description>
- Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
+ Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
</description>
</method>
<method name="ord_at">
@@ -505,7 +530,7 @@
<argument index="0" name="at" type="int">
</argument>
<description>
- Return the character code at position [code]at[/code].
+ Returns the character code at position [code]at[/code].
</description>
</method>
<method name="pad_decimals">
@@ -514,7 +539,7 @@
<argument index="0" name="digits" type="int">
</argument>
<description>
- Format a number to have an exact number of [code]digits[/code] after the decimal point.
+ Formats a number to have an exact number of [code]digits[/code] after the decimal point.
</description>
</method>
<method name="pad_zeros">
@@ -523,7 +548,7 @@
<argument index="0" name="digits" type="int">
</argument>
<description>
- Format a number to have an exact number of [code]digits[/code] before the decimal point.
+ Formats a number to have an exact number of [code]digits[/code] before the decimal point.
</description>
</method>
<method name="percent_decode">
@@ -537,7 +562,7 @@
<return type="String">
</return>
<description>
- Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
+ Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests).
</description>
</method>
<method name="plus_file">
@@ -557,7 +582,7 @@
<argument index="1" name="forwhat" type="String">
</argument>
<description>
- Replace occurrences of a substring for different ones inside the string.
+ Replaces occurrences of a substring with the given one inside the string.
</description>
</method>
<method name="replacen">
@@ -568,7 +593,7 @@
<argument index="1" name="forwhat" type="String">
</argument>
<description>
- Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
+ Replaces occurrences of a substring with the given one inside the string. Ignores case.
</description>
</method>
<method name="rfind">
@@ -579,7 +604,7 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Perform a search for a substring, but start from the end of the string instead of the beginning.
+ Performs a search for a substring, but starts from the end of the string instead of the beginning.
</description>
</method>
<method name="rfindn">
@@ -590,7 +615,7 @@
<argument index="1" name="from" type="int" default="-1">
</argument>
<description>
- Perform a search for a substring, but start from the end of the string instead of the beginning. Also search case-insensitive.
+ Performs a search for a substring, but starts from the end of the string instead of the beginning. Ignores case.
</description>
</method>
<method name="right">
@@ -599,7 +624,7 @@
<argument index="0" name="position" type="int">
</argument>
<description>
- Return the right side of the string from a given position.
+ Returns the right side of the string from a given position.
</description>
</method>
<method name="sha256_buffer">
@@ -612,7 +637,7 @@
<return type="String">
</return>
<description>
- Return the SHA-256 hash of the string as a string.
+ Returns the SHA-256 hash of the string as a string.
</description>
</method>
<method name="similarity">
@@ -621,7 +646,7 @@
<argument index="0" name="text" type="String">
</argument>
<description>
- Return the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
+ Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
</description>
</method>
<method name="split">
@@ -632,7 +657,7 @@
<argument index="1" name="allow_empty" type="bool" default="True">
</argument>
<description>
- Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
+ Splits the string by a divisor string and returns an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",".
</description>
</method>
<method name="split_floats">
@@ -643,7 +668,7 @@
<argument index="1" name="allow_empty" type="bool" default="True">
</argument>
<description>
- Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",".
+ Splits the string in floats by using a divisor string and returns an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",".
</description>
</method>
<method name="strip_edges">
@@ -654,7 +679,7 @@
<argument index="1" name="right" type="bool" default="True">
</argument>
<description>
- Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
+ Returns a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
</description>
</method>
<method name="substr">
@@ -665,63 +690,63 @@
<argument index="1" name="len" type="int">
</argument>
<description>
- Return part of the string from the position [code]from[/code], with length [code]len[/code].
+ Returns part of the string from the position [code]from[/code] with length [code]len[/code].
</description>
</method>
<method name="to_ascii">
<return type="PoolByteArray">
</return>
<description>
- Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
+ Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is sped up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
</description>
</method>
<method name="to_float">
<return type="float">
</return>
<description>
- Convert a string, containing a decimal number, into a [code]float[/code].
+ Converts a string containing a decimal number into a [code]float[/code].
</description>
</method>
<method name="to_int">
<return type="int">
</return>
<description>
- Convert a string, containing an integer number, into an [code]int[/code].
+ Converts a string containing an integer number into an [code]int[/code].
</description>
</method>
<method name="to_lower">
<return type="String">
</return>
<description>
- Return the string converted to lowercase.
+ Returns the string converted to lowercase.
</description>
</method>
<method name="to_upper">
<return type="String">
</return>
<description>
- Return the string converted to uppercase.
+ Returns the string converted to uppercase.
</description>
</method>
<method name="to_utf8">
<return type="PoolByteArray">
</return>
<description>
- Convert the String (which is an array of characters) to PoolByteArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
+ Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii().
</description>
</method>
<method name="xml_escape">
<return type="String">
</return>
<description>
- Return a copy of the string with special characters escaped using the XML standard.
+ Returns a copy of the string with special characters escaped using the XML standard.
</description>
</method>
<method name="xml_unescape">
<return type="String">
</return>
<description>
- Return a copy of the string with escaped characters replaced by their meanings according to the XML standard.
+ Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard.
</description>
</method>
</methods>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index fdbdabafd3..a05bc5db9a 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -37,6 +37,7 @@
<argument index="0" name="to" type="Vector3">
</argument>
<description>
+ Returns the vector's minimum angle to the vector [code]to[/code].
</description>
</method>
<method name="bounce">
@@ -61,7 +62,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the cross product with b.
+ Returns the cross product with [code]b[/code].
</description>
</method>
<method name="cubic_interpolate">
@@ -76,7 +77,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
- Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t).
+ Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount (t).
</description>
</method>
<method name="distance_squared_to">
@@ -85,7 +86,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
+ Returns the squared distance to [code]b[/code]. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@@ -94,7 +95,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the distance to b.
+ Returns the distance to b.
</description>
</method>
<method name="dot">
@@ -103,7 +104,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the dot product with b.
+ Returns the dot product with b.
</description>
</method>
<method name="floor">
@@ -131,14 +132,14 @@
<return type="float">
</return>
<description>
- Return the length of the vector.
+ Returns the length of the vector.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
- Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
+ Returns the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
</description>
</method>
<method name="linear_interpolate">
@@ -170,7 +171,7 @@
<return type="Vector3">
</return>
<description>
- Return a copy of the normalized vector to unit length. This is the same as v / v.length().
+ Returns a copy of the normalized vector to unit length. This is the same as v / v.length().
</description>
</method>
<method name="outer">
@@ -179,7 +180,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
- Return the outer product with b.
+ Returns the outer product with b.
</description>
</method>
<method name="reflect">
@@ -217,14 +218,14 @@
<argument index="0" name="by" type="float">
</argument>
<description>
- Return a copy of the vector, snapped to the lowest neared multiple.
+ Returns a copy of the vector, snapped to the lowest neared multiple.
</description>
</method>
<method name="to_diagonal_matrix">
<return type="Basis">
</return>
<description>
- Return a diagonal matrix with the vector as main diagonal.
+ Returns a diagonal matrix with the vector as main diagonal.
</description>
</method>
</methods>
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index 6c0e4f74ff..5fe7b53a7d 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -838,7 +838,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
- actions[VS::SHADER_SPATIAL].render_mode_defines["specular_ggx"] = "#define SPECULAR_GGX\n";
+ actions[VS::SHADER_SPATIAL].render_mode_defines["specular_schlick_ggx"] = "#define SPECULAR_SCHLICK_GGX\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["specular_blinn"] = "#define SPECULAR_BLINN\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["specular_phong"] = "#define SPECULAR_PHONG\n";
actions[VS::SHADER_SPATIAL].render_mode_defines["specular_toon"] = "#define SPECULAR_TOON\n";
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index 317ca91d98..e4d76753cb 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -169,7 +169,7 @@ void light_compute(vec3 N, vec3 L,vec3 V, vec3 light_color, float roughness, ino
float dotNL = max(dot(N,L), 0.0 );
diffuse += dotNL * light_color / M_PI;
- if (roughness < 1.0) {
+ if (roughness > 0.0) {
vec3 H = normalize(V + L);
float dotNH = max(dot(N,H), 0.0 );
@@ -1034,7 +1034,7 @@ LIGHT_SHADER_CODE
}
- if (roughness < 1.0) {
+ if (roughness > 0.0) { // FIXME: roughness == 0 should not disable specular light entirely
// D
@@ -1065,7 +1065,7 @@ LIGHT_SHADER_CODE
#elif defined(SPECULAR_DISABLED)
//none..
-#elif defined(SPECULAR_GGX)
+#elif defined(SPECULAR_SCHLICK_GGX)
// shlick+ggx as default
vec3 H = normalize(V + L);
@@ -1102,10 +1102,10 @@ LIGHT_SHADER_CODE
#if defined(LIGHT_USE_CLEARCOAT)
if (clearcoat_gloss > 0.0) {
-# if !defined(SPECULAR_GGX) && !defined(SPECULAR_BLINN)
+# if !defined(SPECULAR_SCHLICK_GGX) && !defined(SPECULAR_BLINN)
vec3 H = normalize(V + L);
# endif
-# if !defined(SPECULAR_GGX)
+# if !defined(SPECULAR_SCHLICK_GGX)
float cNdotH = max(dot(N,H), 0.0);
float cLdotH = max(dot(L,H), 0.0);
float cLdotH5 = SchlickFresnel(cLdotH);
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index d12b3f1e0e..9235dafaa6 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -945,6 +945,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (mm.is_valid()) {
Point2i new_over_tile = node->world_to_map(xform_inv.xform(mm->get_position()));
+ Point2i old_over_tile = over_tile;
if (new_over_tile != over_tile) {
@@ -963,17 +964,43 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (tool == TOOL_PAINTING) {
+ // Paint using bresenham line to prevent holes in painting if the user moves fast
+
+ Vector<Point2i> points = line(old_over_tile.x, over_tile.x, old_over_tile.y, over_tile.y);
int id = get_selected_tile();
- if (id != TileMap::INVALID_CELL) {
+
+ for (int i = 0; i < points.size(); ++i) {
+
+ Point2i pos = points[i];
if (!paint_undo.has(over_tile)) {
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
+ paint_undo[pos] = _get_op_from_cell(pos);
}
- _set_cell(over_tile, id, flip_h, flip_v, transpose);
+ _set_cell(pos, id, flip_h, flip_v, transpose);
+ }
- return true;
+ return true;
+ }
+
+ if (tool == TOOL_ERASING) {
+
+ // erase using bresenham line to prevent holes in painting if the user moves fast
+
+ Vector<Point2i> points = line(old_over_tile.x, over_tile.x, old_over_tile.y, over_tile.y);
+
+ for (int i = 0; i < points.size(); ++i) {
+
+ Point2i pos = points[i];
+
+ if (!paint_undo.has(over_tile)) {
+ paint_undo[pos] = _get_op_from_cell(pos);
+ }
+
+ _set_cell(pos, TileMap::INVALID_CELL);
}
+
+ return true;
}
if (tool == TOOL_SELECTING) {
@@ -1044,16 +1071,6 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
- if (tool == TOOL_ERASING) {
-
- if (!paint_undo.has(over_tile)) {
- paint_undo[over_tile] = _get_op_from_cell(over_tile);
- }
-
- _set_cell(over_tile, TileMap::INVALID_CELL);
-
- return true;
- }
if (tool == TOOL_PICKING && Input::get_singleton()->is_mouse_button_pressed(BUTTON_LEFT)) {
_pick_tile(over_tile);
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index ef61aad341..bc2423fffd 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -574,7 +574,38 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
for (int i = 0; i < arr.size(); i++) {
p[i] = arr[i];
if (i < perf_items.size()) {
- perf_items[i]->set_text(1, rtos(p[i]));
+
+ float v = p[i];
+ String vs = rtos(v);
+ String tt = vs;
+ switch (Performance::MonitorType((int)perf_items[i]->get_metadata(1))) {
+ case Performance::MONITOR_TYPE_MEMORY: {
+ // for the time being, going above GBs is a bad sign.
+ String unit = "B";
+ if ((int)v > 1073741824) {
+ unit = "GB";
+ v /= 1073741824.0;
+ } else if ((int)v > 1048576) {
+ unit = "MB";
+ v /= 1048576.0;
+ } else if ((int)v > 1024) {
+ unit = "KB";
+ v /= 1024.0;
+ }
+ tt += " bytes";
+ vs = rtos(v) + " " + unit;
+ } break;
+ case Performance::MONITOR_TYPE_TIME: {
+ tt += " seconds";
+ vs += " s";
+ } break;
+ default: {
+ tt += " " + perf_items[i]->get_text(0);
+ } break;
+ }
+
+ perf_items[i]->set_text(1, vs);
+ perf_items[i]->set_tooltip(1, tt);
if (p[i] > perf_max[i])
perf_max[i] = p[i];
}
@@ -775,7 +806,7 @@ void ScriptEditorDebugger::_set_reason_text(const String &p_reason, MessageType
reason->set_tooltip(p_reason);
}
-void ScriptEditorDebugger::_performance_select(Object *, int, bool) {
+void ScriptEditorDebugger::_performance_select() {
perf_draw->update();
}
@@ -785,7 +816,7 @@ void ScriptEditorDebugger::_performance_draw() {
Vector<int> which;
for (int i = 0; i < perf_items.size(); i++) {
- if (perf_items[i]->is_selected(0))
+ if (perf_items[i]->is_checked(0))
which.push_back(i);
}
@@ -816,14 +847,14 @@ void ScriptEditorDebugger::_performance_draw() {
r.position += graph_sb->get_offset();
r.size -= graph_sb->get_minimum_size();
int pi = which[i];
- Color c = get_color("success_color", "Editor");
- c.set_hsv(Math::fmod(c.get_h() + pi * 0.7654, 1), c.get_s(), c.get_v());
- //c = c.linear_interpolate(get_color("base_color", "Editor"), 0.9);
+ Color c = get_color("accent_color", "Editor");
+ float h = (float)which[i] / (float)(perf_items.size());
+ c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * 1.4);
- c.a = 0.8;
- perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
c.a = 0.6;
- perf_draw->draw_string(graph_font, r.position + Point2(graph_font->get_char_size('X').width, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y);
+ perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x);
+ c.a = 0.9;
+ perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent() + graph_font->get_height()), perf_items[pi]->get_text(1), c, r.size.y);
float spacing = point_sep / float(cols);
float from = r.size.width;
@@ -1785,13 +1816,12 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
perf_monitors->set_column_title(1, TTR("Value"));
perf_monitors->set_column_titles_visible(true);
hsp->add_child(perf_monitors);
- perf_monitors->set_select_mode(Tree::SELECT_MULTI);
- perf_monitors->connect("multi_selected", this, "_performance_select");
+ perf_monitors->connect("item_edited", this, "_performance_select");
perf_draw = memnew(Control);
perf_draw->connect("draw", this, "_performance_draw");
hsp->add_child(perf_draw);
hsp->set_name(TTR("Monitors"));
- hsp->set_split_offset(300);
+ hsp->set_split_offset(340 * EDSCALE);
tabs->add_child(hsp);
perf_max.resize(Performance::MONITOR_MAX);
@@ -1801,6 +1831,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
for (int i = 0; i < Performance::MONITOR_MAX; i++) {
String n = Performance::get_singleton()->get_monitor_name(Performance::Monitor(i));
+ Performance::MonitorType mtype = Performance::get_singleton()->get_monitor_type(Performance::Monitor(i));
String base = n.get_slice("/", 0);
String name = n.get_slice("/", 1);
if (!bases.has(base)) {
@@ -1808,12 +1839,16 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
b->set_text(0, base.capitalize());
b->set_editable(0, false);
b->set_selectable(0, false);
+ b->set_expand_right(0, true);
bases[base] = b;
}
TreeItem *it = perf_monitors->create_item(bases[base]);
- it->set_editable(0, false);
- it->set_selectable(0, true);
+ it->set_metadata(1, mtype);
+ it->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
+ it->set_editable(0, true);
+ it->set_selectable(0, false);
+ it->set_selectable(1, false);
it->set_text(0, name.capitalize());
perf_items.push_back(it);
perf_max[i] = 0;
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index d0faab5892..d18a625eef 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -142,7 +142,7 @@ class ScriptEditorDebugger : public Control {
bool live_debug;
void _performance_draw();
- void _performance_select(Object *, int, bool);
+ void _performance_select();
void _stack_dump_frame_selected();
void _output_clear();
diff --git a/main/performance.cpp b/main/performance.cpp
index c4b62559c7..39b42e803c 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -153,6 +153,44 @@ float Performance::get_monitor(Monitor p_monitor) const {
return 0;
}
+Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const {
+ ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, MONITOR_TYPE_QUANTITY);
+ // ugly
+ static const MonitorType types[MONITOR_MAX] = {
+
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_TIME,
+ MONITOR_TYPE_TIME,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_QUANTITY,
+
+ };
+
+ return types[p_monitor];
+}
+
void Performance::set_process_time(float p_pt) {
_process_time = p_pt;
diff --git a/main/performance.h b/main/performance.h
index 900e6434b7..21fbd7a1d2 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -79,9 +79,17 @@ public:
MONITOR_MAX
};
+ enum MonitorType {
+ MONITOR_TYPE_QUANTITY,
+ MONITOR_TYPE_MEMORY,
+ MONITOR_TYPE_TIME
+ };
+
float get_monitor(Monitor p_monitor) const;
String get_monitor_name(Monitor p_monitor) const;
+ MonitorType get_monitor_type(Monitor p_monitor) const;
+
void set_process_time(float p_pt);
void set_physics_process_time(float p_pt);
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 95e75f9103..1d1bcfb03f 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -778,8 +778,8 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
cs_file.push_back(itype.proxy_name);
cs_file.push_back("(IntPtr " BINDINGS_PTR_FIELD ")\n" OPEN_BLOCK_L2 "this." BINDINGS_PTR_FIELD " = " BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
- cs_file.push_back(MEMBER_BEGIN "public bool HasValidHandle()\n" OPEN_BLOCK_L2
- "return " BINDINGS_PTR_FIELD " == IntPtr.Zero;\n" CLOSE_BLOCK_L2);
+ cs_file.push_back(MEMBER_BEGIN "public IntPtr NativeInstance\n" OPEN_BLOCK_L2
+ "get { return " BINDINGS_PTR_FIELD "; }\n" CLOSE_BLOCK_L2);
} else if (itype.is_singleton) {
// Add the type name and the singleton pointer as static fields
@@ -841,8 +841,8 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
// Add methods
if (!is_derived_type) {
- cs_file.push_back(MEMBER_BEGIN "public bool HasValidHandle()\n" OPEN_BLOCK_L2
- "return " BINDINGS_PTR_FIELD " == IntPtr.Zero;\n" CLOSE_BLOCK_L2);
+ cs_file.push_back(MEMBER_BEGIN "public IntPtr NativeInstance\n" OPEN_BLOCK_L2
+ "get { return " BINDINGS_PTR_FIELD "; }\n" CLOSE_BLOCK_L2);
cs_file.push_back(MEMBER_BEGIN "internal static IntPtr " CS_SMETHOD_GETINSTANCE "(Object instance)\n" OPEN_BLOCK_L2
"return instance == null ? IntPtr.Zero : instance." BINDINGS_PTR_FIELD ";\n" CLOSE_BLOCK_L2);
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index d7aedbbcf0..4b5f5eb137 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gd_mono.h"
+#include <mono/metadata/exception.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/mono-debug.h>
#include <mono/metadata/mono-gc.h>
@@ -47,6 +48,15 @@
#include "../editor/godotsharp_editor.h"
#endif
+void gdmono_unhandled_exception_hook(MonoObject *exc, void *user_data) {
+
+ (void)user_data; // UNUSED
+
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ abort();
+}
+
#ifdef MONO_PRINT_HANDLER_ENABLED
void gdmono_MonoPrintCallback(const char *string, mono_bool is_stdout) {
@@ -214,6 +224,8 @@ void GDMono::initialize() {
// The following assemblies are not required at initialization
_load_all_script_assemblies();
+ mono_install_unhandled_exception_hook(gdmono_unhandled_exception_hook, NULL);
+
OS::get_singleton()->print("Mono: ALL IS GOOD\n");
}
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index 4b370295f3..0d9b137f99 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -95,7 +95,9 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
(void)user_data; // UNUSED
if (search_dirs.empty()) {
+#ifdef TOOLS_DOMAIN
search_dirs.push_back(GodotSharpDirs::get_res_temp_assemblies_dir());
+#endif
search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir());
search_dirs.push_back(OS::get_singleton()->get_resource_dir());
search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir());
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 81315ee87a..1643f8cfc5 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -183,19 +183,19 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
// GodotObject
if (CACHED_CLASS(GodotObject)->is_assignable_from(type_class)) {
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
if (CACHED_CLASS(NodePath) == type_class) {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
if (CACHED_CLASS(RID) == type_class) {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
@@ -204,8 +204,6 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
} break;
case MONO_TYPE_OBJECT: {
- GDMonoClass *type_class = type.type_class;
-
// Variant
switch (p_value.get_type()) {
case Variant::BOOL: {
@@ -237,11 +235,11 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
case Variant::COLOR: SET_FROM_STRUCT_AND_BREAK(Color);
case Variant::NODE_PATH: {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator NodePath());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
} break;
case Variant::_RID: {
MonoObject *managed = GDMonoUtils::create_managed_from(p_value.operator RID());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
} break;
case Variant::OBJECT: {
MonoObject *managed = GDMonoUtils::unmanaged_get_managed(p_value.operator Object *());
@@ -250,7 +248,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
}
case Variant::DICTIONARY: {
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
} break;
case Variant::ARRAY: SET_FROM_ARRAY_AND_BREAK(Array);
case Variant::POOL_BYTE_ARRAY: SET_FROM_ARRAY_AND_BREAK(PoolByteArray);
@@ -268,7 +266,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
case MONO_TYPE_GENERICINST: {
if (CACHED_RAW_MONO_CLASS(Dictionary) == type.type_class->get_raw()) {
MonoObject *managed = GDMonoMarshal::Dictionary_to_mono_object(p_value.operator Dictionary());
- mono_field_set_value(p_object, mono_field, &managed);
+ mono_field_set_value(p_object, mono_field, managed);
break;
}
} break;
diff --git a/modules/mono/mono_gd/gd_mono_method.cpp b/modules/mono/mono_gd/gd_mono_method.cpp
index 6468e0d3d9..eb97d62900 100644
--- a/modules/mono/mono_gd/gd_mono_method.cpp
+++ b/modules/mono/mono_gd/gd_mono_method.cpp
@@ -83,9 +83,32 @@ MonoObject *GDMonoMethod::invoke(MonoObject *p_object, const Variant **p_params,
mono_array_set(params, MonoObject *, i, boxed_param);
}
- return mono_runtime_invoke_array(mono_method, p_object, params, r_exc);
+ MonoObject *exc = NULL;
+ MonoObject *ret = mono_runtime_invoke_array(mono_method, p_object, params, &exc);
+
+ if (exc) {
+ if (r_exc) {
+ *r_exc = exc;
+ } else {
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ }
+ }
+
+ return ret;
} else {
- mono_runtime_invoke(mono_method, p_object, NULL, r_exc);
+ MonoObject *exc = NULL;
+ mono_runtime_invoke(mono_method, p_object, NULL, &exc);
+
+ if (exc) {
+ if (r_exc) {
+ *r_exc = exc;
+ } else {
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ }
+ }
+
return NULL;
}
}
@@ -96,7 +119,19 @@ MonoObject *GDMonoMethod::invoke(MonoObject *p_object, MonoObject **r_exc) {
}
MonoObject *GDMonoMethod::invoke_raw(MonoObject *p_object, void **p_params, MonoObject **r_exc) {
- return mono_runtime_invoke(mono_method, p_object, p_params, r_exc);
+ MonoObject *exc = NULL;
+ MonoObject *ret = mono_runtime_invoke(mono_method, p_object, p_params, &exc);
+
+ if (exc) {
+ if (r_exc) {
+ *r_exc = exc;
+ } else {
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(exc).utf8());
+ mono_print_unhandled_exception(exc);
+ }
+ }
+
+ return ret;
}
bool GDMonoMethod::has_attribute(GDMonoClass *p_attr_class) {
diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index 2bab144a28..18b4051afe 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -8,7 +8,7 @@ env_regex.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=0"])
env_regex.add_source_files(env.modules_sources, "*.cpp")
if env['builtin_pcre2']:
- jit_blacklist = ['javascript']
+ jit_blacklist = ['javascript', 'uwp']
thirdparty_dir = '#thirdparty/pcre2/src/'
thirdparty_flags = ['-DPCRE2_STATIC', '-DHAVE_CONFIG_H']
if 'platform' in env and env['platform'] not in jit_blacklist:
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 05adfeb0f5..420bb50af9 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -219,6 +219,9 @@ public:
virtual bool _check_internal_feature_support(const String &p_feature);
+ virtual void set_use_vsync(bool p_enable);
+ virtual bool is_vsync_enabled() const;
+
void run();
void set_mouse_mode(MouseMode p_mode);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 2c81a02014..e1a01d2b59 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1954,6 +1954,23 @@ Error OS_OSX::move_to_trash(const String &p_path) {
return OK;
}
+void OS_OSX::set_use_vsync(bool p_enable) {
+ CGLContextObj ctx = CGLGetCurrentContext();
+ if (ctx) {
+ GLint swapInterval = p_enable ? 1 : 0;
+ CGLSetParameter(ctx, kCGLCPSwapInterval, &swapInterval);
+ }
+}
+
+bool OS_OSX::is_vsync_enabled() const {
+ GLint swapInterval = 0;
+ CGLContextObj ctx = CGLGetCurrentContext();
+ if (ctx) {
+ CGLGetParameter(ctx, kCGLCPSwapInterval, &swapInterval);
+ }
+ return swapInterval ? true : false;
+}
+
OS_OSX *OS_OSX::singleton = NULL;
OS_OSX::OS_OSX() {
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index fa656bdcd3..ff23b3183b 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -61,6 +61,21 @@ void RayCast2D::set_type_mask(uint32_t p_mask) {
type_mask = p_mask;
}
+void RayCast2D::set_collision_mask_bit(int p_bit, bool p_value) {
+
+ uint32_t mask = get_collision_mask();
+ if (p_value)
+ mask |= 1 << p_bit;
+ else
+ mask &= ~(1 << p_bit);
+ set_collision_mask(mask);
+}
+
+bool RayCast2D::get_collision_mask_bit(int p_bit) const {
+
+ return get_collision_mask() & (1 << p_bit);
+}
+
uint32_t RayCast2D::get_type_mask() const {
return type_mask;
@@ -279,6 +294,9 @@ void RayCast2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_collision_mask", "mask"), &RayCast2D::set_collision_mask);
ClassDB::bind_method(D_METHOD("get_collision_mask"), &RayCast2D::get_collision_mask);
+ ClassDB::bind_method(D_METHOD("set_collision_mask_bit", "bit", "value"), &RayCast2D::set_collision_mask_bit);
+ ClassDB::bind_method(D_METHOD("get_collision_mask_bit", "bit"), &RayCast2D::get_collision_mask_bit);
+
ClassDB::bind_method(D_METHOD("set_type_mask", "mask"), &RayCast2D::set_type_mask);
ClassDB::bind_method(D_METHOD("get_type_mask"), &RayCast2D::get_type_mask);
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index da1be84307..c13ddfdc58 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -64,6 +64,9 @@ public:
void set_collision_mask(uint32_t p_mask);
uint32_t get_collision_mask() const;
+ void set_collision_mask_bit(int p_bit, bool p_value);
+ bool get_collision_mask_bit(int p_bit) const;
+
void set_type_mask(uint32_t p_mask);
uint32_t get_type_mask() const;
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index 296bddf0a3..9f61cc64ea 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -63,6 +63,21 @@ void RayCast::set_type_mask(uint32_t p_mask) {
type_mask = p_mask;
}
+void RayCast::set_collision_mask_bit(int p_bit, bool p_value) {
+
+ uint32_t mask = get_collision_mask();
+ if (p_value)
+ mask |= 1 << p_bit;
+ else
+ mask &= ~(1 << p_bit);
+ set_collision_mask(mask);
+}
+
+bool RayCast::get_collision_mask_bit(int p_bit) const {
+
+ return get_collision_mask() & (1 << p_bit);
+}
+
uint32_t RayCast::get_type_mask() const {
return type_mask;
@@ -248,6 +263,9 @@ void RayCast::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_collision_mask", "mask"), &RayCast::set_collision_mask);
ClassDB::bind_method(D_METHOD("get_collision_mask"), &RayCast::get_collision_mask);
+ ClassDB::bind_method(D_METHOD("set_collision_mask_bit", "bit", "value"), &RayCast::set_collision_mask_bit);
+ ClassDB::bind_method(D_METHOD("get_collision_mask_bit", "bit"), &RayCast::get_collision_mask_bit);
+
ClassDB::bind_method(D_METHOD("set_type_mask", "mask"), &RayCast::set_type_mask);
ClassDB::bind_method(D_METHOD("get_type_mask"), &RayCast::get_type_mask);
diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h
index cd3cf3c913..cac1596264 100644
--- a/scene/3d/ray_cast.h
+++ b/scene/3d/ray_cast.h
@@ -72,6 +72,9 @@ public:
void set_collision_mask(uint32_t p_mask);
uint32_t get_collision_mask() const;
+ void set_collision_mask_bit(int p_bit, bool p_value);
+ bool get_collision_mask_bit(int p_bit) const;
+
void set_type_mask(uint32_t p_mask);
uint32_t get_type_mask() const;
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 910a2ad2fd..232f690074 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -1165,6 +1165,11 @@ void Environment::_bind_methods() {
BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_MEDIUM);
BIND_ENUM_CONSTANT(DOF_BLUR_QUALITY_HIGH);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_DISABLED);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_1x1);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_2x2);
+ BIND_ENUM_CONSTANT(SSAO_BLUR_3x3);
+
BIND_ENUM_CONSTANT(SSAO_QUALITY_LOW);
BIND_ENUM_CONSTANT(SSAO_QUALITY_MEDIUM);
BIND_ENUM_CONSTANT(SSAO_QUALITY_HIGH);
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index b22a019319..898a594498 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -377,7 +377,7 @@ void SpatialMaterial::_update_shader() {
case DIFFUSE_TOON: code += ",diffuse_toon"; break;
}
switch (specular_mode) {
- case SPECULAR_GGX: code += ",specular_ggx"; break;
+ case SPECULAR_SCHLICK_GGX: code += ",specular_schlick_ggx"; break;
case SPECULAR_BLINN: code += ",specular_blinn"; break;
case SPECULAR_PHONG: code += ",specular_phong"; break;
case SPECULAR_TOON: code += ",specular_toon"; break;
@@ -1819,7 +1819,7 @@ void SpatialMaterial::_bind_methods() {
ADD_GROUP("Parameters", "params_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_diffuse_mode", PROPERTY_HINT_ENUM, "Burley,Lambert,Lambert Wrap,Oren Nayar,Toon"), "set_diffuse_mode", "get_diffuse_mode");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "params_specular_mode", PROPERTY_HINT_ENUM, "GGX,Blinn,Phong,Toon,Disabled"), "set_specular_mode", "get_specular_mode");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "params_specular_mode", PROPERTY_HINT_ENUM, "SchlickGGX,Blinn,Phong,Toon,Disabled"), "set_specular_mode", "get_specular_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_blend_mode", PROPERTY_HINT_ENUM, "Mix,Add,Sub,Mul"), "set_blend_mode", "get_blend_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_cull_mode", PROPERTY_HINT_ENUM, "Back,Front,Disabled"), "set_cull_mode", "get_cull_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "params_depth_draw_mode", PROPERTY_HINT_ENUM, "Opaque Only,Always,Never,Opaque Pre-Pass"), "set_depth_draw_mode", "get_depth_draw_mode");
@@ -2006,7 +2006,7 @@ void SpatialMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(DIFFUSE_OREN_NAYAR);
BIND_ENUM_CONSTANT(DIFFUSE_TOON);
- BIND_ENUM_CONSTANT(SPECULAR_GGX);
+ BIND_ENUM_CONSTANT(SPECULAR_SCHLICK_GGX);
BIND_ENUM_CONSTANT(SPECULAR_BLINN);
BIND_ENUM_CONSTANT(SPECULAR_PHONG);
BIND_ENUM_CONSTANT(SPECULAR_TOON);
@@ -2087,7 +2087,7 @@ SpatialMaterial::SpatialMaterial()
flags[i] = 0;
}
diffuse_mode = DIFFUSE_LAMBERT;
- specular_mode = SPECULAR_GGX;
+ specular_mode = SPECULAR_SCHLICK_GGX;
for (int i = 0; i < FEATURE_MAX; i++) {
features[i] = false;
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 942fb42363..2425f1a174 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -193,7 +193,7 @@ public:
};
enum SpecularMode {
- SPECULAR_GGX,
+ SPECULAR_SCHLICK_GGX,
SPECULAR_BLINN,
SPECULAR_PHONG,
SPECULAR_TOON,
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index bd8a67c0a3..7489ca7e3e 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -159,7 +159,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_burley");
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_toon");
- shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_ggx");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_schlick_ggx");
shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_blinn");
shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_phong");
shader_modes[VS::SHADER_SPATIAL].modes.insert("specular_toon");